Skip to content

Commit f56f386

Browse files
committed
优化URL&IPC,新增接口,开始打包
1 parent 4ee42ce commit f56f386

15 files changed

Lines changed: 1662 additions & 111 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,5 @@ cython_debug/
198198
/data/CSES
199199
/typings
200200
/data/images
201+
/data/backup
202+
/data/backup

CHANGELOG/v2.2.5/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ v2.0 - Koharu(小鸟游星野) release 4
55

66
- 新增 **引导功能**,全新**设置向导**流程
77
- 新增 **抽奖显示样式**,新增**更多格式**选项
8+
- 新增 **数据备份**,新增**备份管理**
9+
- 新增 **IPC 数据接口**,新增只读名单/历史
810

911
## 💡 功能优化
1012

1113
- 优化 **核心架构**,托盘/工具提取**常量**
1214
- 优化 **抽奖功能**,提取**UI工具类**
1315
- 优化 **通知服务**,精简**冗余**并优化动画
16+
- 优化 **IPC/URL**,按**软件名**定位通道
1417
- 优化 **语音功能**,整合**音量控制**并降内存
1518
- 优化 **音频模块**,提升音乐播放**响应**
1619
- 优化 **字体与主题**,简化**加载/图标**

app/Language/modules/basic_settings.py

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,136 @@
9292
"description": "查看和管理程序日志文件",
9393
"pushbutton_name": "查看日志",
9494
},
95+
"backup_manager": {
96+
"name": "备份管理",
97+
"description": "管理自动备份与手动备份",
98+
"pushbutton_name": "备份管理",
99+
},
100+
"backup_auto_settings": {"name": "自动备份", "description": "配置自动备份策略"},
101+
"backup_manual_settings": {
102+
"name": "手动备份",
103+
"description": "立即备份并管理备份文件",
104+
},
105+
"backup_auto_enabled": {
106+
"name": "是否启用",
107+
"description": "是否启用自动备份",
108+
"switchbutton_name": {"enable": "开启", "disable": "关闭"},
109+
},
110+
"backup_auto_interval_days": {
111+
"name": "自动备份间隔",
112+
"description": "设置自动备份间隔(天)",
113+
},
114+
"backup_auto_max_count": {
115+
"name": "自动备份上限",
116+
"description": "设置自动备份最多保留数量(个)",
117+
},
118+
"backup_last_success": {
119+
"name": "上次成功备份",
120+
"description": "显示上次成功备份时间",
121+
},
122+
"backup_now": {
123+
"name": "立即备份",
124+
"description": "立即创建一份全量备份",
125+
"pushbutton_name": "立即备份",
126+
},
127+
"backup_open_folder": {
128+
"name": "查看备份文件",
129+
"description": "打开备份文件夹",
130+
"pushbutton_name": "查看备份文件",
131+
},
132+
"backup_folder_size": {"name": "占用大小", "description": "备份文件夹占用大小"},
133+
"backup_content_settings": {
134+
"name": "备份内容",
135+
"description": "选择需要包含在备份文件中的数据",
136+
},
137+
"backup_content_tip": {
138+
"text": "关闭某一项后,该文件夹不会被打包进备份文件。",
139+
},
140+
"backup_restore_settings": {
141+
"name": "还原备份",
142+
"description": "选择一个备份文件并还原(重启后生效)",
143+
},
144+
"backup_restore_tip": {
145+
"text": "还原会覆盖当前数据。还原完成后请重启应用程序以使更改生效。",
146+
},
147+
"backup_restore_file_list": {
148+
"name": "备份文件列表",
149+
"description": "选择要还原的备份文件",
150+
},
151+
"backup_restore_refresh": {
152+
"name": "刷新列表",
153+
"description": "刷新备份文件列表",
154+
"pushbutton_name": "刷新",
155+
},
156+
"backup_restore_start": {
157+
"name": "开始还原",
158+
"description": "使用选中的备份文件还原数据",
159+
"pushbutton_name": "还原",
160+
},
161+
"backup_restore_no_selection": {
162+
"text": "请先选择要还原的备份文件",
163+
},
164+
"backup_restore_confirm": {
165+
"title": "确认还原",
166+
"content": "确定要还原该备份文件吗?\n\n{file}\n\n此操作会覆盖当前数据,还原完成后需要重启应用程序以生效。",
167+
},
168+
"backup_restore_refresh_result": {
169+
"success": "已刷新,共 {count} 个备份文件",
170+
"empty": "已刷新,未发现备份文件",
171+
"failure": "刷新失败:{error}",
172+
},
173+
"backup_restore_table_headers": ["备份文件", "创建时间", "大小"],
174+
"include_config": {
175+
"name": "配置文件",
176+
"description": "软件设置与配置文件(config)",
177+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
178+
},
179+
"include_list": {
180+
"name": "名单数据",
181+
"description": "点名/抽奖名单等数据(list)",
182+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
183+
},
184+
"include_language": {
185+
"name": "语言文件",
186+
"description": "多语言文本配置(Language)",
187+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
188+
},
189+
"include_history": {
190+
"name": "历史记录",
191+
"description": "抽取历史记录数据(history)",
192+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
193+
},
194+
"include_audio": {
195+
"name": "音频资源",
196+
"description": "音频资源文件(audio)",
197+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
198+
},
199+
"include_cses": {
200+
"name": "CSES 联动",
201+
"description": "CSES 相关联动数据(CSES)",
202+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
203+
},
204+
"include_images": {
205+
"name": "图片资源",
206+
"description": "学生/奖品图片资源(images)",
207+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
208+
},
209+
"include_logs": {
210+
"name": "运行日志",
211+
"description": "程序运行日志,可能包含敏感信息(logs)",
212+
"switchbutton_name": {"enable": "包含", "disable": "不包含"},
213+
},
214+
"backup_tabs": {
215+
"auto": "自动备份",
216+
"manual": "手动备份",
217+
"restore": "还原备份",
218+
"content": "备份内容",
219+
},
220+
"backup_last_success_text": {"none": "没有上次备份记录"},
221+
"backup_now_result": {
222+
"success": "备份成功:\n{path}",
223+
"failure": "备份失败:\n{error}",
224+
},
95225
"dpiScale": {
96226
"name": "DPI缩放",
97227
"description": "调整软件界面缩放比例(重启软件后生效)",
@@ -263,6 +393,142 @@
263393
"description": "View and manage program log files",
264394
"pushbutton_name": "Viewer Log",
265395
},
396+
"backup_manager": {
397+
"name": "Backup manager",
398+
"description": "Manage automatic and manual backups",
399+
"pushbutton_name": "Backup manager",
400+
},
401+
"backup_auto_settings": {
402+
"name": "Automatic backup",
403+
"description": "Configure automatic backup policy",
404+
},
405+
"backup_manual_settings": {
406+
"name": "Manual backup",
407+
"description": "Create backups and manage backup files",
408+
},
409+
"backup_auto_enabled": {
410+
"name": "Enabled",
411+
"description": "Enable automatic backups",
412+
"switchbutton_name": {"enable": "On", "disable": "Off"},
413+
},
414+
"backup_auto_interval_days": {
415+
"name": "Backup interval",
416+
"description": "Set automatic backup interval (days)",
417+
},
418+
"backup_auto_max_count": {
419+
"name": "Backup limit",
420+
"description": "Maximum number of backups to keep",
421+
},
422+
"backup_last_success": {
423+
"name": "Last successful backup",
424+
"description": "Show last successful backup time",
425+
},
426+
"backup_now": {
427+
"name": "Backup now",
428+
"description": "Create a full backup now",
429+
"pushbutton_name": "Backup now",
430+
},
431+
"backup_open_folder": {
432+
"name": "View backups",
433+
"description": "Open backup folder",
434+
"pushbutton_name": "View backups",
435+
},
436+
"backup_folder_size": {
437+
"name": "Storage usage",
438+
"description": "Backup folder size",
439+
},
440+
"backup_content_settings": {
441+
"name": "Backup content",
442+
"description": "Choose what to include in the backup file",
443+
},
444+
"backup_content_tip": {
445+
"text": "When an item is off, its folder will not be included in the backup file.",
446+
},
447+
"backup_restore_settings": {
448+
"name": "Restore backup",
449+
"description": "Select a backup file to restore (restart required)",
450+
},
451+
"backup_restore_tip": {
452+
"text": "Restoring will overwrite current data. Restart the app for changes to take effect.",
453+
},
454+
"backup_restore_file_list": {
455+
"name": "Backup files",
456+
"description": "Select a backup file to restore",
457+
},
458+
"backup_restore_refresh": {
459+
"name": "Refresh list",
460+
"description": "Refresh backup file list",
461+
"pushbutton_name": "Refresh",
462+
},
463+
"backup_restore_start": {
464+
"name": "Restore",
465+
"description": "Restore data from the selected backup file",
466+
"pushbutton_name": "Restore",
467+
},
468+
"backup_restore_no_selection": {
469+
"text": "Please select a backup file to restore first",
470+
},
471+
"backup_restore_confirm": {
472+
"title": "Confirm restore",
473+
"content": "Are you sure you want to restore this backup file?\n\n{file}\n\nThis will overwrite current data. Restart the app for changes to take effect.",
474+
},
475+
"backup_restore_refresh_result": {
476+
"success": "Refreshed. {count} backup file(s) found",
477+
"empty": "Refreshed. No backup files found",
478+
"failure": "Refresh failed: {error}",
479+
},
480+
"backup_restore_table_headers": ["Backup file", "Created at", "Size"],
481+
"include_config": {
482+
"name": "Config",
483+
"description": "App settings and configuration files (config)",
484+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
485+
},
486+
"include_list": {
487+
"name": "Lists",
488+
"description": "Roll-call/prize lists and related data (list)",
489+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
490+
},
491+
"include_language": {
492+
"name": "Language",
493+
"description": "Localization and language resources (Language)",
494+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
495+
},
496+
"include_history": {
497+
"name": "History",
498+
"description": "Extraction history records (history)",
499+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
500+
},
501+
"include_audio": {
502+
"name": "Audio",
503+
"description": "Audio resources (audio)",
504+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
505+
},
506+
"include_cses": {
507+
"name": "CSES linkage",
508+
"description": "CSES integration data (CSES)",
509+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
510+
},
511+
"include_images": {
512+
"name": "Images",
513+
"description": "Student/prize image resources (images)",
514+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
515+
},
516+
"include_logs": {
517+
"name": "Logs",
518+
"description": "Runtime logs, may contain sensitive info (logs)",
519+
"switchbutton_name": {"enable": "Include", "disable": "Exclude"},
520+
},
521+
"backup_tabs": {
522+
"auto": "Automatic backup",
523+
"manual": "Manual backup",
524+
"restore": "Restore backup",
525+
"content": "Backup content",
526+
},
527+
"backup_last_success_text": {"none": "No backup record"},
528+
"backup_now_result": {
529+
"success": "Backup succeeded:\n{path}",
530+
"failure": "Backup failed:\n{error}",
531+
},
266532
"dpiScale": {
267533
"name": "DPI scale settings",
268534
"description": "Resize the app interface (restart required)",

0 commit comments

Comments
 (0)