feat: do not show SupportBar nag if plus

This commit is contained in:
Phan An 2024-01-05 17:46:58 +01:00
parent 1bb22bc336
commit acc3374ee2

View file

@ -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>