feat(frontend): pad member page back button, add link to member page on edit page
This commit is contained in:
parent
c4d7acc3f6
commit
149a7fba88
3 changed files with 13 additions and 3 deletions
|
@ -5,12 +5,15 @@
|
|||
export let color: "primary" | "secondary" | "success" | "danger";
|
||||
export let tooltip: string;
|
||||
export let active: boolean = false;
|
||||
export let click: (e: MouseEvent) => void;
|
||||
export let disabled: boolean = false;
|
||||
|
||||
export let click: ((e: MouseEvent) => void) | undefined = undefined;
|
||||
export let href: string | undefined = undefined;
|
||||
|
||||
let button: HTMLElement;
|
||||
</script>
|
||||
|
||||
<Tooltip target={button} placement="top">{tooltip}</Tooltip>
|
||||
<Button {color} {active} on:click={click} bind:inner={button}>
|
||||
<Button {color} {active} {disabled} {href} on:click={click} bind:inner={button}>
|
||||
<Icon name={icon} />
|
||||
</Button>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<br /><a href="/edit/member/{data.id}">Edit profile</a>
|
||||
</Alert>
|
||||
{/if}
|
||||
<div>
|
||||
<div class="m-3">
|
||||
<Button color="secondary" href="/@{data.user.name}">
|
||||
<Icon name="arrow-left" /> Back to {data.user.display_name ?? data.user.name}
|
||||
</Button>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
Button,
|
||||
ButtonGroup,
|
||||
FormGroup,
|
||||
Icon,
|
||||
Input,
|
||||
Modal,
|
||||
ModalBody,
|
||||
|
@ -258,6 +259,12 @@
|
|||
<h1>
|
||||
Edit member profile
|
||||
<ButtonGroup>
|
||||
<IconButton
|
||||
color="secondary"
|
||||
icon="chevron-left"
|
||||
href="/@{data.member.user.name}/{data.member.name}"
|
||||
tooltip="Back to member"
|
||||
/>
|
||||
{#if modified}
|
||||
<Button color="success" on:click={() => updateMember()}>Save changes</Button>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in a new issue