文档与代码优化: 更新成员管理功能

1. 更新README文档
  - 新增成员管理功能说明
  - 重新组织功能列表
  - 优化分支管理说明

2. 代码优化
  - 优化导入语句
  - 移除未使用的导入
  - 简化数据库回调实现
This commit is contained in:
yovinchen 2024-11-27 09:56:22 +08:00
parent f74471e162
commit 202e1f7fd7
6 changed files with 67 additions and 23 deletions

View File

@ -9,6 +9,7 @@
## 主要特性 ## 主要特性
- 💰 收入/支出记录管理 - 💰 收入/支出记录管理
- 👥 成员管理系统
- 📊 分类管理系统 - 📊 分类管理系统
- 📅 自定义日期选择器 - 📅 自定义日期选择器
- 📈 月度统计视图 - 📈 月度统计视图
@ -25,38 +26,44 @@
## 开发计划 ## 开发计划
### 1. 数据统计与可视化 (feature/statistics) ### 1. 成员管理功能 (feature/member)
- [ ] 成员添加/编辑/删除
- [ ] 记账时选择相关成员
- [ ] 成员消费统计
- [ ] 成员间账单分摊
### 2. 数据统计与可视化 (feature/statistics)
- [ ] 支出/收入趋势图表 - [ ] 支出/收入趋势图表
- [ ] 分类占比饼图 - [ ] 分类占比饼图
- [ ] 月度/年度报表 - [ ] 月度/年度报表
### 2. 数据导出与备份 (feature/backup) ### 3. 数据导出与备份 (feature/backup)
- [ ] 导出 CSV/Excel 功能 - [ ] 导出 CSV/Excel 功能
- [ ] 云端备份支持 - [ ] 云端备份支持
- [ ] 数据迁移工具 - [ ] 数据迁移工具
### 3. 预算管理 (feature/budget) ### 4. 预算管理 (feature/budget)
- [ ] 月度预算设置 - [ ] 月度预算设置
- [ ] 预算超支提醒 - [ ] 预算超支提醒
- [ ] 分类预算管理 - [ ] 分类预算管理
### 4. 用户体验优化 (feature/ux-enhancement) ### 5. 用户体验优化 (feature/ux-enhancement)
- [ ] 深色模式支持 - [ ] 深色模式支持
- [ ] 手势操作优化 - [ ] 手势操作优化
- [ ] 快速记账小组件 - [ ] 快速记账小组件
- [ ] 多语言支持 - [ ] 多语言支持
### 5. 性能优化 (feature/performance) ### 6. 性能优化 (feature/performance)
- [ ] 大数据量处理优化 - [ ] 大数据量处理优化
- [ ] 启动速度优化 - [ ] 启动速度优化
- [ ] 内存使用优化 - [ ] 内存使用优化
## 分支管理 ## 分支管理
- `master`: 主分支,保持稳定可用 - `master`: 稳定主分支
- `develop`: 开发分支,新功能开发的基础分支 - `develop`: 主开发分支
- `feature/*`: 具体功能开发分支 - `feature/*`: 功能开发分支
- `release/*`: 发布准备分支 - `release/*`: 版本发布分支
## 如何贡献 ## 如何贡献

View File

@ -15,7 +15,6 @@
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Bookkeeping"> android:theme="@style/Theme.Bookkeeping">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -138,7 +138,7 @@ abstract class BookkeepingDatabase : RoomDatabase() {
BookkeepingDatabase::class.java, BookkeepingDatabase::class.java,
"bookkeeping_database" "bookkeeping_database"
) )
.addCallback(object : RoomDatabase.Callback() { .addCallback(object : Callback() {
override fun onCreate(db: SupportSQLiteDatabase) { override fun onCreate(db: SupportSQLiteDatabase) {
super.onCreate(db) super.onCreate(db)
Log.d(TAG, "Database created, initializing default categories") Log.d(TAG, "Database created, initializing default categories")

View File

@ -2,15 +2,32 @@ package com.yovinchen.bookkeeping.ui.dialog
import android.util.Log import android.util.Log
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Delete import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Edit import androidx.compose.material3.AlertDialog
import androidx.compose.material3.* import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.* import androidx.compose.material3.FilterChip
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp

View File

@ -4,13 +4,20 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Home import androidx.compose.material.icons.filled.Home
import androidx.compose.material.icons.filled.Settings import androidx.compose.material.icons.filled.Settings
import androidx.compose.material3.* import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.* import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationBar
import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.NavigationBarItemDefaults
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.navigation.NavDestination.Companion.hierarchy import androidx.navigation.NavDestination.Companion.hierarchy
import androidx.navigation.NavGraph.Companion.findStartDestination import androidx.navigation.NavGraph.Companion.findStartDestination
import androidx.navigation.compose.NavHost import androidx.navigation.compose.NavHost
import androidx.compose.ui.graphics.Color
import androidx.navigation.compose.composable import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController import androidx.navigation.compose.rememberNavController

View File

@ -1,16 +1,30 @@
package com.yovinchen.bookkeeping.ui.screen package com.yovinchen.bookkeeping.ui.screen
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.Column
import androidx.compose.material3.* import androidx.compose.foundation.layout.Row
import androidx.compose.runtime.* import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RadioButton
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel import androidx.lifecycle.viewmodel.compose.viewModel
import com.yovinchen.bookkeeping.model.Category
import com.yovinchen.bookkeeping.model.ThemeMode import com.yovinchen.bookkeeping.model.ThemeMode
import com.yovinchen.bookkeeping.model.TransactionType
import com.yovinchen.bookkeeping.ui.components.ColorPicker import com.yovinchen.bookkeeping.ui.components.ColorPicker
import com.yovinchen.bookkeeping.ui.components.predefinedColors import com.yovinchen.bookkeeping.ui.components.predefinedColors
import com.yovinchen.bookkeeping.ui.dialog.CategoryManagementDialog import com.yovinchen.bookkeeping.ui.dialog.CategoryManagementDialog