From 1b3f188997c5f10b41f0b60434051a096094ee1a Mon Sep 17 00:00:00 2001 From: Jake Fulmine Date: Sat, 26 Nov 2022 13:23:59 +0100 Subject: [PATCH] refactor(dashboard): re-organize dashboard files --- dashboard/src/App.svelte | 28 +-- .../common}/CardsHeader.svelte | 6 +- .../common}/ListPagination.svelte | 0 .../common}/Navigation.svelte | 3 +- .../src/{lib => components}/group/Body.svelte | 0 .../{lib => components}/group/CardView.svelte | 0 .../src/{lib => components}/group/Edit.svelte | 0 .../group/MemberEdit.svelte | 2 +- .../{lib => components}/group/NewGroup.svelte | 0 .../{lib => components}/group/Privacy.svelte | 0 .../{lib => components}/list/CardView.svelte | 0 .../src/{lib => components}/list/List.svelte | 2 +- .../list/ListControl.svelte | 0 .../list/ListSearch.svelte | 0 .../{lib => components}/list/ListView.svelte | 2 +- .../{lib => components}/member/Body.svelte | 0 .../member/CardView.svelte | 0 .../{lib => components}/member/Edit.svelte | 0 .../member/GroupEdit.svelte | 2 +- .../member/NewMember.svelte | 0 .../{lib => components}/member/Privacy.svelte | 0 .../member/ProxyTags.svelte | 0 .../status/Shard.svelte} | 0 .../{lib => components}/system/Body.svelte | 0 .../{lib => components}/system/Edit.svelte | 0 .../{lib => components}/system/Main.svelte | 2 +- .../{lib => components}/system/Privacy.svelte | 0 .../system/PrivacyEdit.svelte | 0 .../src/{pages => routes/Dash}/Dash.svelte | 10 +- .../{pages => routes/Dash/Group}/Group.svelte | 14 +- .../Dash/Member}/Member.svelte | 14 +- .../src/{pages => routes/Dash}/Profile.svelte | 10 +- .../src/{pages => routes/Dash}/Random.svelte | 6 +- .../Dash/System}/BulkGroupPrivacy.svelte | 4 +- .../Dash/System}/BulkMemberPrivacy.svelte | 218 +++++++++--------- .../src/{pages => routes}/DiscordLogin.svelte | 0 dashboard/src/{pages => routes}/Home.svelte | 0 .../src/{pages => routes}/PageNotFound.svelte | 0 dashboard/src/{pages => routes}/Public.svelte | 0 .../Settings}/Settings.svelte | 4 +- .../{pages => routes/Status}/status.svelte | 4 +- 41 files changed, 165 insertions(+), 166 deletions(-) rename dashboard/src/{lib => components/common}/CardsHeader.svelte (93%) rename dashboard/src/{lib => components/common}/ListPagination.svelte (100%) rename dashboard/src/{lib => components/common}/Navigation.svelte (97%) rename dashboard/src/{lib => components}/group/Body.svelte (100%) rename dashboard/src/{lib => components}/group/CardView.svelte (100%) rename dashboard/src/{lib => components}/group/Edit.svelte (100%) rename dashboard/src/{lib => components}/group/MemberEdit.svelte (97%) rename dashboard/src/{lib => components}/group/NewGroup.svelte (100%) rename dashboard/src/{lib => components}/group/Privacy.svelte (100%) rename dashboard/src/{lib => components}/list/CardView.svelte (100%) rename dashboard/src/{lib => components}/list/List.svelte (98%) rename dashboard/src/{lib => components}/list/ListControl.svelte (100%) rename dashboard/src/{lib => components}/list/ListSearch.svelte (100%) rename dashboard/src/{lib => components}/list/ListView.svelte (99%) rename dashboard/src/{lib => components}/member/Body.svelte (100%) rename dashboard/src/{lib => components}/member/CardView.svelte (100%) rename dashboard/src/{lib => components}/member/Edit.svelte (100%) rename dashboard/src/{lib => components}/member/GroupEdit.svelte (98%) rename dashboard/src/{lib => components}/member/NewMember.svelte (100%) rename dashboard/src/{lib => components}/member/Privacy.svelte (100%) rename dashboard/src/{lib => components}/member/ProxyTags.svelte (100%) rename dashboard/src/{lib/shard.svelte => components/status/Shard.svelte} (100%) rename dashboard/src/{lib => components}/system/Body.svelte (100%) rename dashboard/src/{lib => components}/system/Edit.svelte (100%) rename dashboard/src/{lib => components}/system/Main.svelte (96%) rename dashboard/src/{lib => components}/system/Privacy.svelte (100%) rename dashboard/src/{lib => components}/system/PrivacyEdit.svelte (100%) rename dashboard/src/{pages => routes/Dash}/Dash.svelte (93%) rename dashboard/src/{pages => routes/Dash/Group}/Group.svelte (94%) rename dashboard/src/{pages => routes/Dash/Member}/Member.svelte (94%) rename dashboard/src/{pages => routes/Dash}/Profile.svelte (93%) rename dashboard/src/{pages => routes/Dash}/Random.svelte (98%) rename dashboard/src/{pages => routes/Dash/System}/BulkGroupPrivacy.svelte (96%) rename dashboard/src/{pages => routes/Dash/System}/BulkMemberPrivacy.svelte (93%) rename dashboard/src/{pages => routes}/DiscordLogin.svelte (100%) rename dashboard/src/{pages => routes}/Home.svelte (100%) rename dashboard/src/{pages => routes}/PageNotFound.svelte (100%) rename dashboard/src/{pages => routes}/Public.svelte (100%) rename dashboard/src/{pages => routes/Settings}/Settings.svelte (99%) rename dashboard/src/{pages => routes/Status}/status.svelte (98%) diff --git a/dashboard/src/App.svelte b/dashboard/src/App.svelte index ac324263..8f6014df 100644 --- a/dashboard/src/App.svelte +++ b/dashboard/src/App.svelte @@ -1,21 +1,21 @@ - -{#if user} - - - - - - -
- -
Bulk member privacy -
-
- - {#if err} - {err} - {/if} - {#if success} - Member privacy updated! - {/if} - - changeAll(e)} aria-label="set all to"> - - - - -
- - {#each Object.keys(privacy) as x} - - - - - - - - - {/each} - - - -
-
- -
-
+ + +{#if user} + + + + + + +
+ +
Bulk member privacy +
+
+ + {#if err} + {err} + {/if} + {#if success} + Member privacy updated! + {/if} + + changeAll(e)} aria-label="set all to"> + + + + +
+ + {#each Object.keys(privacy) as x} + + + + + + + + + {/each} + + + +
+
+ +
+
{/if} \ No newline at end of file diff --git a/dashboard/src/pages/DiscordLogin.svelte b/dashboard/src/routes/DiscordLogin.svelte similarity index 100% rename from dashboard/src/pages/DiscordLogin.svelte rename to dashboard/src/routes/DiscordLogin.svelte diff --git a/dashboard/src/pages/Home.svelte b/dashboard/src/routes/Home.svelte similarity index 100% rename from dashboard/src/pages/Home.svelte rename to dashboard/src/routes/Home.svelte diff --git a/dashboard/src/pages/PageNotFound.svelte b/dashboard/src/routes/PageNotFound.svelte similarity index 100% rename from dashboard/src/pages/PageNotFound.svelte rename to dashboard/src/routes/PageNotFound.svelte diff --git a/dashboard/src/pages/Public.svelte b/dashboard/src/routes/Public.svelte similarity index 100% rename from dashboard/src/pages/Public.svelte rename to dashboard/src/routes/Public.svelte diff --git a/dashboard/src/pages/Settings.svelte b/dashboard/src/routes/Settings/Settings.svelte similarity index 99% rename from dashboard/src/pages/Settings.svelte rename to dashboard/src/routes/Settings/Settings.svelte index 6bed707b..7a709681 100644 --- a/dashboard/src/pages/Settings.svelte +++ b/dashboard/src/routes/Settings/Settings.svelte @@ -3,8 +3,8 @@ import Toggle from 'svelte-toggle'; import { autoresize } from 'svelte-textarea-autoresize'; import FaCogs from 'svelte-icons/fa/FaCogs.svelte' - import { Config } from '../api/types'; - import api from '../api'; + import { Config } from '../../api/types'; + import api from '../../api'; let savedSettings = JSON.parse(localStorage.getItem("pk-settings")); let apiConfig: Config = JSON.parse(localStorage.getItem("pk-config")); diff --git a/dashboard/src/pages/status.svelte b/dashboard/src/routes/Status/status.svelte similarity index 98% rename from dashboard/src/pages/status.svelte rename to dashboard/src/routes/Status/status.svelte index 32fd5938..c73cda30 100644 --- a/dashboard/src/pages/status.svelte +++ b/dashboard/src/routes/Status/status.svelte @@ -1,9 +1,9 @@