diff --git a/locales/en-US.yml b/locales/en-US.yml index d8d6855d62..dfbab848fa 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -292,6 +292,7 @@ location: "Location" theme: "Themes" themeForLightMode: "Theme to use in Light Mode" themeForDarkMode: "Theme to use in Dark Mode" +gamingMode: "Gaming Mode" light: "Light" dark: "Dark" lightThemes: "Light themes" diff --git a/locales/index.d.ts b/locales/index.d.ts index 59295664cb..88183b810a 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -295,6 +295,7 @@ export interface Locale { "theme": string; "themeForLightMode": string; "themeForDarkMode": string; + "gamingMode": string; "light": string; "dark": string; "lightThemes": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index a9c11bbba2..13c2498a81 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -292,6 +292,7 @@ location: "場所" theme: "テーマ" themeForLightMode: "ライトモードで使うテーマ" themeForDarkMode: "ダークモードで使うテーマ" +gamingMode: 'ゲーミングモード' light: "ライト" dark: "ダーク" lightThemes: "明るいテーマ" diff --git a/packages/frontend/src/components/MkButton.vue b/packages/frontend/src/components/MkButton.vue index bcd58ae516..2647ad1490 100644 --- a/packages/frontend/src/components/MkButton.vue +++ b/packages/frontend/src/components/MkButton.vue @@ -4,285 +4,440 @@ SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index b1229cd1ba..709fd2d516 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -123,6 +123,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.cellularWithDataSaver }} {{ i18n.ts.UltimateDataSaver }} {{ i18n.ts.cellularWithUltimateDataSaver }} + {{ i18n.ts.gamingMode }}
@@ -255,7 +256,7 @@ const notificationPosition = computed(defaultStore.makeGetterSetter('notificatio const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); const showTimelineReplies = computed(defaultStore.makeGetterSetter('showTimelineReplies')); const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn')); - +const enableGamingMode = computed(defaultStore.makeGetterSetter('gamingMode')); watch(lang, () => { diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 712f8605a2..0b4f826919 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -136,6 +136,11 @@ const headerTabs = $computed(() => [{ title: i18n.ts._timelines.local, icon: 'ti ti-planet', iconOnly: true, +}, { + key: 'media', + title: i18n.ts._timelines.media, + icon: 'ti ti-photo', + iconOnly: true, }, { key: 'social', title: i18n.ts._timelines.social, diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index f9ee966797..27de6d150c 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -270,6 +270,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: false, }, + gamingMode: { + where: 'device', + default: false, + }, bannerUrl:{ where: 'device', default: bannerDark diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue index 7c76c5fe6c..89c16473ae 100644 --- a/packages/frontend/src/ui/_common_/navbar.vue +++ b/packages/frontend/src/ui/_common_/navbar.vue @@ -10,11 +10,13 @@ SPDX-License-Identifier: AGPL-3.0-only
- + {{ i18n.ts.timeline }} @@ -26,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only v-else-if="navbarItemDef[item] && (navbarItemDef[item].show !== false)" v-tooltip.noDelay.right="navbarItemDef[item].title" class="_button" - :class="[$style.item, { [$style.active]: navbarItemDef[item].active }]" + :class="[$style.item, { [$style.active]: gaming === '' && navbarItemDef[item].active, [$style.gamingDark]: gaming === 'dark',[$style.gamingLight]: gaming === 'light' }]" :activeClass="$style.active" :to="navbarItemDef[item].to" v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}" @@ -38,25 +40,27 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.controlPanel }} - - {{ i18n.ts.settings }}
-