1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-17 08:09:14 +09:00

fix(friendly): Fixed an issue with notifications automatically disappearing in desktop mode

This commit is contained in:
NoriDev 2022-09-09 14:00:10 +09:00
parent bb6bf6d995
commit 48764485d0

View File

@ -17,14 +17,19 @@ import { i18n } from '@/i18n';
const isFriendly = $ref(localStorage.getItem('ui') === 'friendly');
const DESKTOP_THRESHOLD = 1100;
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
let showing = $ref(true);
let hasDisconnected = $ref(false);
let currentTimeout = $ref(0);
function timeout() {
if (!isDesktop.value) {
currentTimeout = window.setTimeout(() => {
showing = !isFriendly;
}, 10000);
}
}
function clearTimeout() {