This commit is contained in:
go0p
2025-03-04 16:07:14 +08:00
parent 6f82842c92
commit 06c053228c
11 changed files with 126 additions and 130 deletions
+5 -1
View File
@@ -3,9 +3,13 @@ class Database {
this.DB_NAME = 'yaklang_extension';
this.DB_VERSION = 1;
this.stores = {
// 代理日志存储
PROXY_LOGS: 'proxy_logs',
// 代理配置列表存储
PROXY_CONFIGS: 'proxy_configs',
// 当前代理配置存储
CURRENT_PROXY: 'current_proxy',
// 代理认证信息存储
PROXY_AUTH: 'proxy_auth'
};
}
@@ -55,7 +59,7 @@ class Database {
return tx.objectStore(storeName);
}
// 通用的 CRUD 操作
// CRUD 操作
async get(storeName, key) {
const store = await this.getStore(storeName);
return new Promise((resolve, reject) => {