feat(settings): keep dialog open after apply
This commit is contained in:
1 parent
fcdc7cfc07
commit
f45ee8f272
5 files changed
+23
-1
No files matched your search
@@ -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(
|
||||
<Button :disabled="!hasChanges() || hasBlockingShortcutConflicts" @click="applySettings">
|
||||
{{ t("settings.apply") }}
|
||||
</Button>
|
||||
<Button :disabled="!hasChanges() || hasBlockingShortcutConflicts" @click="applySettingsAndClose">
|
||||
{{ t("settings.applyAndClose") }}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
<DialogFooter
|
||||
|
||||
Reference in new issue
Block a user