Закончили редизайн, обновили интерфейс бэкапа

This commit is contained in:
2026-01-26 22:12:35 +03:00
parent 16ffeb1ed6
commit 1042b35d1b
23 changed files with 572 additions and 94 deletions

View File

@@ -13,6 +13,7 @@
<script lang="ts">
// [SECTION: IMPORTS]
import { onMount } from 'svelte';
import { page } from '$app/stores';
import { listFiles, deleteFile } from '../../../services/storageService';
import { addToast } from '../../../lib/toasts';
import { t } from '../../../lib/i18n';
@@ -90,6 +91,8 @@
// [DEF:navigateUp:Function]
/**
* @purpose Navigates one level up in the directory structure.
* @pre currentPath is set and deeper than activeTab root.
* @post currentPath is moved up one directory level.
*/
function navigateUp() {
if (!currentPath || currentPath === activeTab) return;
@@ -100,7 +103,18 @@
}
// [/DEF:navigateUp:Function]
onMount(loadFiles);
onMount(() => {
const pathParam = $page.url.searchParams.get('path');
if (pathParam) {
currentPath = pathParam;
if (pathParam.startsWith('repositorys')) {
activeTab = 'repositorys';
} else {
activeTab = 'backups';
}
}
loadFiles();
});
$: if (activeTab) {
// Reset path when switching tabs