From 88c3957085f577babe5280b28a68a946101b9027 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 3 Feb 2023 14:03:34 +0900 Subject: [PATCH] enhance(client): hidden ads when canHideAds is true --- packages/frontend/src/components/global/MkAd.vue | 10 +--------- packages/frontend/src/store.ts | 4 ---- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/frontend/src/components/global/MkAd.vue b/packages/frontend/src/components/global/MkAd.vue index a518484a5d..2bb432e15f 100644 --- a/packages/frontend/src/components/global/MkAd.vue +++ b/packages/frontend/src/components/global/MkAd.vue @@ -11,7 +11,6 @@
Ads by {{ host }}
{{ $ts._ad.reduceFrequencyOfThisAd }} - {{ $ts._ad.hide }} @@ -83,7 +82,7 @@ const choseAd = (): Ad | null => { }; const chosen = ref(choseAd()); -let shouldHide = $ref(chosen.value && $i && $i.policies.canHideAds && defaultStore.state.hiddenAds.includes(chosen.value.id)); +const shouldHide = $ref($i && $i.policies.canHideAds); function reduceFrequency(): void { if (chosen.value == null) return; @@ -93,13 +92,6 @@ function reduceFrequency(): void { chosen.value = choseAd(); showMenu.value = false; } - -function hide() { - if (chosen.value == null) return; - defaultStore.push('hiddenAds', chosen.value.id); - os.success(); - shouldHide = true; -}