mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-11-21 19:57:05 +01:00
fix(frontend): タイムラインで、広告がない際にも広告のwrapperが出てしまうのを修正 (#14763)
This commit is contained in:
parent
088e05ea66
commit
d0bb0b51f5
1 changed files with 9 additions and 2 deletions
|
@ -9,6 +9,7 @@ import MkAd from '@/components/global/MkAd.vue';
|
|||
import { isDebuggerEnabled, stackTraceInstances } from '@/debug.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from '@/os.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { MisskeyEntity } from '@/types/date-separated-list.js';
|
||||
|
||||
|
@ -99,10 +100,10 @@ export default defineComponent({
|
|||
|
||||
return [el, separator];
|
||||
} else {
|
||||
if (props.ad && item._shouldInsertAd_) {
|
||||
if (props.ad && instance.ads.length > 0 && item._shouldInsertAd_) {
|
||||
return [h('div', {
|
||||
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 );',
|
||||
class: $style['ad-wrapper'],
|
||||
}, [h(MkAd, {
|
||||
prefer: ['horizontal', 'horizontal-big'],
|
||||
})]), el];
|
||||
|
@ -255,5 +256,11 @@ export default defineComponent({
|
|||
.date-2-icon {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.ad-wrapper {
|
||||
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);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in a new issue