semantic markup update

This commit is contained in:
2026-01-18 21:29:54 +03:00
parent 11c59fb420
commit 76baeb1038
85 changed files with 7020 additions and 5953 deletions

View File

@@ -13,6 +13,11 @@
let showBackupModal = false;
let selectedEnvId = '';
// [DEF:loadInitialData:Function]
/* @PURPOSE: Loads tasks and environments on page initialization.
@PRE: API must be reachable.
@POST: tasks and environments variables are populated.
*/
async function loadInitialData() {
try {
loading = true;
@@ -28,7 +33,13 @@
loading = false;
}
}
// [/DEF:loadInitialData:Function]
// [DEF:refreshTasks:Function]
/* @PURPOSE: Periodically refreshes the task list.
@PRE: API must be reachable.
@POST: tasks variable is updated if data is valid.
*/
async function refreshTasks() {
try {
const data = await getTasks();
@@ -40,11 +51,23 @@
console.error('Failed to refresh tasks:', error);
}
}
// [/DEF:refreshTasks:Function]
// [DEF:handleSelectTask:Function]
/* @PURPOSE: Updates the selected task ID when a task is clicked.
@PRE: event.detail.id must be provided.
@POST: selectedTaskId is updated.
*/
function handleSelectTask(event) {
selectedTaskId = event.detail.id;
}
// [/DEF:handleSelectTask:Function]
// [DEF:handleRunBackup:Function]
/* @PURPOSE: Triggers a manual backup task for the selected environment.
@PRE: selectedEnvId must not be empty.
@POST: Backup task is created and task list is refreshed.
*/
async function handleRunBackup() {
if (!selectedEnvId) {
addToast('Please select an environment', 'error');
@@ -61,6 +84,7 @@
console.error('Failed to start backup:', error);
}
}
// [/DEF:handleRunBackup:Function]
onMount(() => {
loadInitialData();