feat: Complete Issue #11 - Fix backup UI bugs and implement System Settings page

This commit is contained in:
Wikid82
2025-11-20 13:38:05 -05:00
parent 042082fa87
commit 20c8944380
5 changed files with 254 additions and 12 deletions

View File

@@ -1,9 +1,9 @@
import client from './client';
export interface BackupFile {
name: string;
filename: string;
size: number;
mod_time: string;
time: string;
}
export const getBackups = async (): Promise<BackupFile[]> => {
@@ -20,10 +20,6 @@ export const restoreBackup = async (filename: string): Promise<void> => {
await client.post(`/backups/${filename}/restore`);
};
export const deleteBackup = async (_filename: string): Promise<void> => {
// Note: Delete endpoint wasn't explicitly asked for in the backend implementation plan,
// but it's good practice. I'll skip implementing the API call for now if the backend doesn't support it yet
// to avoid 404s, but I should probably add it to the backend later.
// For now, let's stick to what we built.
throw new Error("Not implemented");
export const deleteBackup = async (filename: string): Promise<void> => {
await client.delete(`/backups/${filename}`);
};