diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue
index 06a8d4319..703039829 100644
--- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue
+++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue
@@ -276,7 +276,7 @@ function hasChanges(): boolean {
);
}
-async function applySettings() {
+async function persistSettings() {
if (hasBlockingShortcutConflicts.value) return;
settingsStore.updateEditorSettings({
fontFamily: editFontFamily.value,
@@ -299,6 +299,14 @@ async function applySettings() {
await settingsStore.updateDesktopSettings({
show_tray_icon: editShowTrayIcon.value,
});
+}
+
+async function applySettings() {
+ await persistSettings();
+}
+
+async function applySettingsAndClose() {
+ await persistSettings();
emit("update:open", false);
}
@@ -1796,6 +1804,9 @@ watch(
+
{
assert.match(source, /:disabled="!hasChanges\(\) \|\| hasBlockingShortcutConflicts"/);
});
+test("settings dialog exposes separate apply and apply-and-close actions", () => {
+ assert.match(source, /async function persistSettings\(\)/);
+ assert.match(source, /async function applySettings\(\)/);
+ assert.match(source, /async function applySettingsAndClose\(\)/);
+ assert.match(source, /await persistSettings\(\);[\s\S]*emit\("update:open", false\)/);
+ assert.match(source, /t\("settings\.applyAndClose"\)/);
+});
+
test("settings dialog exposes sidebar activation in navigation settings", () => {
assert.match(source, /value: "navigation"/);
assert.match(source, /activeSettingsTab === ['"]navigation['"]/);