diff --git a/src/lib/components/dualTimeView.svelte b/src/lib/components/dualTimeView.svelte index 740d992fe..553ec4dae 100644 --- a/src/lib/components/dualTimeView.svelte +++ b/src/lib/components/dualTimeView.svelte @@ -10,7 +10,7 @@ import { Badge, InteractiveText, Layout, Popover, Typography } from '@appwrite.io/pink-svelte'; import { menuOpen } from '$lib/components/menu/store'; - export let time: string = ''; + export let time: string | null = null; export let placement: ComponentProps['placement'] = 'bottom'; function timeDifference(dateString: string): string { @@ -75,20 +75,21 @@ $: timeToString = time ? timeDifference(time) : 'Invalid time'; - - +{#if time} + + -
{/if}
-
+
{:else} + {time === null || time === undefined ? 'null' : time} +{/if} diff --git a/src/lib/components/permissions/actions.svelte b/src/lib/components/permissions/actions.svelte index 4bdbb7637..132ee5b40 100644 --- a/src/lib/components/permissions/actions.svelte +++ b/src/lib/components/permissions/actions.svelte @@ -12,7 +12,6 @@ export let showTeam: boolean; export let showLabel: boolean; export let showCustom: boolean; - export let hideOnClick: boolean = false; export let groups: Writable>; const dispatch = createEventDispatcher(); @@ -25,7 +24,7 @@ { - if (hideOnClick) hide(e); + hide(e); dispatch('create', ['any']); }}> Any @@ -33,7 +32,7 @@ { - if (hideOnClick) hide(e); + hide(e); dispatch('create', ['guests']); }}> All guests @@ -41,7 +40,7 @@ { - if (hideOnClick) hide(e); + hide(e); dispatch('create', ['users']); }}> All users @@ -49,22 +48,22 @@ { showUser = true; - if (hideOnClick) hide(e); + hide(e); }}>Select users { showTeam = true; - if (hideOnClick) hide(e); + hide(e); }}>Select teams { showLabel = true; - if (hideOnClick) hide(e); + hide(e); }}>Label { showCustom = true; - if (hideOnClick) hide(e); + hide(e); }}>Custom permission diff --git a/src/lib/components/permissions/permissions.svelte b/src/lib/components/permissions/permissions.svelte index be7cbf74f..135f1506d 100644 --- a/src/lib/components/permissions/permissions.svelte +++ b/src/lib/components/permissions/permissions.svelte @@ -22,7 +22,6 @@ import { Card } from '$lib/components'; export let withCreate = false; - export let hideOnClick = false; export let permissions: string[] = []; let showUser = false; @@ -197,7 +196,6 @@ bind:showTeam bind:showUser {groups} - {hideOnClick} on:create={create} let:toggle>