mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-28 04:01:38 +00:00
feat: Add global toggle
This commit is contained in:
parent
eecd1c714b
commit
1f2b1abee0
6 changed files with 36 additions and 19 deletions
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<div class="w-full h-px bg-primary my-4" />
|
||||
|
||||
<div class="flex items-center py-1">
|
||||
<div v-if="isGlobalSharing" class="flex items-center py-1">
|
||||
<ui-toggle-switch v-model="isSharingActivity" @input="changeSharingSetting" />
|
||||
<ui-tooltip text="Share your latest listening activity with other users in the social tab">
|
||||
<p class="pl-4">
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
</ui-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="w-full h-px bg-primary my-4" />
|
||||
<div v-if="isGlobalSharing" class="w-full h-px bg-primary my-4" />
|
||||
|
||||
<p v-if="!isGuest" class="mb-4 text-lg">Change Password</p>
|
||||
<form v-if="!isGuest" @submit.prevent="submitChangePassword">
|
||||
|
|
@ -78,6 +78,9 @@ export default {
|
|||
},
|
||||
isSharingActivity() {
|
||||
return this.$store.getters['user/getUserSetting']('shareListeningActivity')
|
||||
},
|
||||
isGlobalSharing() {
|
||||
return this.$store.getters['getServerSetting']('sharedListeningStats')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -128,8 +131,6 @@ export default {
|
|||
})
|
||||
},
|
||||
changeSharingSetting() {
|
||||
console.log('test')
|
||||
console.log(String(!this.isSharingActivity))
|
||||
this.$store.dispatch('user/updateUserSettings', { shareListeningActivity: !this.isSharingActivity })
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue