Files

41 lines
1.3 KiB
Svelte
Raw Permalink Normal View History

2024-08-15 14:44:53 +03:00
<script>
import Avatar from "../account/Avatar.svelte";
2026-04-20 21:07:35 +03:00
import { getContext } from "svelte";
2024-08-24 18:51:36 +03:00
import Dropdown from "../common/Dropdown.svelte";
2024-08-15 14:44:53 +03:00
const channel = getContext("channel");
const user = getContext("user");
</script>
2026-04-20 21:07:35 +03:00
<div class="top-nav">
2026-05-06 19:36:53 +03:00
{#if channel.auth == "lucent"}
<a class="top-nav-item" href="{channel.lucentUrl}/members">Members</a>
2026-05-14 19:24:25 +03:00
{:else}
<a href="/lunar">Store admin</a>
2026-05-06 19:36:53 +03:00
{/if}
2024-08-24 19:35:07 +03:00
{#if channel.commands.length > 0}
2024-08-24 18:51:36 +03:00
<Dropdown>
<div slot="button">Actions</div>
{#each channel.commands as command}
2026-04-20 21:07:35 +03:00
<a
href="{channel.lucentUrl}/command-report/{command.signature}"
class="top-nav-item">{command.name}</a
>
2024-08-24 18:51:36 +03:00
{/each}
</Dropdown>
2024-08-15 14:44:53 +03:00
{/if}
<!-- <div>-->
<!-- <form method="GET">-->
<!-- <input type="search" name="filter[search_regex]" placeholder="Search"-->
<!-- class="form-control" required/>-->
<!-- </form>-->
<!-- </div>-->
2026-05-06 19:36:53 +03:00
{#if channel.auth == "lucent"}
<a href="{channel.lucentUrl}/profile">
<Avatar side="28" name={user.name} />
</a>
{:else}
2026-04-20 21:07:35 +03:00
<Avatar side="28" name={user.name} />
2026-05-06 19:36:53 +03:00
{/if}
2024-08-15 14:44:53 +03:00
</div>