config option

This commit is contained in:
smitten 2023-07-26 16:50:06 -04:00
parent 68f0150712
commit 904e90e060
7 changed files with 19 additions and 3 deletions

View file

@ -193,6 +193,9 @@ const ExtraButtons = {
return this.status.external_url
}
},
showFediLinks () {
return this.$store.getters.mergedConfig.showFediLinks === true
},
fediLinkURL () {
try {
return this.statusLink.replace(/^https?/, 'web+ap')

View file

@ -128,7 +128,7 @@
/><span>{{ $t("status.copy_link") }}</span>
</button>
<button
v-if="fediLinkURL && loggedIn"
v-if="fediLinkURL && showFediLinks && loggedIn"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="copyFediLink"
@click="close"
@ -151,7 +151,7 @@
/><span>{{ $t("status.external_source") }}</span>
</a>
<a
v-if="fediLinkURL && !loggedIn"
v-if="fediLinkURL && showFediLinks && !loggedIn"
class="button-default dropdown-item dropdown-item-icon"
title="Source"
:href="fediLinkURL"

View file

@ -146,6 +146,14 @@
{{ $t('settings.show_wider_shortcuts') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting
path="showFediLinks"
expert="1"
>
{{ $t('settings.show_fedi_links') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="stopGifs">
{{ $t('settings.stop_gifs') }}

View file

@ -46,6 +46,9 @@ export default {
user () {
return this.$store.getters.findUser(this.userId)
},
showFediLinks () {
return this.$store.getters.mergedConfig.showFediLinks === true
},
fediLinkURL () {
try {
return this.user._original.pleroma.ap_id.replace(/^https?/, 'web+ap')

View file

@ -69,7 +69,7 @@
/>
</a>
<a
v-if="fediLinkURL && !hideBio"
v-if="fediLinkURL && showFediLinks && !hideBio"
:href="fediLinkURL"
target="_blank"
class="button-unstyled external-link-button"

View file

@ -750,6 +750,7 @@
"show_panel_nav_shortcuts": "Show timeline navigation shortcuts at the top of the panel",
"show_scrollbars": "Show side column's scrollbars",
"show_wider_shortcuts": "Show wider gap between top panel shortcuts",
"show_fedi_links": "Show Fedi Links (web+ap URLs)",
"show_yous": "Show (You)s",
"stop_gifs": "Pause animated images until you hover on them",
"streaming": "Automatically show new posts when scrolled to the top",

View file

@ -41,6 +41,7 @@ export const defaultState = {
showNavShortcuts: undefined, // instance default
showPanelNavShortcuts: undefined, // instance default
showWiderShortcuts: undefined, // instance default
showFediLinks: true,
hideSiteFavicon: undefined, // instance default
hideSiteName: undefined, // instance default
hideAttachments: false,