logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 3cc6f80628233c8b67912af868062f34bd49655a
parent: abb6747f43f7b903c9ffb643a713e8720938d2af
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Wed, 11 Dec 2019 15:59:46 +0000

Merge branch 'hideSitename' into 'develop'

Hide instance url/link/text in header using hideSitename instance option

See merge request pleroma/pleroma-fe!1018

Diffstat:

Mdocs/CONFIGURATION.md3+++
Msrc/App.js1+
Msrc/App.vue1+
Msrc/boot/after_store.js1+
Msrc/components/mobile_nav/mobile_nav.js1+
Msrc/components/mobile_nav/mobile_nav.vue1+
Msrc/components/side_drawer/side_drawer.js3+++
Msrc/components/side_drawer/side_drawer.vue2+-
Msrc/modules/instance.js1+
9 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md @@ -77,6 +77,9 @@ Use custom image for NSFW'd images ### `showFeaturesPanel` Show panel showcasing instance features/settings to logged-out visitors +### `hideSitename` +Hide instance name in header + ## Indirect configuration Some features are configured depending on how backend is configured. In general the approach is "if backend allows it there's no need to hide it, if backend doesn't allow it there's no need to show it. diff --git a/src/App.js b/src/App.js @@ -90,6 +90,7 @@ export default { }, sitename () { return this.$store.state.instance.name }, chat () { return this.$store.state.chat.channel.state === 'joined' }, + hideSitename () { return this.$store.state.instance.hideSitename }, suggestionsEnabled () { return this.$store.state.instance.suggestionsEnabled }, showInstanceSpecificPanel () { return this.$store.state.instance.showInstanceSpecificPanel && diff --git a/src/App.vue b/src/App.vue @@ -31,6 +31,7 @@ </div> <div class="item"> <router-link + v-if="!hideSitename" class="site-name" :to="{ name: 'root' }" active-class="home" diff --git a/src/boot/after_store.js b/src/boot/after_store.js @@ -108,6 +108,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('alwaysShowSubjectInput') copyInstanceOption('noAttachmentLinks') copyInstanceOption('showFeaturesPanel') + copyInstanceOption('hideSitename') return store.dispatch('setTheme', config['theme']) } diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js @@ -29,6 +29,7 @@ const MobileNav = { unseenNotificationsCount () { return this.unseenNotifications.length }, + hideSitename () { return this.$store.state.instance.hideSitename }, sitename () { return this.$store.state.instance.name } }, methods: { diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue @@ -17,6 +17,7 @@ <i class="button-icon icon-menu" /> </a> <router-link + v-if="!hideSitename" class="site-name" :to="{ name: 'root' }" active-class="home" diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js @@ -33,6 +33,9 @@ const SideDrawer = { logo () { return this.$store.state.instance.logo }, + hideSitename () { + return this.$store.state.instance.hideSitename + }, sitename () { return this.$store.state.instance.name }, diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue @@ -27,7 +27,7 @@ class="side-drawer-logo-wrapper" > <img :src="logo"> - <span>{{ sitename }}</span> + <span v-if="!hideSitename">{{ sitename }}</span> </div> </div> <ul> diff --git a/src/modules/instance.js b/src/modules/instance.js @@ -27,6 +27,7 @@ const defaultState = { scopeCopy: true, subjectLineBehavior: 'email', postContentType: 'text/plain', + hideSitename: false, nsfwCensorImage: undefined, vapidPublicKey: undefined, noAttachmentLinks: false,