This commit is contained in:
@@ -184,6 +184,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onBeforeUnmount, onMounted } from 'vue'
|
||||
import { MenuTypeEnum, MenuWidth } from '@/enums/appEnum'
|
||||
import { useSettingStore } from '@/store/modules/setting'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
@@ -264,9 +265,18 @@
|
||||
initLanguage()
|
||||
if (hasAuth(NOTIFICATION_PERMISSIONS.page)) {
|
||||
void notificationStore.refreshUnreadCount().catch(() => undefined)
|
||||
unreadTimer = window.setInterval(() => {
|
||||
void notificationStore.refreshUnreadCount().catch(() => undefined)
|
||||
}, 30_000)
|
||||
}
|
||||
})
|
||||
|
||||
let unreadTimer: number | undefined
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (unreadTimer !== undefined) window.clearInterval(unreadTimer)
|
||||
})
|
||||
|
||||
const { isFullscreen, toggle: toggleFullscreen } = useFullscreen()
|
||||
|
||||
const toggleFullScreen = () => {
|
||||
|
||||
Reference in New Issue
Block a user