优化版本更新操作

This commit is contained in:
lyswhut
2023-01-31 17:48:38 +08:00
parent c24b29a42c
commit 6b69cdf12f
22 changed files with 553 additions and 185 deletions
+2
View File
@@ -38,6 +38,8 @@ export const DATA_KEYS = {
leaderboardSetting: 'leaderboardSetting',
songListSetting: 'songListSetting',
searchSetting: 'searchSetting',
lastLastStartInfo: 'lastLastStartInfo',
} as const
export const DEFAULT_SETTING = {
+1
View File
@@ -16,6 +16,7 @@ const defaultSetting: LX.AppSetting = {
'common.isAgreePact': false,
'common.controlBtnPosition': process.platform === 'darwin' ? 'left' : 'right',
'common.playBarProgressStyle': 'mini',
'common.tryAutoUpdate': true,
'player.startupAutoPlay': false,
'player.togglePlayMethod': 'listLoop',
+1
View File
@@ -55,6 +55,7 @@ const modules = {
change_tray: 'change_tray',
quit_update: 'quit_update',
update_check: 'update_check',
update_download_update: 'update_download_update',
update_available: 'update_available',
update_error: 'update_error',
update_progress: 'update_progress',
+5
View File
@@ -68,6 +68,11 @@ declare global {
*/
'common.playBarProgressStyle': 'mini' | 'full' | 'middle'
/**
* 尝试自动更新
*/
'common.tryAutoUpdate': boolean
/**
* 启动时自动播放歌曲
*/
+1
View File
@@ -102,6 +102,7 @@ declare namespace LX {
prev: boolean
}
type UpdateStatus = 'downloaded' | 'downloading' | 'error' | 'checking' | 'idle'
interface VersionInfo {
version: string
desc: string