mirror of
https://github.com/koel/koel
synced 2024-11-27 22:40:26 +00:00
feat: do not show SupportBar nag if plus
This commit is contained in:
parent
1bb22bc336
commit
acc3374ee2
1 changed files with 4 additions and 0 deletions
|
@ -18,11 +18,13 @@
|
|||
import isMobile from 'ismobilejs'
|
||||
import { ref, watch } from 'vue'
|
||||
import { preferenceStore } from '@/stores'
|
||||
import { useLicense } from '@/composables'
|
||||
|
||||
const delayUntilShow = 30 * 60 * 1000 // 30 minutes
|
||||
|
||||
const shown = ref(false)
|
||||
|
||||
const { isKoelPlus } = useLicense()
|
||||
const setUpShowBarTimeout = () => setTimeout(() => (shown.value = true), delayUntilShow)
|
||||
const close = () => shown.value = false
|
||||
|
||||
|
@ -34,6 +36,8 @@ const stopBugging = () => {
|
|||
watch(preferenceStore.initialized, initialized => {
|
||||
if (!initialized) return
|
||||
if (preferenceStore.state.supportBarNoBugging || isMobile.any) return
|
||||
if (!isKoelPlus.value) return
|
||||
|
||||
setUpShowBarTimeout()
|
||||
}, { immediate: true })
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue