summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/settings/theme.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/pages/settings/theme.vue')
-rw-r--r--packages/frontend/src/pages/settings/theme.vue20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/frontend/src/pages/settings/theme.vue b/packages/frontend/src/pages/settings/theme.vue
index d149849afc..adc93ff7a7 100644
--- a/packages/frontend/src/pages/settings/theme.vue
+++ b/packages/frontend/src/pages/settings/theme.vue
@@ -181,6 +181,12 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
</div>
+ <SearchMarker :keywords="['sync', 'themes', 'devices']">
+ <MkSwitch :modelValue="themesSyncEnabled" @update:modelValue="changeThemesSyncEnabled">
+ <template #label><SearchLabel>{{ i18n.ts._settings.enableSyncThemesBetweenDevices }}</SearchLabel></template>
+ </MkSwitch>
+ </SearchMarker>
+
<FormSection>
<div class="_formLinksGrid">
<FormLink to="/settings/theme/manage"><template #icon><i class="ti ti-tool"></i></template>{{ i18n.ts._theme.manage }}<template #suffix>{{ themesCount }}</template></FormLink>
@@ -264,6 +270,20 @@ watch(syncDeviceDarkMode, () => {
}
});
+const themesSyncEnabled = ref(prefer.isSyncEnabled('themes'));
+
+function changeThemesSyncEnabled(value: boolean) {
+ if (value) {
+ prefer.enableSync('themes').then((res) => {
+ if (res == null) return;
+ if (res.enabled) themesSyncEnabled.value = true;
+ });
+ } else {
+ prefer.disableSync('themes');
+ themesSyncEnabled.value = false;
+ }
+}
+
const headerActions = computed(() => []);
const headerTabs = computed(() => []);