Compare commits

...

7 commits

Author SHA1 Message Date
Kainoa Kanter
a8de112fe0
Merge branch 'develop' into toggle-ads 2022-07-14 17:48:59 -07:00
Kainoa Kanter
32115b5ca5
Delete 1657759324648-show-ads.js 2022-07-14 17:41:10 -07:00
ThatOneCalculator
d16afd3d13 spacing 2022-07-13 23:54:22 -07:00
ThatOneCalculator
38e0ff9875 fix 2022-07-13 18:28:11 -07:00
ThatOneCalculator
4684d279ae typo 2022-07-13 18:19:18 -07:00
ThatOneCalculator
6f2036565b fix 2022-07-13 18:19:01 -07:00
ThatOneCalculator
9b316c3ee7 Make showing ads toggleable 2022-07-13 17:54:12 -07:00
4 changed files with 11 additions and 1 deletions

View file

@ -887,6 +887,7 @@ beta: "ベータ"
enableAutoSensitive: "自動NSFW判定"
enableAutoSensitiveDescription: "利用可能な場合は、機械学習を利用して自動でメディアにNSFWフラグを設定します。この機能をオフにしても、インスタンスによっては自動で設定されることがあります。"
activeEmailValidationDescription: "ユーザーのメールアドレスのバリデーションを、捨てアドかどうかや実際に通信可能かどうかなどを判定しより積極的に行います。オフにすると単に文字列として正しいかどうかのみチェックされます。"
showAds: "広告を表示する"
navbar: "ナビゲーションバー"
_sensitiveMediaDetection:

View file

@ -1,5 +1,5 @@
<template>
<div v-if="ad" class="qiivuoyo">
<div v-if="ad && showAds" class="qiivuoyo">
<div v-if="!showMenu" class="main" :class="ad.place">
<a :href="ad.url" target="_blank">
<img :src="ad.imageUrl">
@ -44,6 +44,7 @@ export default defineComponent({
setup(props) {
const showMenu = ref(false);
const showAds = defaultStore.state.showAds;
const toggleMenu = () => {
showMenu.value = !showMenu.value;
};
@ -104,6 +105,7 @@ export default defineComponent({
return {
ad: chosen,
showMenu,
showAds,
toggleMenu,
host,
reduceFrequency,

View file

@ -39,6 +39,7 @@
<FormSection>
<template #label>{{ i18n.ts.appearance }}</template>
<FormSwitch v-model="showAds" class="_formBlock">{{ i18n.ts.showAds }}</FormSwitch>
<FormSwitch v-model="disableAnimatedMfm" class="_formBlock">{{ i18n.ts.disableAnimatedMfm }}</FormSwitch>
<FormSwitch v-model="reduceAnimation" class="_formBlock">{{ i18n.ts.reduceUiAnimation }}</FormSwitch>
<FormSwitch v-model="useBlurEffect" class="_formBlock">{{ i18n.ts.useBlurEffect }}</FormSwitch>
@ -128,6 +129,7 @@ const reduceAnimation = computed(defaultStore.makeGetterSetter('animation', v =>
const useBlurEffectForModal = computed(defaultStore.makeGetterSetter('useBlurEffectForModal'));
const useBlurEffect = computed(defaultStore.makeGetterSetter('useBlurEffect'));
const showGapBetweenNotesInTimeline = computed(defaultStore.makeGetterSetter('showGapBetweenNotesInTimeline'));
const showAds = computed(defaultStore.makeGetterSetter('showAds'));
const disableAnimatedMfm = computed(defaultStore.makeGetterSetter('animatedMfm', v => !v, v => !v));
const useOsNativeEmojis = computed(defaultStore.makeGetterSetter('useOsNativeEmojis'));
const disableDrawer = computed(defaultStore.makeGetterSetter('disableDrawer'));
@ -175,6 +177,7 @@ watch([
showGapBetweenNotesInTimeline,
instanceTicker,
overridedDeviceKind,
showAds,
], async () => {
await reloadAsk();
});

View file

@ -63,6 +63,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'account',
default: [] as string[],
},
showAds: {
where: 'account',
default: true,
},
menu: {
where: 'deviceAccount',