Add user options to hide instance favicon and name
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
eris 2022-08-01 23:03:04 +00:00
parent 3518ae1cf5
commit f7222c9c83
8 changed files with 34 additions and 4 deletions

View file

@ -73,7 +73,16 @@ export default {
}) })
}, },
logo () { return this.$store.state.instance.logo }, logo () { return this.$store.state.instance.logo },
mergedConfig () {
return this.$store.getters.mergedConfig
},
sitename () { return this.$store.state.instance.name }, sitename () { return this.$store.state.instance.name },
hideSiteFavicon () {
return this.mergedConfig.hideSiteFavicon
},
hideSiteName () {
return this.mergedConfig.hideSiteName
},
hideSitename () { return this.$store.state.instance.hideSitename }, hideSitename () { return this.$store.state.instance.hideSitename },
logoLeft () { return this.$store.state.instance.logoLeft }, logoLeft () { return this.$store.state.instance.logoLeft },
currentUser () { return this.$store.state.users.currentUser }, currentUser () { return this.$store.state.users.currentUser },

View file

@ -13,11 +13,12 @@
active-class="home" active-class="home"
> >
<img <img
v-if="!hideSiteFavicon"
class="favicon" class="favicon"
src="/favicon.png" src="/favicon.png"
> >
<span <span
v-if="!hideSitename" v-if="!hideSiteName"
class="site-name" class="site-name"
> >
{{ sitename }} {{ sitename }}

View file

@ -41,7 +41,12 @@ const MobileNav = {
unseenNotificationsCount () { unseenNotificationsCount () {
return this.unseenNotifications.length return this.unseenNotifications.length
}, },
hideSitename () { return this.$store.state.instance.hideSitename }, mergedConfig () {
return this.$store.getters.mergedConfig
},
hideSiteName () {
return this.mergedConfig.hideSiteName
},
sitename () { return this.$store.state.instance.name } sitename () { return this.$store.state.instance.name }
}, },
methods: { methods: {

View file

@ -22,7 +22,7 @@
/> />
</button> </button>
<router-link <router-link
v-if="!hideSitename" v-if="!hideSiteName"
class="site-name" class="site-name"
:to="{ name: 'root' }" :to="{ name: 'root' }"
active-class="home" active-class="home"

View file

@ -25,6 +25,16 @@
{{ $t('settings.hide_wallpaper') }} {{ $t('settings.hide_wallpaper') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<li>
<BooleanSetting path="hideSiteFavicon">
{{ $t('settings.hide_site_favicon') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="hideSiteName">
{{ $t('settings.hide_site_name') }}
</BooleanSetting>
</li>
<li> <li>
<BooleanSetting path="stopGifs"> <BooleanSetting path="stopGifs">
{{ $t('settings.stop_gifs') }} {{ $t('settings.stop_gifs') }}

View file

@ -458,6 +458,8 @@
"hide_muted_threads": "Hide muted threads", "hide_muted_threads": "Hide muted threads",
"hide_post_stats": "Hide post statistics (e.g. the number of favorites)", "hide_post_stats": "Hide post statistics (e.g. the number of favorites)",
"hide_shoutbox": "Hide instance shoutbox", "hide_shoutbox": "Hide instance shoutbox",
"hide_site_favicon": "Hide instance favicon in top panel",
"hide_site_name": "Hide instance name in top panel",
"hide_user_stats": "Hide user statistics (e.g. the number of followers)", "hide_user_stats": "Hide user statistics (e.g. the number of followers)",
"hide_wallpaper": "Hide instance wallpaper", "hide_wallpaper": "Hide instance wallpaper",
"hide_wordfiltered_statuses": "Hide word-filtered statuses", "hide_wordfiltered_statuses": "Hide word-filtered statuses",

View file

@ -35,6 +35,8 @@ export const defaultState = {
muteBotStatuses: undefined, // instance default muteBotStatuses: undefined, // instance default
collapseMessageWithSubject: undefined, // instance default collapseMessageWithSubject: undefined, // instance default
padEmoji: true, padEmoji: true,
hideSiteFavicon: undefined, // instance default
hideSiteName: undefined, // instance default
hideAttachments: false, hideAttachments: false,
hideAttachmentsInConv: false, hideAttachmentsInConv: false,
maxThumbnails: 16, maxThumbnails: 16,

View file

@ -33,7 +33,8 @@ const defaultState = {
hideWordFilteredPosts: false, hideWordFilteredPosts: false,
hidePostStats: false, hidePostStats: false,
hideBotIndication: false, hideBotIndication: false,
hideSitename: false, hideSiteFavicon: false,
hideSiteName: false,
hideUserStats: false, hideUserStats: false,
muteBotStatuses: false, muteBotStatuses: false,
loginMethod: 'password', loginMethod: 'password',