mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-22 16:50:35 +08:00
@@ -1607,6 +1607,17 @@ async function initData() {
|
||||
formKeys.forEach(key => {
|
||||
;(formOfSetting.value as any)[key] = settings[key] ?? formOfSetting.value[key]
|
||||
})
|
||||
try {
|
||||
const actualAutoStartStatus = await window.electron.triggerRPC<boolean>(IRPCActionType.PICLIST_AUTO_START_STATUS)
|
||||
if (typeof actualAutoStartStatus === 'boolean') {
|
||||
formOfSetting.value.autoStart = actualAutoStartStatus
|
||||
if (actualAutoStartStatus !== settings.autoStart) {
|
||||
saveConfig({ [configPaths.settings.autoStart]: actualAutoStartStatus })
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
formOfSetting.value.autoStart = settings.autoStart ?? false
|
||||
}
|
||||
formOfSetting.value.logLevel = initArray(settings.logLevel || [], ['all'])
|
||||
formOfSetting.value.autoImportPicBed = initArray(settings.autoImportPicBed || [], [])
|
||||
currentLanguage.value = settings.language || 'zh-CN'
|
||||
|
||||
@@ -57,6 +57,7 @@ export const IRPCActionType = {
|
||||
PICLIST_OPEN_FILE: 'PICLIST_OPEN_FILE',
|
||||
PICLIST_OPEN_DIRECTORY: 'PICLIST_OPEN_DIRECTORY',
|
||||
PICLIST_AUTO_START: 'PICLIST_AUTO_START',
|
||||
PICLIST_AUTO_START_STATUS: 'PICLIST_AUTO_START_STATUS',
|
||||
|
||||
// shortkey setting rpc
|
||||
SHORTKEY_UPDATE: 'SHORTKEY_UPDATE',
|
||||
|
||||
Reference in New Issue
Block a user