From f17fd0174bbd686601c710cbbfa0ed788fe75fd8 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Tue, 26 Apr 2022 03:01:21 +0300 Subject: [PATCH] frontend: add channel editing --- frontend/public/global.css | 17 ++++++ .../src/components/modals/EditChannel.svelte | 55 +++++++++++++++++++ .../src/components/pages/main/Main.svelte | 3 +- .../pages/main/OverlayProvider.svelte | 4 ++ .../src/components/pages/main/Sidebar.svelte | 14 ++++- frontend/src/stores.js | 3 +- 6 files changed, 91 insertions(+), 5 deletions(-) create mode 100644 frontend/src/components/modals/EditChannel.svelte diff --git a/frontend/public/global.css b/frontend/public/global.css index 9647e94..0152acb 100644 --- a/frontend/public/global.css +++ b/frontend/public/global.css @@ -191,6 +191,23 @@ body { background-color: var(--purple-2); } +.icon-button { + display: flex; + justify-content: center; + align-items: center; + background-color: transparent; + color: var(--foreground-color-3); + text-align: center; + border: none; + border-radius: var(--radius-md); + font: inherit; + margin-left: auto; +} + +.icon-button:hover { + color: var(--foreground-color-1); +} + /* text */ .h1 { diff --git a/frontend/src/components/modals/EditChannel.svelte b/frontend/src/components/modals/EditChannel.svelte new file mode 100644 index 0000000..e3a8ec5 --- /dev/null +++ b/frontend/src/components/modals/EditChannel.svelte @@ -0,0 +1,55 @@ + + + + + diff --git a/frontend/src/components/pages/main/Main.svelte b/frontend/src/components/pages/main/Main.svelte index ddf1be5..0e810bf 100644 --- a/frontend/src/components/pages/main/Main.svelte +++ b/frontend/src/components/pages/main/Main.svelte @@ -1,9 +1,8 @@ diff --git a/frontend/src/components/pages/main/OverlayProvider.svelte b/frontend/src/components/pages/main/OverlayProvider.svelte index 5426979..732ba7c 100644 --- a/frontend/src/components/pages/main/OverlayProvider.svelte +++ b/frontend/src/components/pages/main/OverlayProvider.svelte @@ -1,8 +1,12 @@ {#if $overlayStore.createChannel} {/if} +{#if $overlayStore.editChannel} + +{/if} diff --git a/frontend/src/components/pages/main/Sidebar.svelte b/frontend/src/components/pages/main/Sidebar.svelte index 7d52dbf..718b7b2 100644 --- a/frontend/src/components/pages/main/Sidebar.svelte +++ b/frontend/src/components/pages/main/Sidebar.svelte @@ -1,5 +1,5 @@ @@ -13,6 +13,9 @@ { channel.name } + {/each}