disable nav in options

This commit is contained in:
cupcakearmy 2021-11-23 14:49:38 +01:00
parent 4dbfe6f038
commit 28d97ced68
No known key found for this signature in database
GPG Key ID: 3235314B4D31232F
2 changed files with 11 additions and 10 deletions

View File

@ -25,7 +25,7 @@
"scripts": ["./src/background/index.js"]
},
"options_ui": {
"page": "./src/dashboard/index.html#/options"
"page": "./src/dashboard/index.html#/options?nav=false"
},
"content_scripts": [
{

View File

@ -1,5 +1,5 @@
<script>
import Router, { link } from 'svelte-spa-router'
import Router, { link, querystring } from 'svelte-spa-router'
import Toasts from './components/Toasts.svelte'
import Dev from './components/Dev.svelte'
@ -15,20 +15,21 @@
'/options': Options,
'/limits': Limits,
}
$: nav = new URLSearchParams($querystring).get('nav') !== 'false'
</script>
{#if isDev}
<Dev />
{/if}
<main>
<div class="mb-8">
<!-- svelte-ignore a11y-missing-attribute -->
<a use:link={'/'}><button class="btn">Dashboard</button></a>
<!-- svelte-ignore a11y-missing-attribute -->
<a use:link={'/limits'}><button class="btn">Limits</button></a>
<!-- svelte-ignore a11y-missing-attribute -->
<a use:link={'/options'}><button class="btn">Options</button></a>
</div>
{#if nav}
<div class="mb-8">
<a use:link href="/"><button class="btn">Dashboard</button></a>
<a use:link href="/limits"><button class="btn">Limits</button></a>
<a use:link href="/options"><button class="btn">Options</button></a>
</div>
{/if}
<Router {routes} />
<Toasts />