From f87731f3f835ca9b406dcab45ee4256310e31aeb Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 5 Dec 2018 15:31:13 +0300 Subject: [PATCH] ability to disable sitename display --- src/App.js | 1 + src/App.scss | 4 ++++ src/App.vue | 14 +++++++++----- src/boot/after_store.js | 2 ++ src/modules/instance.js | 1 + static/config.json | 1 + 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index 97e82e7c..c64dbbce 100644 --- a/src/App.js +++ b/src/App.js @@ -63,6 +63,7 @@ export default { style () { return { 'background-image': `url(${this.background})` } }, sitename () { return this.$store.state.instance.name }, chat () { return this.$store.state.chat.channel.state === 'joined' }, + sitenameEnabled () { return this.$store.state.instance.sitenameEnabled }, suggestionsEnabled () { return this.$store.state.instance.suggestionsEnabled }, showInstanceSpecificPanel () { return this.$store.state.instance.showInstanceSpecificPanel } }, diff --git a/src/App.scss b/src/App.scss index de87c3de..62368bb0 100644 --- a/src/App.scss +++ b/src/App.scss @@ -267,6 +267,10 @@ nav { } } + .site-name { + display: flex; + } + .inner-nav { display: flex; align-items: center; diff --git a/src/App.vue b/src/App.vue index 1a0fe972..4adfad5a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,11 +6,15 @@ - - {{sitename}} + + + + {{sitename}} + +
diff --git a/src/boot/after_store.js b/src/boot/after_store.js index a80baaf5..b60162db 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -59,6 +59,7 @@ const afterStoreSetup = ({store, i18n}) => { var scopeCopy = (config.scopeCopy) var subjectLineBehavior = (config.subjectLineBehavior) var alwaysShowSubjectInput = (config.alwaysShowSubjectInput) + var sitenameEnabled = (config.sitenameEnabled) store.dispatch('setInstanceOption', { name: 'theme', value: theme }) store.dispatch('setInstanceOption', { name: 'background', value: background }) @@ -77,6 +78,7 @@ const afterStoreSetup = ({store, i18n}) => { store.dispatch('setInstanceOption', { name: 'scopeCopy', value: scopeCopy }) store.dispatch('setInstanceOption', { name: 'subjectLineBehavior', value: subjectLineBehavior }) store.dispatch('setInstanceOption', { name: 'alwaysShowSubjectInput', value: alwaysShowSubjectInput }) + store.dispatch('setInstanceOption', { name: 'sitenameEnabled', value: sitenameEnabled }) if (chatDisabled) { store.dispatch('disableChat') } diff --git a/src/modules/instance.js b/src/modules/instance.js index 641424b6..acbd9879 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -25,6 +25,7 @@ const defaultState = { scopeCopy: true, subjectLineBehavior: 'email', loginMethod: 'password', + sitenameEnabled: true, // Nasty stuff pleromaBackend: true, diff --git a/static/config.json b/static/config.json index c49930ef..5f0742b9 100644 --- a/static/config.json +++ b/static/config.json @@ -14,6 +14,7 @@ "scopeCopy": false, "subjectLineBehavior": "email", "alwaysShowSubjectInput": true, + "sitenameEnabled": true, "hidePostStats": false, "hideUserStats": false, "loginMethod": "password"