update
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user