summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-04-02 10:09:25 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-04-02 10:09:25 +0900
commita5f9eba974849fa2fcbad4814d509b04c963ef23 (patch)
tree7a6864aff85d8877c9c293e2d647219e99039607
parentBump version to 2025.4.0-beta.0 (diff)
downloadsharkey-a5f9eba974849fa2fcbad4814d509b04c963ef23.tar.gz
sharkey-a5f9eba974849fa2fcbad4814d509b04c963ef23.tar.bz2
sharkey-a5f9eba974849fa2fcbad4814d509b04c963ef23.zip
enhance(frontend): インストールしたテーマをデバイス間で同期できるように
-rw-r--r--locales/index.d.ts4
-rw-r--r--locales/ja-JP.yml1
-rw-r--r--packages/frontend/src/pages/settings/theme.vue20
-rw-r--r--packages/frontend/src/utility/autogen/settings-search-index.ts5
4 files changed, 30 insertions, 0 deletions
diff --git a/locales/index.d.ts b/locales/index.d.ts
index 2c64a6d373..177c9685a1 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -5662,6 +5662,10 @@ export interface Locale extends ILocale {
* オフのとき
*/
"ifOff": string;
+ /**
+ * デバイス間でインストールしたテーマを同期
+ */
+ "enableSyncThemesBetweenDevices": string;
"_chat": {
/**
* 送信者の名前を表示
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 322506965c..483ece655d 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -1416,6 +1416,7 @@ _settings:
showNavbarSubButtons: "ナビゲーションバーに副ボタンを表示"
ifOn: "オンのとき"
ifOff: "オフのとき"
+ enableSyncThemesBetweenDevices: "デバイス間でインストールしたテーマを同期"
_chat:
showSenderName: "送信者の名前を表示"
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(() => []);
diff --git a/packages/frontend/src/utility/autogen/settings-search-index.ts b/packages/frontend/src/utility/autogen/settings-search-index.ts
index 08ab0d8811..7f800d2b70 100644
--- a/packages/frontend/src/utility/autogen/settings-search-index.ts
+++ b/packages/frontend/src/utility/autogen/settings-search-index.ts
@@ -37,6 +37,11 @@ export const searchIndexes: SearchIndexItem[] = [
label: i18n.ts.themeForDarkMode,
keywords: ['dark', 'theme'],
},
+ {
+ id: 'jwW5HULqA',
+ label: i18n.ts._settings.enableSyncThemesBetweenDevices,
+ keywords: ['sync', 'themes', 'devices'],
+ },
],
label: i18n.ts.theme,
keywords: ['theme'],