From d0c78989aa9e5f5142dbc09a8935c004a2050257 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sun, 1 Dec 2019 19:34:01 -0500
Subject: [PATCH 1/2] hide instance url/link/text in header using hideSitename
option
---
src/App.js | 1 +
src/App.vue | 1 +
src/boot/after_store.js | 1 +
src/components/mobile_nav/mobile_nav.js | 1 +
src/components/mobile_nav/mobile_nav.vue | 1 +
src/components/side_drawer/side_drawer.js | 3 +++
src/components/side_drawer/side_drawer.vue | 2 +-
src/modules/instance.js | 1 +
8 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/App.js b/src/App.js
index 04a40e30..78ff29da 100644
--- 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
index dbe842ec..c66df843 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -31,6 +31,7 @@
{
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
index 5a90c31f..c1166a0c 100644
--- 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
index d1c24e56..51f1d636 100644
--- a/src/components/mobile_nav/mobile_nav.vue
+++ b/src/components/mobile_nav/mobile_nav.vue
@@ -17,6 +17,7 @@
- {{ sitename }}
+ {{ sitename }}
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 96f14ed5..625323b9 100644
--- 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,
From fee3226705beb4b6eddb8e64f8c53b2651ca89fa Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 9 Dec 2019 15:21:33 -0500
Subject: [PATCH 2/2] add documentation for new instance option
---
docs/CONFIGURATION.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md
index 35363537..3a21828b 100644
--- 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.