add member page buttons

This commit is contained in:
Fulmine 2022-03-19 11:45:36 +01:00
parent 9bf2a2bb68
commit a7d017a22b

View File

@ -10,6 +10,7 @@
import ProxyTags from './ProxyTags.svelte';
import { Member, Group } from '../../api/types';
import { navigate } from 'svelte-navigator';
export let groups: Group[] = [];
export let member: Member;
@ -147,9 +148,9 @@
<Button style="flex: 0" color="primary" on:click={() => editMode = true}>Edit</Button> <Button style="flex: 0" color="secondary" on:click={() => groupMode = true}>Groups</Button>
{/if}
{#if !isPage}
<Button style="flex: 0; float: right;" color="primary">View page</Button>
<Button style="flex: 0; {!isPublic && "float: right;"}" color="primary" on:click={() => navigate(isPublic ? `/profile/m/${member.id}` : `/dash/m/${member.id}`)}>View page</Button>
{:else}
<Button style="flex: 0; float: right;" color="primary">View system</Button>
<Button style="flex: 0; {!isPublic && "float: right;"}" color="primary" on:click={() => navigate(isPublic ? `/profile/s/${member.system}?tab=members` : "/dash?tab=members")}>View system</Button>
{/if}
{:else if editMode}
<Edit on:deletion on:update bind:member bind:editMode />