summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortakonomura <takonomura@users.noreply.github.com>2020-10-31 05:53:02 +0900
committerGitHub <noreply@github.com>2020-10-31 05:53:02 +0900
commit0baed1a27534bb4aa302783e27d3cea4237e5994 (patch)
tree1e6f4d42b1981d65053354a38aa6a6f27e9ae0c0 /src
parentTOOLS: Created demote tool based on mark-admin.ts (#6776) (diff)
downloadsharkey-0baed1a27534bb4aa302783e27d3cea4237e5994.tar.gz
sharkey-0baed1a27534bb4aa302783e27d3cea4237e5994.tar.bz2
sharkey-0baed1a27534bb4aa302783e27d3cea4237e5994.zip
チャンネル一覧でバナーが無いとチャンネル名が出ないのを修正 (#6778)
Diffstat (limited to 'src')
-rw-r--r--src/client/components/channel-preview.vue12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/components/channel-preview.vue b/src/client/components/channel-preview.vue
index e5676e5ae9..41be1c296d 100644
--- a/src/client/components/channel-preview.vue
+++ b/src/client/components/channel-preview.vue
@@ -1,6 +1,6 @@
<template>
<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="name"><Fa :icon="faSatelliteDish"/> {{ channel.name }}</div>
<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() {
return {
faSatelliteDish, faUsers, faPencilAlt,