feat(react/settings): port backup DB list

This commit is contained in:
Elian Doran
2025-08-15 13:11:44 +03:00
parent 6f19fde76e
commit 25dce64c3b
3 changed files with 65 additions and 5 deletions

View File

@@ -9,11 +9,11 @@ import syncMutexService from "./sync_mutex.js";
import cls from "./cls.js";
import sql from "./sql.js";
import path from "path";
import type { OptionNames } from "@triliumnext/commons";
import type { DatabaseBackup, OptionNames } from "@triliumnext/commons";
type BackupType = "daily" | "weekly" | "monthly";
function getExistingBackups() {
function getExistingBackups(): DatabaseBackup[] {
if (!fs.existsSync(dataDir.BACKUP_DIR)) {
return [];
}