Allow opening app nav links in new tabs
This commit is contained in:
parent
279d65e258
commit
7a6863763a
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher, getContext } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import active from "svelte-spa-router/active"
|
import active from "svelte-spa-router/active"
|
||||||
import { Icon } from "@budibase/bbui"
|
import { Icon } from "@budibase/bbui"
|
||||||
|
|
||||||
|
@ -13,8 +13,6 @@
|
||||||
export let navStateStore
|
export let navStateStore
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
const sdk = getContext("sdk")
|
|
||||||
const { linkable } = sdk
|
|
||||||
|
|
||||||
let renderKey
|
let renderKey
|
||||||
|
|
||||||
|
@ -46,10 +44,9 @@
|
||||||
styled
|
styled
|
||||||
-->
|
-->
|
||||||
<a
|
<a
|
||||||
href={url}
|
href="#{url}"
|
||||||
on:click={onClickLink}
|
on:click={onClickLink}
|
||||||
use:active={url}
|
use:active={url}
|
||||||
use:linkable
|
|
||||||
class:active={false}
|
class:active={false}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
|
@ -73,10 +70,9 @@
|
||||||
{#each subLinks || [] as subLink}
|
{#each subLinks || [] as subLink}
|
||||||
{#if subLink.internalLink}
|
{#if subLink.internalLink}
|
||||||
<a
|
<a
|
||||||
href={subLink.url}
|
href="#{subLink.url}"
|
||||||
on:click={onClickLink}
|
on:click={onClickLink}
|
||||||
use:active={subLink.url}
|
use:active={subLink.url}
|
||||||
use:linkable
|
|
||||||
>
|
>
|
||||||
{subLink.text}
|
{subLink.text}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue