diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 7074b84..1fec8e5 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -1,7 +1,7 @@ - + postgresql true org.postgresql.Driver diff --git a/tfweb/src/components/AdminLayout.svelte b/tfweb/src/components/AdminLayout.svelte index e2d5052..e5cfada 100644 --- a/tfweb/src/components/AdminLayout.svelte +++ b/tfweb/src/components/AdminLayout.svelte @@ -1,53 +1,17 @@ -
-
-

- - Trifid -

-
- - -
- - +
+
+
+ +
+
+ +
-
- -
-
+
\ No newline at end of file diff --git a/tfweb/src/components/Sidebar.svelte b/tfweb/src/components/Sidebar.svelte new file mode 100644 index 0000000..321c28a --- /dev/null +++ b/tfweb/src/components/Sidebar.svelte @@ -0,0 +1,48 @@ + + +
+

+ + Trifid +

+
+ + +
+ + +
diff --git a/tfweb/src/lib/i18n/locales/en.json b/tfweb/src/lib/i18n/locales/en.json index 55b049c..7a0cd7f 100644 --- a/tfweb/src/lib/i18n/locales/en.json +++ b/tfweb/src/lib/i18n/locales/en.json @@ -91,7 +91,7 @@ "ipaddr": "IP Address", "edit": "Edit", "enroll": "Enroll", - "delete": "Delete", + "deletehost": "Delete", "config": "Configuration", "add": "Add", "create": { @@ -105,6 +105,15 @@ "needsrole": "Role is required.", "invalidip": "Invalid IP address" } + }, + "delete": { + "title": "Are you sure you want to delete the host {host}?", + "explainer": "This action cannot be undone. This host will still be able to connect to the network unless you block it first.", + "confirm": "I'm sure", + "cancel": "Nevermind", + "error": { + "ERR_DB_ERROR": "Removal failed" + } } }, "roles": { diff --git a/tfweb/src/routes/hosts/+page.svelte b/tfweb/src/routes/hosts/+page.svelte index 3e6f43e..d0afc5e 100644 --- a/tfweb/src/routes/hosts/+page.svelte +++ b/tfweb/src/routes/hosts/+page.svelte @@ -124,7 +124,7 @@ - +
diff --git a/tfweb/src/routes/hosts/[host_id]/delete/+page.svelte b/tfweb/src/routes/hosts/[host_id]/delete/+page.svelte new file mode 100644 index 0000000..dfffccf --- /dev/null +++ b/tfweb/src/routes/hosts/[host_id]/delete/+page.svelte @@ -0,0 +1,136 @@ + + + + {$t("common.title", {values: {title: $t("common.page.hosts")}})} + + + + +

{$t("hosts.delete.title", {values: {host: host.data.name}})}

+

{$t("hosts.delete.explainer")}

+ {#if loading} + + {:else} + + {/if} + + {#if hasFormErr} +

{formErr}

+ {/if} +
+