enhance(frontend): インストールしたテーマをデバイス間で同期できるように
This commit is contained in:
parent
bd8162c2bd
commit
a5f9eba974
|
@ -5662,6 +5662,10 @@ export interface Locale extends ILocale {
|
||||||
* オフのとき
|
* オフのとき
|
||||||
*/
|
*/
|
||||||
"ifOff": string;
|
"ifOff": string;
|
||||||
|
/**
|
||||||
|
* デバイス間でインストールしたテーマを同期
|
||||||
|
*/
|
||||||
|
"enableSyncThemesBetweenDevices": string;
|
||||||
"_chat": {
|
"_chat": {
|
||||||
/**
|
/**
|
||||||
* 送信者の名前を表示
|
* 送信者の名前を表示
|
||||||
|
|
|
@ -1416,6 +1416,7 @@ _settings:
|
||||||
showNavbarSubButtons: "ナビゲーションバーに副ボタンを表示"
|
showNavbarSubButtons: "ナビゲーションバーに副ボタンを表示"
|
||||||
ifOn: "オンのとき"
|
ifOn: "オンのとき"
|
||||||
ifOff: "オフのとき"
|
ifOff: "オフのとき"
|
||||||
|
enableSyncThemesBetweenDevices: "デバイス間でインストールしたテーマを同期"
|
||||||
|
|
||||||
_chat:
|
_chat:
|
||||||
showSenderName: "送信者の名前を表示"
|
showSenderName: "送信者の名前を表示"
|
||||||
|
|
|
@ -181,6 +181,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<SearchMarker :keywords="['sync', 'themes', 'devices']">
|
||||||
|
<MkSwitch :modelValue="themesSyncEnabled" @update:modelValue="changeThemesSyncEnabled">
|
||||||
|
<template #label><SearchLabel>{{ i18n.ts._settings.enableSyncThemesBetweenDevices }}</SearchLabel></template>
|
||||||
|
</MkSwitch>
|
||||||
|
</SearchMarker>
|
||||||
|
|
||||||
<FormSection>
|
<FormSection>
|
||||||
<div class="_formLinksGrid">
|
<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>
|
<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 headerActions = computed(() => []);
|
||||||
|
|
||||||
const headerTabs = computed(() => []);
|
const headerTabs = computed(() => []);
|
||||||
|
|
|
@ -37,6 +37,11 @@ export const searchIndexes: SearchIndexItem[] = [
|
||||||
label: i18n.ts.themeForDarkMode,
|
label: i18n.ts.themeForDarkMode,
|
||||||
keywords: ['dark', 'theme'],
|
keywords: ['dark', 'theme'],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'jwW5HULqA',
|
||||||
|
label: i18n.ts._settings.enableSyncThemesBetweenDevices,
|
||||||
|
keywords: ['sync', 'themes', 'devices'],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
label: i18n.ts.theme,
|
label: i18n.ts.theme,
|
||||||
keywords: ['theme'],
|
keywords: ['theme'],
|
||||||
|
|
Loading…
Reference in New Issue