fix(frontend): avoid naming confliction of MkAd
This commit is contained in:
parent
93fc2456b3
commit
7d842c1a95
|
@ -53,7 +53,7 @@ import { prefer } from '@/preferences.js';
|
||||||
type Ad = (typeof instance)['ads'][number];
|
type Ad = (typeof instance)['ads'][number];
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
prefer: string[];
|
preferForms: string[];
|
||||||
specify?: Ad;
|
specify?: Ad;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ const choseAd = (): Ad | null => {
|
||||||
ratio: 0,
|
ratio: 0,
|
||||||
} : ad);
|
} : ad);
|
||||||
|
|
||||||
let ads = allAds.filter(ad => props.prefer.includes(ad.place));
|
let ads = allAds.filter(ad => props.preferForms.includes(ad.place));
|
||||||
|
|
||||||
if (ads.length === 0) {
|
if (ads.length === 0) {
|
||||||
ads = allAds.filter(ad => ad.place === 'square');
|
ads = allAds.filter(ad => ad.place === 'square');
|
||||||
|
|
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<MkInfo v-else>{{ i18n.ts._chat.chatNotAvailableForThisAccountOrServer }}</MkInfo>
|
<MkInfo v-else>{{ i18n.ts._chat.chatNotAvailableForThisAccountOrServer }}</MkInfo>
|
||||||
|
|
||||||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
<MkAd :preferForms="['horizontal', 'horizontal-big']"/>
|
||||||
|
|
||||||
<MkInput
|
<MkInput
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
|
|
|
@ -51,7 +51,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkA v-if="$i && $i.id === flash.userId" :to="`/play/${flash.id}/edit`" style="color: var(--MI_THEME-accent);">{{ i18n.ts._play.editThisPage }}</MkA>
|
<MkA v-if="$i && $i.id === flash.userId" :to="`/play/${flash.id}/edit`" style="color: var(--MI_THEME-accent);">{{ i18n.ts._play.editThisPage }}</MkA>
|
||||||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
<MkAd :preferForms="['horizontal', 'horizontal-big']"/>
|
||||||
</div>
|
</div>
|
||||||
<MkError v-else-if="error" @retry="fetchFlash()"/>
|
<MkError v-else-if="error" @retry="fetchFlash()"/>
|
||||||
<MkLoading v-else/>
|
<MkLoading v-else/>
|
||||||
|
|
|
@ -42,7 +42,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkFollowButton v-if="!$i || $i.id != post.user.id" v-model:user="post.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
<MkFollowButton v-if="!$i || $i.id != post.user.id" v-model:user="post.user" :inline="true" :transparent="false" :full="true" large class="koudoku"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
<MkAd :preferForms="['horizontal', 'horizontal-big']"/>
|
||||||
<MkContainer :max-height="300" :foldable="true" class="other">
|
<MkContainer :max-height="300" :foldable="true" class="other">
|
||||||
<template #icon><i class="ti ti-clock"></i></template>
|
<template #icon><i class="ti ti-clock"></i></template>
|
||||||
<template #header>{{ i18n.ts.recentPosts }}</template>
|
<template #header>{{ i18n.ts.recentPosts }}</template>
|
||||||
|
|
|
@ -80,7 +80,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div v-if="page.createdAt != page.updatedAt"><i class="ti ti-clock-edit"></i> {{ i18n.ts.updatedAt }}: <MkTime :time="page.updatedAt" mode="detail"/></div>
|
<div v-if="page.createdAt != page.updatedAt"><i class="ti ti-clock-edit"></i> {{ i18n.ts.updatedAt }}: <MkTime :time="page.updatedAt" mode="detail"/></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
<MkAd :preferForms="['horizontal', 'horizontal-big']"/>
|
||||||
<MkContainer :max-height="300" :foldable="true" class="other">
|
<MkContainer :max-height="300" :foldable="true" class="other">
|
||||||
<template #icon><i class="ti ti-clock"></i></template>
|
<template #icon><i class="ti ti-clock"></i></template>
|
||||||
<template #header>{{ i18n.ts.recentPosts }}</template>
|
<template #header>{{ i18n.ts.recentPosts }}</template>
|
||||||
|
|
Loading…
Reference in New Issue