mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-06-03 20:28:28 +02:00
Add logout button in nav
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
||||
</script>
|
||||
|
||||
<Router url="{url}">
|
||||
<Nav />
|
||||
<Nav user="{user}" />
|
||||
<main role="main" class="container">
|
||||
<div>
|
||||
<Route path="client/:clientId" component="{EditClient}" />
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
import About from "./About.svelte";
|
||||
import Clients from "./Clients.svelte";
|
||||
import NavLink from "./NavLink.svelte";
|
||||
|
||||
export let user;
|
||||
</script>
|
||||
|
||||
<header>
|
||||
@@ -17,5 +19,12 @@
|
||||
<li class="nav-item"><NavLink to="about">About</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="text-light">
|
||||
<small>Logged in as {user}</small>
|
||||
{#if user != "anonymous"}
|
||||
<a class="btn btn-outline-light" href="/oauth2/sign_out">Log out</a>
|
||||
{/if}
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user