summaryrefslogtreecommitdiff
path: root/src/client/app/mobile
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-07 17:05:05 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-07 17:05:05 +0900
commit10c932876de62be82454fb4699e6306a1c3c912d (patch)
treec8df69c05afb5b38705ca8b581281fc7fa5b7a51 /src/client/app/mobile
parentFix #1569 (diff)
downloadmisskey-10c932876de62be82454fb4699e6306a1c3c912d.tar.gz
misskey-10c932876de62be82454fb4699e6306a1c3c912d.tar.bz2
misskey-10c932876de62be82454fb4699e6306a1c3c912d.zip
Better banner redering
Diffstat (limited to 'src/client/app/mobile')
-rw-r--r--src/client/app/mobile/views/pages/user.vue9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue
index 12874421d1..27482dc215 100644
--- a/src/client/app/mobile/views/pages/user.vue
+++ b/src/client/app/mobile/views/pages/user.vue
@@ -5,7 +5,7 @@
<div class="is-suspended" v-if="user.isSuspended"><p>%fa:exclamation-triangle% %i18n:@is-suspended%</p></div>
<div class="is-remote" v-if="user.host != null"><p>%fa:exclamation-triangle% %i18n:@is-remote%<a :href="user.url || user.uri" target="_blank">%i18n:@view-remote%</a></p></div>
<header>
- <div class="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''"></div>
+ <div class="banner" :style="style"></div>
<div class="body">
<div class="top">
<a class="avatar">
@@ -80,6 +80,13 @@ export default Vue.extend({
computed: {
age(): number {
return age(this.user.profile.birthday);
+ },
+ style(): any {
+ if (this.user.bannerUrl == null) return {};
+ return {
+ backgroundColor: this.user.bannerColor ? `rgb(${ this.user.bannerColor.join(',') })` : null,
+ backgroundImage: `url(${ this.user.bannerUrl })`
+ };
}
},
watch: {