mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: cache uicontext.domain
This commit is contained in:
1 parent
43fb00e3c7
commit
e39a5fa87f
8 files changed
+71
-10
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { openDB as _open } from 'idb';
|
||||
import { alert } from 'vj/components/dialog';
|
||||
|
||||
export const openDB = _open('hydro', 1, {
|
||||
export const openDB = _open('hydro', 2, {
|
||||
upgrade(db, oldVersion) {
|
||||
if (oldVersion < 1) {
|
||||
const solutionStore = db.createObjectStore('solutions', { keyPath: 'id' });
|
||||
@@ -17,6 +17,7 @@ export const openDB = _open('hydro', 1, {
|
||||
if (/^0\.\d+$/.test(key)) localStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
if (oldVersion < 2) db.createObjectStore('domain-info', { keyPath: 'id' });
|
||||
},
|
||||
blocked(currentVersion, blockedVersion) {
|
||||
console.error('IDB Blocked by version', blockedVersion, 'want', currentVersion);
|
||||
|
||||
Reference in new issue
Block a user