From eca09db5fb0431a2489da1586f93ed6ff5929626 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 3 Nov 2020 17:04:37 +0900 Subject: [PATCH] wip: Desktop UI --- locales/ja-JP.yml | 2 ++ src/client/sidebar.ts | 7 ++++--- src/client/ui/desktop.vue | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 13d6f9bd5..a88ac7441 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -602,6 +602,8 @@ instanceTicker: "ノートのインスタンス情報" waitingFor: "{x}を待っています" random: "ランダム" system: "システム" +switchUi: "UI切り替え" +desktop: "デスクトップ" _reversi: reversi: "リバーシ" diff --git a/src/client/sidebar.ts b/src/client/sidebar.ts index 1132431e1..b9cdd87a4 100644 --- a/src/client/sidebar.ts +++ b/src/client/sidebar.ts @@ -4,6 +4,7 @@ import { computed } from 'vue'; import { store } from '@/store'; import { search } from '@/scripts/search'; import * as os from '@/os'; +import { i18n } from '@/i18n'; export const sidebarDef = { notifications: { @@ -124,19 +125,19 @@ export const sidebarDef = { icon: faColumns, action: (ev) => { os.modalMenu([{ - text: 'Default', + text: i18n.global.t('default'), action: () => { localStorage.setItem('ui', 'default'); location.reload(); } }, { - text: 'Deck', + text: i18n.global.t('deck'), action: () => { localStorage.setItem('ui', 'deck'); location.reload(); } }, { - text: 'Desktop', + text: i18n.global.t('desktop'), action: () => { localStorage.setItem('ui', 'desktop'); location.reload(); diff --git a/src/client/ui/desktop.vue b/src/client/ui/desktop.vue index 0d266ae01..3f55c8329 100644 --- a/src/client/ui/desktop.vue +++ b/src/client/ui/desktop.vue @@ -59,6 +59,8 @@ export default defineComponent({