ability to disable sitename display

This commit is contained in:
Henry Jameson 2018-12-05 15:31:13 +03:00
parent cb9c800e5f
commit f87731f3f8
6 changed files with 18 additions and 5 deletions

View file

@ -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 }
},

View file

@ -267,6 +267,10 @@ nav {
}
}
.site-name {
display: flex;
}
.inner-nav {
display: flex;
align-items: center;

View file

@ -6,11 +6,15 @@
<router-link class="back-button" @click.native="activatePanel('timeline')" :to="{ name: 'root' }" active-class="hidden">
<i class="icon-left-open" :title="$t('nav.back')"></i>
</router-link>
<div class='logo' :style='logoBgStyle'>
<div class='mask' :style='logoMaskStyle'></div>
<img :src='logo' :style='logoStyle'>
</div>
<router-link class="site-name" :to="{ name: 'root' }" active-class="home">{{sitename}}</router-link>
<router-link class="site-name" :to="{ name: 'root' }" active-class="home">
<div class='logo' :style='logoBgStyle'>
<div class='mask' :style='logoMaskStyle'></div>
<img :src='logo' :style='logoStyle'>
</div>
<span v-if="sitenameEnabled" class="site-name_text">
{{sitename}}
</span>
</router-link>
</div>
<div class='item right'>
<user-finder class="nav-icon"></user-finder>

View file

@ -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')
}

View file

@ -25,6 +25,7 @@ const defaultState = {
scopeCopy: true,
subjectLineBehavior: 'email',
loginMethod: 'password',
sitenameEnabled: true,
// Nasty stuff
pleromaBackend: true,

View file

@ -14,6 +14,7 @@
"scopeCopy": false,
"subjectLineBehavior": "email",
"alwaysShowSubjectInput": true,
"sitenameEnabled": true,
"hidePostStats": false,
"hideUserStats": false,
"loginMethod": "password"