diff --git a/src/api/types.ts b/src/api/types.ts index 14ac84c9..61bb4225 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -20,6 +20,17 @@ export interface System { color?: string; } +export interface Config { + timezone: string; + pings_enabled: boolean; + member_default_private?: boolean; + group_default_private?: boolean; + show_private_info?: boolean; + member_limit: number; + group_limit: number; + description_templates: string[]; +} + interface MemberPrivacy { visibility?: string, description_privacy?: string, diff --git a/src/lib/group/Edit.svelte b/src/lib/group/Edit.svelte index e0255bc4..e25a1be3 100644 --- a/src/lib/group/Edit.svelte +++ b/src/lib/group/Edit.svelte @@ -5,6 +5,8 @@ import api from '../../api'; import autosize from 'svelte-autosize'; + const descriptions: string[] = JSON.parse(localStorage.getItem("pk-config"))?.description_templates; + let loading: boolean = false; export let group: Group; export let editMode: boolean; @@ -114,6 +116,16 @@
Description:
+ {#if descriptions.length > 0 && descriptions[0].trim() != ""} + + {/if} + {#if descriptions.length > 1 && descriptions[1].trim() != ""} + + {/if} + {#if descriptions.length > 2 && descriptions[2].trim() != ""} + + {/if} +