port setupManager, setupProtocol to serviceFeature

remove styles on webapp UI, and add stylesheet
This commit is contained in:
vorotamoroz
2026-03-17 19:58:12 +09:00
parent fdd3a3aecb
commit 1f87a9fd3d
13 changed files with 684 additions and 236 deletions

View File

@@ -62,10 +62,7 @@ export class VaultHistoryStore {
});
}
private async withStore<T>(
mode: IDBTransactionMode,
task: (store: IDBObjectStore) => Promise<T>
): Promise<T> {
private async withStore<T>(mode: IDBTransactionMode, task: (store: IDBObjectStore) => Promise<T>): Promise<T> {
const db = await this.openHandleDB();
try {
const tx = db.transaction([HANDLE_STORE_NAME], mode);
@@ -141,7 +138,9 @@ export class VaultHistoryStore {
await this.requestAsPromise(store.put(item, makeVaultKey(item.id)));
await this.requestAsPromise(store.put(item.id, LAST_USED_KEY));
const merged = [...existing.filter((v) => v.id !== item.id), item].sort((a, b) => b.lastUsedAt - a.lastUsedAt);
const merged = [...existing.filter((v) => v.id !== item.id), item].sort(
(a, b) => b.lastUsedAt - a.lastUsedAt
);
const stale = merged.slice(MAX_HISTORY_COUNT);
for (const old of stale) {
await this.requestAsPromise(store.delete(makeVaultKey(old.id)));