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.note
@@ -85,25 +89,59 @@ import {instance} from '@/instance';
const iconOnly = ref(false);
let bannerUrl = ref(defaultStore.state.bannerUrl);
let iconUrl = ref();
+let gaming = ref('');
+const gamingMode = computed(defaultStore.makeGetterSetter('gamingMode'));
const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));
-if (darkMode.value){
+
+if (darkMode.value) {
bannerUrl.value = bannerDark;
iconUrl.value = iconDark;
-}else{
+} else {
bannerUrl.value = bannerLight;
iconUrl.value = iconLight;
}
+
watch(darkMode, () => {
- if (darkMode.value){
+ if (darkMode.value) {
bannerUrl.value = bannerDark;
iconUrl.value = iconDark;
- }else{
+ } else {
bannerUrl.value = bannerLight;
iconUrl.value = iconLight;
}
})
+// gaming.valueに新しい値を代入する
+if (darkMode.value && gamingMode.value == true) {
+ gaming.value = 'dark';
+} else if (!darkMode.value && gamingMode.value == true) {
+ gaming.value = 'light';
+} else {
+ gaming.value = '';
+}
+
+watch(darkMode, () => {
+ console.log(gaming)
+ if (darkMode.value && gamingMode.value == true) {
+ gaming.value = 'dark';
+ } else if (!darkMode.value && gamingMode.value == true) {
+ gaming.value = 'light';
+ } else {
+ gaming.value = '';
+ }
+})
+
+watch(gamingMode, () => {
+ if (darkMode.value && gamingMode.value == true) {
+ gaming.value = 'dark';
+ } else if (!darkMode.value && gamingMode.value == true) {
+ gaming.value = 'light';
+ } else {
+ gaming.value = '';
+ }
+})
+
const menu = computed(() => defaultStore.state.menu);
const otherMenuItemIndicated = computed(() => {
for (const def in navbarItemDef) {
@@ -243,6 +281,65 @@ function more(ev: MouseEvent) {
background: var(--accentLighten);
}
}
+
+ &.gamingLight:before {
+ content: "";
+ display: block;
+ width: calc(100% - 38px);
+ height: 100%;
+ margin: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ border-radius: 999px;
+ background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+
+ &.gamingLight:hover, &.gamingLight.active {
+ &.gamingLight:before {
+ background: linear-gradient(270deg, #d08c8c, #cfb28c, #dbdb8b, #95d08e, #8bdbdb, #94a9cf, #b09ecf, #cfa0cf, #e0a0bd);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
+
+ &.gamingDark:before {
+ content: "";
+ display: block;
+ width: calc(100% - 38px);
+ height: 100%;
+ margin: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ border-radius: 999px;
+ background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4);
+ background-size: 1800% 1800%;
+ -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ -moz-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ }
+
+ &.gamingDark:hover, &.gamingDark.active {
+ &.gamingDark:before {
+ background: linear-gradient(270deg, #a84f4f, #a88c4f, #9aa24b, #6da85c, #53a8a6, #7597b5, #8679b5, #b579b5, #b56d96);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
+
}
.postIcon {
@@ -331,6 +428,85 @@ function more(ev: MouseEvent) {
background: var(--accentedBg);
}
}
+
+ &.gamingDark:hover {
+ color: white;
+ background-size: 1800% 1800%;
+ text-decoration: none;
+ -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ -moz-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ }
+
+ &.gamingDark.active {
+ color: white;
+ background-size: 1800% 1800%;
+ -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ -moz-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ }
+
+ &.gamingDark:hover, &.gamingDark.active {
+ color: white;
+
+ &.gamingDark:before {
+ content: "";
+ display: block;
+ width: calc(100% - 34px);
+ height: 100%;
+ margin: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ border-radius: 999px;
+ background: linear-gradient(270deg, #a84f4f, #a88c4f, #9aa24b, #6da85c, #53a8a6, #7597b5, #8679b5, #b579b5, #b56d96);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
+
+ &.gamingLight:hover {
+ color: black;
+ background-size: 1800% 1800% !important;
+ text-decoration: none;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+
+ &.gamingLight:active {
+ color: black;
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+
+ &.gamingLight:hover, &.gamingLight.active {
+ color: black;
+ &.gamingLight:before {
+ content: "";
+ display: block;
+ width: calc(100% - 34px);
+ height: 100%;
+ margin: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ border-radius: 999px;
+ background: linear-gradient(270deg, #d08c8c, #cfb28c, #dbdb8b, #95d08e, #8bdbdb, #94a9cf, #b09ecf, #cfa0cf, #e0a0bd);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
}
.itemIcon {
@@ -421,6 +597,66 @@ function more(ev: MouseEvent) {
background: var(--accentLighten);
}
}
+
+ &.gamingLight:before {
+ content: "";
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ margin: auto;
+ width: 52px;
+ aspect-ratio: 1/1;
+ border-radius: 100%;
+ background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+
+ &.gamingLight:hover, &.gamingLight.active {
+ &.gamingLight:before {
+ background: linear-gradient(270deg, #d08c8c, #cfb28c, #dbdb8b, #95d08e, #8bdbdb, #94a9cf, #b09ecf, #cfa0cf, #e0a0bd);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
+
+ &.gamingDark:before {
+ content: "";
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ margin: auto;
+ width: 52px;
+ aspect-ratio: 1/1;
+ border-radius: 100%;
+ background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4);
+ background-size: 1800% 1800%;
+ -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ -moz-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite;
+ }
+
+ &.gamingDark:hover, &.gamingDark.active {
+ &.gamingDark:before {
+ background: linear-gradient(270deg, #a84f4f, #a88c4f, #9aa24b, #6da85c, #53a8a6, #7597b5, #8679b5, #b579b5, #b56d96);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
+
+
}
.postIcon {
@@ -489,6 +725,53 @@ function more(ev: MouseEvent) {
opacity: 1;
}
}
+
+ &.gamingDark:hover, &.gamingDark.active {
+ text-decoration: none;
+ color: var(--accent);
+
+ &.gamingDark:before {
+ content: "";
+ display: block;
+ height: 100%;
+ aspect-ratio: 1;
+ margin: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ border-radius: 999px;
+ background: linear-gradient(270deg, #a84f4f, #a88c4f, #9aa24b, #6da85c, #53a8a6, #7597b5, #8679b5, #b579b5, #b56d96);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationDark 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
+ &.gamingLight:hover, &.gamingLight.active {
+ text-decoration: none;
+ color: var(--accent);
+
+ &.gamingLight:before {
+ content: "";
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ margin: auto;
+ width: 52px;
+ aspect-ratio: 1/1;
+ border-radius: 100%;
+ background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd);
+ background-size: 1800% 1800% !important;
+ -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ -moz-animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ animation: AnimationLight 45s cubic-bezier(0, 0.25, 0.25, 1) infinite !important;
+ }
+ }
}
.itemIcon {
@@ -509,5 +792,72 @@ function more(ev: MouseEvent) {
font-size: 8px;
animation: blink 1s infinite;
}
+
+ @-webkit-keyframes AnimationLight {
+ 0% {
+ background-position: 0% 50%
+ }
+ 50% {
+ background-position: 100% 50%
+ }
+ 100% {
+ background-position: 0% 50%
+ }
+ }
+ @-moz-keyframes AnimationLight {
+ 0% {
+ background-position: 0% 50%
+ }
+ 50% {
+ background-position: 100% 50%
+ }
+ 100% {
+ background-position: 0% 50%
+ }
+ }
+ @keyframes AnimationLight {
+ 0% {
+ background-position: 0% 50%
+ }
+ 50% {
+ background-position: 100% 50%
+ }
+ 100% {
+ background-position: 0% 50%
+ }
+ }
+ @-webkit-keyframes AnimationDark {
+ 0% {
+ background-position: 0% 50%
+ }
+ 50% {
+ background-position: 100% 50%
+ }
+ 100% {
+ background-position: 0% 50%
+ }
+ }
+ @-moz-keyframes AnimationDark {
+ 0% {
+ background-position: 0% 50%
+ }
+ 50% {
+ background-position: 100% 50%
+ }
+ 100% {
+ background-position: 0% 50%
+ }
+ }
+ @keyframes AnimationDark {
+ 0% {
+ background-position: 0% 50%
+ }
+ 50% {
+ background-position: 100% 50%
+ }
+ 100% {
+ background-position: 0% 50%
+ }
+ }
}