use localforage

This commit is contained in:
fyears
2021-11-14 20:24:33 +08:00
parent be2b168c6c
commit 16c3c11fd8
5 changed files with 158 additions and 212 deletions
+4 -7
View File
@@ -11,20 +11,17 @@ import {
TFolder,
} from "obsidian";
import * as CodeMirror from "codemirror";
import {
clearAllSyncPlanRecords,
clearAllSyncMetaMapping,
DatabaseConnection,
} from "./localdb";
import {
prepareDBs,
destroyDBs,
loadDeleteRenameHistoryTable,
clearAllSyncPlanRecords,
clearAllSyncMetaMapping,
insertDeleteRecord,
insertRenameRecord,
getAllDeleteRenameRecords,
insertSyncPlanRecord,
} from "./localdb";
import type { InternalDBs } from "./localdb";
import type { SyncStatusType, PasswordCheckType } from "./sync";
import { isPasswordOk, getSyncPlan, doActualSync } from "./sync";
@@ -50,7 +47,7 @@ const DEFAULT_SETTINGS: SaveRemotePluginSettings = {
export default class SaveRemotePlugin extends Plugin {
settings: SaveRemotePluginSettings;
cm: CodeMirror.Editor;
db: DatabaseConnection;
db: InternalDBs;
syncStatus: SyncStatusType;
async onload() {