diff --git a/CHANGELOG.md b/CHANGELOG.md index 832130a79f..683ee3db87 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 32bf47c209..b01699cab4 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 5799f99d5f..aa975600f0 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 f88e934e1d..904fd3f952 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 e5558829d4..0728fc84e5 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,