0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-06 14:22:52 +00:00

Add IDB Proxy

This commit is contained in:
G.Ambatte
2024-10-26 09:50:07 +13:00
parent 07e7f3e70c
commit eb852b8045
2 changed files with 37 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { initCustomStore } from './customIDBStoreWrapper';
import { initIDBProxy } from './customIDBStoreWrapper';
export const HISTORY_PREFIX = 'HOMEBREWERY-HISTORY';
export const HISTORY_SLOTS = 5;
@@ -28,7 +28,7 @@ const GARBAGE_COLLECT_DELAY = 28 * 24 * 60;
const HB_DB = 'HOMEBREWERY-DB';
const HB_STORE = 'HISTORY';
const IDB = initCustomStore(HB_DB, HB_STORE);
const IDB = initIDBProxy(HB_DB, HB_STORE);
function getKeyBySlot(brew, slot){
// Return a string representing the key for this brew and history slot