This commit is contained in:
Baobhan Sith
2025-04-19 09:46:38 +08:00
parent bded8168ec
commit 49a4b34eb3
+3 -7
View File
@@ -259,13 +259,9 @@ watch(settings, (newSettings, oldSettings) => {
blacklistSettingsForm.maxLoginAttempts = newSettings.maxLoginAttempts || '5'; blacklistSettingsForm.maxLoginAttempts = newSettings.maxLoginAttempts || '5';
blacklistSettingsForm.loginBanDuration = newSettings.loginBanDuration || '300'; blacklistSettingsForm.loginBanDuration = newSettings.loginBanDuration || '300';
// Initialize local state only on initial load or if store changes externally // 始终将本地布尔状态与 store 的布尔 getter 同步
if (isInitialLoad || newSettings.showPopupFileEditor !== oldSettings?.showPopupFileEditor) { popupEditorEnabled.value = showPopupFileEditorBoolean.value;
popupEditorEnabled.value = showPopupFileEditorBoolean.value; shareTabsEnabled.value = shareFileEditorTabsBoolean.value;
}
if (isInitialLoad || newSettings.shareFileEditorTabs !== oldSettings?.shareFileEditorTabs) {
shareTabsEnabled.value = shareFileEditorTabsBoolean.value;
}
}, { deep: true, immediate: true }); // immediate: true to run on initial load }, { deep: true, immediate: true }); // immediate: true to run on initial load