From 214be4a0ee0819010bc9d5023ff8b905c94124bb Mon Sep 17 00:00:00 2001 From: spiral Date: Mon, 9 May 2022 17:15:00 -0400 Subject: [PATCH] feat: bulk privacy pages --- src/App.svelte | 4 ++ src/api/types.ts | 2 +- src/lib/system/Privacy.svelte | 2 + src/pages/BulkGroupPrivacy.svelte | 73 +++++++++++++++++++++++++++++ src/pages/BulkMemberPrivacy.svelte | 74 ++++++++++++++++++++++++++++++ 5 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 src/pages/BulkGroupPrivacy.svelte create mode 100644 src/pages/BulkMemberPrivacy.svelte diff --git a/src/App.svelte b/src/App.svelte index 0c81ca45..dec70ef5 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -14,6 +14,8 @@ import { Alert } from 'sveltestrap'; import DiscordLogin from "./pages/DiscordLogin.svelte"; import { onMount } from 'svelte'; +import BulkGroupPrivacy from "./pages/BulkGroupPrivacy.svelte"; +import BulkMemberPrivacy from "./pages/BulkMemberPrivacy.svelte"; // theme cdns (I might make some myself too) let light = "https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css"; @@ -67,6 +69,8 @@ import DiscordLogin from "./pages/DiscordLogin.svelte"; + +
diff --git a/src/api/types.ts b/src/api/types.ts index 61bb4225..3aaea446 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -31,7 +31,7 @@ export interface Config { description_templates: string[]; } -interface MemberPrivacy { +export interface MemberPrivacy { visibility?: string, description_privacy?: string, name_privacy?: string, diff --git a/src/lib/system/Privacy.svelte b/src/lib/system/Privacy.svelte index b5c9e954..35d0193a 100644 --- a/src/lib/system/Privacy.svelte +++ b/src/lib/system/Privacy.svelte @@ -42,6 +42,8 @@ + + {/if} \ No newline at end of file diff --git a/src/pages/BulkGroupPrivacy.svelte b/src/pages/BulkGroupPrivacy.svelte new file mode 100644 index 00000000..13f4dc48 --- /dev/null +++ b/src/pages/BulkGroupPrivacy.svelte @@ -0,0 +1,73 @@ + + + + + + + + +
+ +
Bulk group privacy +
+
+ + Apply the selected privacy options (and leave the unselected options untouched): +

+ + {#each Object.keys(privacy) as key} + + {/each} + +
+ + +

+ + + +

+ + +
+
+ +
+
\ No newline at end of file diff --git a/src/pages/BulkMemberPrivacy.svelte b/src/pages/BulkMemberPrivacy.svelte new file mode 100644 index 00000000..fd102a01 --- /dev/null +++ b/src/pages/BulkMemberPrivacy.svelte @@ -0,0 +1,74 @@ + + + + + + + + +
+ +
Bulk member privacy +
+
+ + Apply the selected privacy options (and leave the unselected options untouched): +

+ + {#each Object.keys(privacy) as key} + + {/each} + +
+ + +

+ + + +

+ + +
+
+ +
+
\ No newline at end of file