feat: add caching for backend objects

This commit is contained in:
2026-04-21 19:38:57 -04:00
parent 5b4955f07e
commit 7f1e82acc2
14 changed files with 637 additions and 62 deletions

View File

@@ -0,0 +1,10 @@
const _isOnline = ref(typeof navigator !== 'undefined' ? navigator.onLine : true)
if (import.meta.client) {
window.addEventListener('online', () => { _isOnline.value = true })
window.addEventListener('offline', () => { _isOnline.value = false })
}
export function useOfflineStatus() {
return { isOnline: readonly(_isOnline) }
}