From b8f1f241f1908bdd7a99c4c54e1104fee71d245f Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Wed, 18 Jan 2023 20:59:00 +0100 Subject: [PATCH] Hosts and settings --- frontend/src/app.svelte | 5 +- frontend/src/components/modal.svelte | 4 +- .../addressbar/createhostmodal.svelte | 72 +++++++ .../src/organisms/addressbar/hostmodal.svelte | 79 ++++++-- .../src/organisms/addressbar/index.svelte | 2 +- .../src/organisms/addressbar/welcome.svelte | 30 +++ frontend/wailsjs/go/app/App.d.ts | 4 + frontend/wailsjs/go/app/App.js | 8 + go.mod | 23 +-- internal/app/host.go | 58 ------ internal/app/hosts.go | 190 ++++++++++++++++++ internal/app/settings.go | 37 ++++ 12 files changed, 413 insertions(+), 99 deletions(-) create mode 100644 frontend/src/organisms/addressbar/createhostmodal.svelte create mode 100644 frontend/src/organisms/addressbar/welcome.svelte delete mode 100644 internal/app/host.go create mode 100644 internal/app/hosts.go create mode 100644 internal/app/settings.go diff --git a/frontend/src/app.svelte b/frontend/src/app.svelte index cffd941..77a54d5 100644 --- a/frontend/src/app.svelte +++ b/frontend/src/app.svelte @@ -1,6 +1,6 @@ @@ -52,7 +51,7 @@ {#if environment}
- openConnection(e.detail)} bind:modalOpen={addressBarModalOpen} /> + openConnection(e.detail)} bind:modalOpen={addressBarModalOpen} /> {#if host && connection} diff --git a/frontend/src/components/modal.svelte b/frontend/src/components/modal.svelte index f548d83..7ff5ea4 100644 --- a/frontend/src/components/modal.svelte +++ b/frontend/src/components/modal.svelte @@ -5,6 +5,7 @@ export let show = false; export let title = undefined; export let contentPadding = true; + export let width = '80vw'; function keydown(event) { if (event.key === 'Escape') { @@ -17,7 +18,7 @@ {#if show}