1
0
forked from mirror/misskey
This commit is contained in:
syuilo 2024-10-12 11:28:58 +09:00
parent ee08e9f51e
commit c4c69cd267
2 changed files with 10 additions and 14 deletions

View File

@ -100,10 +100,12 @@ export default defineComponent({
return [el, separator]; return [el, separator];
} else { } else {
if (props.ad && item._shouldInsertAd_) { if (props.ad && item._shouldInsertAd_) {
return [h(MkAd, { return [h('div', {
key: item.id + ':ad', key: item.id + ':ad',
style: 'padding: 8px; background-size: auto auto; background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, var(--MI_THEME-bg) 8px, var(--MI_THEME-bg) 14px );',
}, [h(MkAd, {
prefer: ['horizontal', 'horizontal-big'], prefer: ['horizontal', 'horizontal-big'],
}), el]; })]), el];
} else { } else {
return el; return el;
} }

View File

@ -30,14 +30,12 @@ SPDX-License-Identifier: AGPL-3.0-only
</component> </component>
</div> </div>
<div v-else :class="$style.menu"> <div v-else :class="$style.menu">
<div :class="$style.menuContainer">
<div>Ads by {{ host }}</div> <div>Ads by {{ host }}</div>
<!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>--> <!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>-->
<MkButton v-if="chosen.ratio !== 0" :class="$style.menuButton" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton> <MkButton v-if="chosen.ratio !== 0" :class="$style.menuButton" @click="reduceFrequency">{{ i18n.ts._ad.reduceFrequencyOfThisAd }}</MkButton>
<button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button> <button class="_textButton" @click="toggleMenu">{{ i18n.ts._ad.back }}</button>
</div> </div>
</div> </div>
</div>
<div v-else></div> <div v-else></div>
</template> </template>
@ -123,8 +121,7 @@ function reduceFrequency(): void {
<style lang="scss" module> <style lang="scss" module>
.root { .root {
background-size: auto auto;
background-image: repeating-linear-gradient(45deg, transparent, transparent 8px, var(--MI_THEME-bg) 8px, var(--MI_THEME-bg) 14px );
} }
.main { .main {
@ -202,14 +199,11 @@ function reduceFrequency(): void {
} }
.menu { .menu {
padding: 8px;
text-align: center; text-align: center;
}
.menuContainer {
padding: 8px; padding: 8px;
margin: 0 auto; margin: 0 auto;
max-width: 400px; max-width: 400px;
background: var(--MI_THEME-panel);
border: solid 1px var(--MI_THEME-divider); border: solid 1px var(--MI_THEME-divider);
} }