From 29c9a7d71a6d4af4f8d7d6a1c31a3734ca234180 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 10 Apr 2023 10:22:25 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E5=B8=B8=E3=81=AB?= =?UTF-8?q?=E5=BA=83=E5=91=8A=E3=82=92=E8=A6=8B=E3=82=89=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + locales/ja-JP.yml | 1 + packages/frontend/src/components/global/MkAd.vue | 2 +- packages/frontend/src/pages/settings/general.vue | 2 ++ packages/frontend/src/store.ts | 4 ++++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 832130a79..683ee3db8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - ### Client +- 常に広告を見られるオプションを追加 - ユーザーページの画像一覧が表示されない問題を修正 ### Server diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 32bf47c20..b01699cab 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -991,6 +991,7 @@ largeNoteReactions: "ノートのリアクションを大きく表示" noteIdOrUrl: "ノートIDまたはURL" accountMigration: "アカウントの引っ越し" accountMoved: "このユーザーは新しいアカウントに引っ越しました:" +forceShowAds: "常に広告を表示する" _accountMigration: moveTo: "このアカウントを新しいアカウントに引っ越す" diff --git a/packages/frontend/src/components/global/MkAd.vue b/packages/frontend/src/components/global/MkAd.vue index 5799f99d5..aa975600f 100644 --- a/packages/frontend/src/components/global/MkAd.vue +++ b/packages/frontend/src/components/global/MkAd.vue @@ -83,7 +83,7 @@ const choseAd = (): Ad | null => { }; const chosen = ref(choseAd()); -const shouldHide = $ref($i && $i.policies.canHideAds && (props.specify == null)); +const shouldHide = $ref(!defaultStore.state.forceShowAds && $i && $i.policies.canHideAds && (props.specify == null)); function reduceFrequency(): void { if (chosen.value == null) return; diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index f88e934e1..904fd3f95 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -61,6 +61,7 @@ {{ i18n.ts.squareAvatars }} {{ i18n.ts.useSystemFont }} {{ i18n.ts.disableDrawer }} + {{ i18n.ts.forceShowAds }}
@@ -157,6 +158,7 @@ const advancedMfm = computed(defaultStore.makeGetterSetter('advancedMfm')); const emojiStyle = computed(defaultStore.makeGetterSetter('emojiStyle')); const disableDrawer = computed(defaultStore.makeGetterSetter('disableDrawer')); const disableShowingAnimatedImages = computed(defaultStore.makeGetterSetter('disableShowingAnimatedImages')); +const forceShowAds = computed(defaultStore.makeGetterSetter('forceShowAds')); const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages')); const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab')); const nsfw = computed(defaultStore.makeGetterSetter('nsfw')); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index e5558829d..0728fc84e 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -298,6 +298,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: false, }, + forceShowAds: { + where: 'device', + default: false, + }, aiChanMode: { where: 'device', default: false,