forked from FoundKeyGang/FoundKey
チャンネル一覧でバナーが無いとチャンネル名が出ないのを修正 (#6778)
This commit is contained in:
parent
42162c8015
commit
0baed1a275
1 changed files with 11 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<MkA :to="`/channels/${channel.id}`" class="eftoefju _panel" tabindex="-1">
|
<MkA :to="`/channels/${channel.id}`" class="eftoefju _panel" tabindex="-1">
|
||||||
<div class="banner" v-if="channel.bannerUrl" :style="`background-image: url('${channel.bannerUrl}')`">
|
<div class="banner" :style="bannerStyle">
|
||||||
<div class="fade"></div>
|
<div class="fade"></div>
|
||||||
<div class="name"><Fa :icon="faSatelliteDish"/> {{ channel.name }}</div>
|
<div class="name"><Fa :icon="faSatelliteDish"/> {{ channel.name }}</div>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
|
@ -45,6 +45,16 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
bannerStyle() {
|
||||||
|
if (this.channel.bannerUrl) {
|
||||||
|
return { backgroundImage: `url(${this.channel.bannerUrl})` };
|
||||||
|
} else {
|
||||||
|
return { backgroundColor: '#4c5e6d' };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
faSatelliteDish, faUsers, faPencilAlt,
|
faSatelliteDish, faUsers, faPencilAlt,
|
||||||
|
|
Loading…
Reference in a new issue