40 lines
772 B
Svelte
40 lines
772 B
Svelte
<!--
|
|
SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
-->
|
|
|
|
<script>
|
|
import { user } from "./store.js";
|
|
|
|
import IssueAttr from "./IssueAttr.svelte";
|
|
|
|
let user_val = [];
|
|
user.subscribe((value) => {
|
|
user_val = value;
|
|
});
|
|
|
|
export let mentions = 0;
|
|
export let assignments = 0;
|
|
export let issues = 0;
|
|
|
|
let mentions_icon = "/at-sign.svg";
|
|
let issues_icon = "/bell.svg";
|
|
</script>
|
|
|
|
<span>
|
|
{#if assignments > 0}
|
|
{#if user_val}
|
|
<IssueAttr count={assignments} img={user.avatar_url} />
|
|
{/if}
|
|
{/if}
|
|
|
|
{#if mentions > 0}
|
|
<IssueAttr count={mentions} img={mentions_icon} />
|
|
{/if}
|
|
|
|
{#if issues > 0}
|
|
<IssueAttr count={issues} img={issues_icon} />
|
|
{/if}
|
|
</span>
|