UBERF-7016: Hide channels without any activity long time (#6176)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-07-30 12:53:24 +07:00
committed by GitHub
parent 1340ca78a9
commit 416eb9942e
28 changed files with 743 additions and 346 deletions
@@ -27,7 +27,7 @@
$: notifyContext = $contextByDocStore.get(value._id)
$: inboxNotifications = notifyContext ? $inboxNotificationsByContextStore.get(notifyContext._id) ?? [] : []
$: hasNotification = !notifyContext?.hidden && inboxNotifications.some(({ isViewed }) => !isViewed)
$: hasNotification = inboxNotifications.some(({ isViewed }) => !isViewed)
</script>
{#if hasNotification}
@@ -14,13 +14,14 @@
-->
<script lang="ts">
export let count: number = 0
export let size: 'small' | 'medium' = 'small'
export let kind: 'primary' | 'secondary' = 'primary'
export let size: 'x-small' | 'small' | 'medium' = 'small'
const maxNumber = 9
</script>
{#if count > 0}
<div class="notifyMarker {size}">
<div class="notifyMarker {size} {kind}">
{#if count > maxNumber}
{maxNumber}+
{:else}
@@ -29,6 +30,10 @@
</div>
{/if}
{#if count === 0 && kind === 'secondary'}
<div class="notifyMarker {size} {kind}" />
{/if}
<style lang="scss">
.notifyMarker {
display: flex;
@@ -36,10 +41,22 @@
justify-content: center;
flex-shrink: 0;
border-radius: 50%;
background-color: var(--global-higlight-Color);
color: var(--global-on-accent-TextColor);
font-weight: 700;
&.primary {
background-color: var(--global-higlight-Color);
color: var(--global-on-accent-TextColor);
}
&.secondary {
background-color: var(--global-subtle-BackgroundColor);
}
&.x-small {
width: 0.75rem;
height: 0.75rem;
}
&.small {
width: 1rem;
height: 1rem;