From ae57abc2e511b06748dd2e4194b3891f754e0ca0 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Mon, 13 Nov 2023 02:35:01 +0000 Subject: [PATCH 1/2] Add target management view patch --- src/views/TargetManagementView.svelte | 292 ++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) create mode 100644 src/views/TargetManagementView.svelte diff --git a/src/views/TargetManagementView.svelte b/src/views/TargetManagementView.svelte new file mode 100644 index 0000000..26166e9 --- /dev/null +++ b/src/views/TargetManagementView.svelte @@ -0,0 +1,292 @@ + + +
+
+<<<<<<< TargetManagement.svelte + Warning: This is currently still under development, however it DOES update the real server redirects +======= + Warning: This is currently still under development, however it DOES update the real server routes +>>>>>>> ../views/RoutesView.svelte +
+ +
+ {#await promiseForTable} +
+
Loading...
+
+ {:then} + + + + + + +<<<<<<< TargetManagement.svelte + +======= +>>>>>>> ../views/RoutesView.svelte + + + + +<<<<<<< TargetManagement.svelte + { + const x = e.detail; + $redirectsTable[x.src] = {client: x, server: $redirectsTable[x.src]?.server, p: Promise.resolve()}; +======= + { + const x = e.detail; + $routesTable[x.src] = {client: x, server: $routesTable[x.src]?.server, p: Promise.resolve()}; +>>>>>>> ../views/RoutesView.svelte + tableKeys.push(x.src); + tableKeys = tableKeys; + }} + /> + + + {#each tableKeys as src (src)} +<<<<<<< TargetManagement.svelte + {#await $redirectsTable[src].p} + + {:then _} + +======= + {#await $routesTable[src].p} + + {:then _} + +>>>>>>> ../views/RoutesView.svelte + {:catch err} + + {/await} + {/each} + +
SourceDestinationFlagsCodeDescriptionActiveOption
Loading...
Loading...
Error loading row for {src}: {err}
+ {:catch err} +
+
Administrator... I hardly know her?
+
{err}
+
+ {/await} +
+ + +
+ + From 97b9bef4674e7bb3b6aead64361d7ed823dde9a2 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Mon, 13 Nov 2023 13:26:45 +0000 Subject: [PATCH 2/2] Convert target tables to one generic component --- src/components/RedirectRow.svelte | 44 +++--- src/components/RouteRow.svelte | 40 +++-- src/types/cspair.ts | 16 +- src/views/RedirectsView.svelte | 220 ++------------------------ src/views/RoutesView.svelte | 218 ++----------------------- src/views/TargetManagementView.svelte | 170 ++++++-------------- 6 files changed, 140 insertions(+), 568 deletions(-) diff --git a/src/components/RedirectRow.svelte b/src/components/RedirectRow.svelte index 262f4a4..7e2367b 100644 --- a/src/components/RedirectRow.svelte +++ b/src/components/RedirectRow.svelte @@ -1,43 +1,49 @@ -{#if noCPair(value)} +{#if noCPair(item)} - {value.server.src} - - - -