From 4a92635eae79a28cbc26df44053d94ab8213fe80 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 9 Nov 2018 18:32:09 +0900 Subject: [PATCH] :art: --- .../views/components/profile-editor.vue | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/client/app/common/views/components/profile-editor.vue b/src/client/app/common/views/components/profile-editor.vue index d04ec56b0..8bb1841dc 100644 --- a/src/client/app/common/views/components/profile-editor.vue +++ b/src/client/app/common/views/components/profile-editor.vue @@ -2,7 +2,11 @@
{{ $t('title') }}
-
+
+
+ +
+ {{ $t('name') }} @@ -97,6 +101,14 @@ export default Vue.extend({ get() { return this.$store.state.i.settings.alwaysMarkNsfw; }, set(value) { this.$root.api('i/update', { alwaysMarkNsfw: value }); } }, + + bannerStyle(): any { + if (this.$store.state.i.bannerUrl == null) return {}; + return { + backgroundColor: this.$store.state.i.bannerColor && this.$store.state.i.bannerColor.length == 3 ? `rgb(${ this.$store.state.i.bannerColor.join(',') })` : null, + backgroundImage: `url(${ this.$store.state.i.bannerUrl })` + }; + }, }, created() { @@ -190,3 +202,26 @@ export default Vue.extend({ } }); + +