mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 03:31:46 +00:00
feat: Add global toggle
This commit is contained in:
parent
eecd1c714b
commit
1f2b1abee0
6 changed files with 36 additions and 19 deletions
|
|
@ -63,7 +63,7 @@
|
|||
<div v-show="isPodcastSearchPage" class="h-full w-0.5 bg-yellow-400 absolute top-0 left-0" />
|
||||
</nuxt-link>
|
||||
|
||||
<nuxt-link v-if="socialTrue" :to="`/social`" class="w-full h-20 flex flex-col items-center justify-center text-white text-opacity-80 border-b border-primary border-opacity-70 hover:bg-opacity-40 cursor-pointer relative" :class="isSocialPage ? 'bg-primary bg-opacity-80' : 'bg-bg bg-opacity-60'">
|
||||
<nuxt-link v-if="socialTrue && isGlobalSharing" :to="`/social`" class="w-full h-20 flex flex-col items-center justify-center text-white text-opacity-80 border-b border-primary border-opacity-70 hover:bg-opacity-40 cursor-pointer relative" :class="isSocialPage ? 'bg-primary bg-opacity-80' : 'bg-bg bg-opacity-60'">
|
||||
<span class="material-icons-outlined">connect_without_contact</span>
|
||||
|
||||
<p class="font-book pt-1.5" style="font-size: 0.9rem">Social</p>
|
||||
|
|
@ -148,14 +148,15 @@ export default {
|
|||
filterBy() {
|
||||
return this.$store.getters['user/getUserSetting']('filterBy')
|
||||
},
|
||||
isGlobalSharing() {
|
||||
return this.$store.getters['getServerSetting']('sharedListeningStats')
|
||||
},
|
||||
async socialTrue() {
|
||||
let listeningStats = await this.$axios.$get(`/api/social`).catch((err) => {
|
||||
console.error('Failed to load shared user listening sesions', err)
|
||||
return false
|
||||
})
|
||||
if (listeningStats != null) {
|
||||
return true
|
||||
} else {return false}
|
||||
return listeningStats != null ? true : false
|
||||
},
|
||||
showingIssues() {
|
||||
if (!this.$route.query) return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue