Закончили редизайн, обновили интерфейс бэкапа
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user