misc: changes, docs update, svelte5 migration.

This commit is contained in:
Darshan
2025-09-30 13:57:59 +05:30
parent 88a153e2d9
commit d00e280bdf
3 changed files with 15 additions and 10 deletions
+8 -7
View File
@@ -57,21 +57,22 @@
}
function updateOrAddItem(payload: Payload) {
// todo: @itznotabug - might need a change to $table?
const { $id, status, $collection, policyId } = payload;
if ($collection === 'archives' && policyId !== null) {
// the internal structure still uses `$collection`,
// and is basically an identifier of the op. type here!
const { $id, status, $collection: type, policyId } = payload;
if (type === 'archives' && policyId !== null) {
return;
}
if ($collection in backupRestoreItems) {
const collectionMap = backupRestoreItems[$collection];
if (type in backupRestoreItems) {
const collectionMap = backupRestoreItems[type];
if (collectionMap.has($id)) {
collectionMap.get($id).status = status;
if (status === 'completed') {
invalidate(Dependencies.BACKUPS);
if ($collection === 'restorations') {
if (type === 'restorations') {
const { newId, newName } =
collectionMap.get($id).options?.['databases']?.['database'][0] || {};
@@ -81,7 +82,7 @@
} else if (status === 'pending' || status === 'processing' || status === 'uploading') {
collectionMap.set($id, payload);
}
backupRestoreItems[$collection] = collectionMap;
backupRestoreItems[type] = collectionMap;
}
}
@@ -94,8 +94,8 @@
) {
// don't invalidate when -
// 1. from faker
// 2. ai columns creation
// 3. ai indexes creation
// 2. ai indexes creation
// 3. ai columns creation
if (
!isWaterfallFromFaker &&
!$showIndexesSuggestions &&
@@ -2,7 +2,11 @@
import { Activity } from '$lib/layout';
import type { PageData } from './$types';
export let data: PageData;
const {
data
}: {
data: PageData;
} = $props();
</script>
<div class="wide-screen-wrapper databases-spreadsheet">