backups: restore local backups in-app

This commit is contained in:
Harvey Tindall
2023-12-21 17:42:07 +00:00
parent ff73c72b0e
commit eff313be41
4 changed files with 33 additions and 2 deletions

View File

@@ -797,6 +797,12 @@ export class settingsList {
window.notifications.customPositive("pathCopied", "", window.lang.notif("pathCopied"));
});
tr.querySelector(".backup-download").addEventListener("click", () => _download("/backups/" + b.name, b.name));
tr.querySelector(".backup-restore").addEventListener("click", () => {
_post("/backups/restore/"+b.name, null, () => {});
window.modals.backups.close();
window.modals.settingsRefresh.modal.querySelector("span.heading").textContent = window.lang.strings("settingsRestarting");
window.modals.settingsRefresh.show();
});
table.appendChild(tr);
}
});