Minor header controls fixes

This commit is contained in:
kvakazyambra 2022-11-13 16:17:38 +03:00
parent c269e0d632
commit 9a0b84be3d
2 changed files with 16 additions and 11 deletions

View File

@ -118,6 +118,7 @@
.usernav {
display: inline-flex;
font-weight: 500;
padding-right: 0;
position: relative;
width: auto;
@ -484,7 +485,7 @@
}
}
.userControlItemWritePost {
.userControlItemVerbose {
@include media-breakpoint-up(lg) {
width: auto;

View File

@ -148,20 +148,22 @@ export const Header = (props: Props) => {
</div>
<div class={styles.usernav}>
<div class={clsx(styles.userControl, styles.userControl, 'col')}>
<div class={clsx(styles.userControlItem, styles.userControlItemWritePost)}>
<div class={clsx(styles.userControlItem, styles.userControlItemVerbose)}>
<a href="/create" onClick={handleClientRouteLinkClick}>
<span class={styles.textLabel}>{t('Create post')}</span>
<Icon name="pencil" class={styles.icon} />
</a>
</div>
<div class={styles.userControlItem}>
<a href="#" onClick={handleBellIconClick}>
<div>
<Icon name="bell-white" counter={authorized() ? warnings().length : 1} />
</div>
</a>
</div>
<Show when={authorized()}>
<div class={styles.userControlItem}>
<a href="#" onClick={handleBellIconClick}>
<div>
<Icon name="bell-white" counter={authorized() ? warnings().length : 1} />
</div>
</a>
</div>
</Show>
<Show when={visibleWarnings()}>
<div class={clsx(styles.userControlItem, 'notifications')}>
@ -172,9 +174,11 @@ export const Header = (props: Props) => {
<Show
when={authorized()}
fallback={
<div class={clsx(styles.userControlItem, 'loginbtn')}>
<div class={clsx(styles.userControlItem, styles.userControlItemVerbose, 'loginbtn')}>
<a href="?modal=auth&mode=login" onClick={handleClientRouteLinkClick}>
<Icon name="user-anonymous" />
<span class={styles.textLabel}>{t('Enter')}</span>
{/* TODO: заменить иконку */}
<Icon name="inbox-white" class={styles.icon} counter={session()?.news?.unread || 0} />
</a>
</div>
}