From ecf9f1b8377b466cd400707113f2f07d237737fa Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Thu, 18 Sep 2025 04:40:45 +0000 Subject: [PATCH] Add repoTemplates and issueTemplates stores and types cgen-bd92d45792654082b0f922a19efec799 --- website/src/website/switch/db.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/src/website/switch/db.ts b/website/src/website/switch/db.ts index 2e5e56cc..b814badc 100644 --- a/website/src/website/switch/db.ts +++ b/website/src/website/switch/db.ts @@ -44,6 +44,20 @@ export interface FsHandleRecord { handle: FileSystemDirectoryHandle; } +export interface RepoTemplateRecord { + id: string; + name: string; + fsHandleId: string; +} + +export interface IssueTemplateRecord { + id: string; + name: string; + title: string; + body: string; + labels: string[]; +} + export async function openDB(): Promise { return new Promise((resolve, reject) => { const req = indexedDB.open(DB_NAME, DB_VERSION); @@ -72,6 +86,12 @@ export async function openDB(): Promise { if (!db.objectStoreNames.contains("settings")) { db.createObjectStore("settings", { keyPath: "id" }); } + if (!db.objectStoreNames.contains("repoTemplates")) { + db.createObjectStore("repoTemplates", { keyPath: "id" }); + } + if (!db.objectStoreNames.contains("issueTemplates")) { + db.createObjectStore("issueTemplates", { keyPath: "id" }); + } }; req.onsuccess = () => resolve(req.result); req.onerror = () => reject(req.error);