turn "view page" buttons into proper links
I got tired of not being able to ctrl+click to open in a new tab
This commit is contained in:
parent
3f6c7d5c46
commit
3c37e63aa2
@ -6,7 +6,7 @@
|
|||||||
import twemoji from 'twemoji';
|
import twemoji from 'twemoji';
|
||||||
import Privacy from './Privacy.svelte';
|
import Privacy from './Privacy.svelte';
|
||||||
import MemberEdit from './MemberEdit.svelte';
|
import MemberEdit from './MemberEdit.svelte';
|
||||||
import { navigate } from 'svelte-navigator';
|
import { Link } from 'svelte-navigator';
|
||||||
|
|
||||||
import { Member, Group } from '../../api/types';
|
import { Member, Group } from '../../api/types';
|
||||||
|
|
||||||
@ -110,9 +110,9 @@
|
|||||||
{#if isMainDash}<Button style="flex: 0" color="secondary" on:click={() => memberMode = true}>Members</Button>{/if}
|
{#if isMainDash}<Button style="flex: 0" color="secondary" on:click={() => memberMode = true}>Members</Button>{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{#if !isPage}
|
{#if !isPage}
|
||||||
<Button style="flex: 0; {!isPublic && "float: right;"}" color="primary" on:click={() => navigate(isPublic ? `/profile/g/${group.id}` : `/dash/g/${group.id}`)}>View page</Button>
|
<Link to={isPublic ? `/profile/g/${group.id}` : `/dash/g/${group.id}`}><Button style="flex: 0; {!isPublic && "float: right;"}" color="primary">View page</Button></Link>
|
||||||
{:else if !isPublic}
|
{:else if !isPublic}
|
||||||
<Button style="flex: 0; {!isPublic && "float: right;"}" color="primary" on:click={() => navigate("/dash?tab=groups")}>View system</Button>
|
<Link to="/dash?tab=groups"><Button style="flex: 0; {!isPublic && "float: right;"}" color="primary">View system</Button></Link>
|
||||||
{/if}
|
{/if}
|
||||||
{:else if editMode}
|
{:else if editMode}
|
||||||
<Edit on:deletion on:update bind:group bind:editMode />
|
<Edit on:deletion on:update bind:group bind:editMode />
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
import ProxyTags from './ProxyTags.svelte';
|
import ProxyTags from './ProxyTags.svelte';
|
||||||
|
|
||||||
import { Member, Group } from '../../api/types';
|
import { Member, Group } from '../../api/types';
|
||||||
import { navigate } from 'svelte-navigator';
|
import { Link } from 'svelte-navigator';
|
||||||
|
|
||||||
export let groups: Group[] = [];
|
export let groups: Group[] = [];
|
||||||
export let member: Member;
|
export let member: Member;
|
||||||
@ -150,9 +150,9 @@
|
|||||||
{#if isMainDash}<Button style="flex: 0" color="secondary" on:click={() => groupMode = true}>Groups</Button>{/if}
|
{#if isMainDash}<Button style="flex: 0" color="secondary" on:click={() => groupMode = true}>Groups</Button>{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{#if !isPage}
|
{#if !isPage}
|
||||||
<Button style="flex: 0; {!isPublic && "float: right;"}" color="primary" on:click={() => navigate(isPublic ? `/profile/m/${member.id}` : `/dash/m/${member.id}`)}>View page</Button>
|
<Link to={isPublic ? `/profile/m/${member.id}` : `/dash/m/${member.id}`}><Button style="flex: 0; {!isPublic && "float: right;"}" color="primary">View page</Button></Link>
|
||||||
{:else}
|
{:else}
|
||||||
<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>
|
<Link to={isPublic ? `/profile/s/${member.system}?tab=members` : "/dash?tab=members"}><Button style="flex: 0; {!isPublic && "float: right;"}" color="primary">View system</Button></Link>
|
||||||
{/if}
|
{/if}
|
||||||
{:else if editMode}
|
{:else if editMode}
|
||||||
<Edit on:deletion on:update bind:member bind:editMode />
|
<Edit on:deletion on:update bind:member bind:editMode />
|
||||||
|
Loading…
Reference in New Issue
Block a user