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:
parent
bb6bf6d995
commit
48764485d0
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user