refactor: 抽取 UI 组件、改进错误页面、统一导入路径并简化数据库接口

This commit is contained in:
2026-04-02 00:13:43 +08:00
parent 4ec4576fc5
commit c67e773086
10 changed files with 197 additions and 136 deletions
+1 -5
View File
@@ -13,11 +13,7 @@ export type DB = ReturnType<typeof createDB>
export const getDB = (() => {
let db: DB | null = null
return (singleton = true): DB => {
if (!singleton) {
return createDB()
}
return (): DB => {
db ??= createDB()
return db
}