parent
fdd05246a5
commit
d7d1c41d85
|
@ -203,7 +203,7 @@
|
||||||
"Manifesto": "Манифест",
|
"Manifesto": "Манифест",
|
||||||
"Many files, choose only one": "Много файлов, выберете один",
|
"Many files, choose only one": "Много файлов, выберете один",
|
||||||
"Material card": "Карточка материала",
|
"Material card": "Карточка материала",
|
||||||
"Message": "Сообщение",
|
"Message": "Написать",
|
||||||
"More": "Ещё",
|
"More": "Ещё",
|
||||||
"Most commented": "Комментируемое",
|
"Most commented": "Комментируемое",
|
||||||
"Most read": "Читаемое",
|
"Most read": "Читаемое",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import { AuthorRatingControl } from '../../Author/AuthorRatingControl'
|
||||||
import { hideModal } from '../../../stores/ui'
|
import { hideModal } from '../../../stores/ui'
|
||||||
import { getPagePath } from '@nanostores/router'
|
import { getPagePath } from '@nanostores/router'
|
||||||
import { useSession } from '../../../context/session'
|
import { useSession } from '../../../context/session'
|
||||||
|
import { Loading } from '../../_shared/Loading'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
shouts: Shout[]
|
shouts: Shout[]
|
||||||
|
@ -125,47 +126,51 @@ export const AuthorView = (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<div class={styles.authorPage}>
|
<div class={styles.authorPage}>
|
||||||
<div class="wide-container">
|
<div class="wide-container">
|
||||||
<Show when={author()}>
|
<Show when={author()} fallback={<Loading />}>
|
||||||
<div class={styles.authorHeader}>
|
<>
|
||||||
<AuthorCard
|
<div class={styles.authorHeader}>
|
||||||
author={author()}
|
<AuthorCard
|
||||||
isAuthorPage={true}
|
author={author()}
|
||||||
followers={followers()}
|
isAuthorPage={true}
|
||||||
following={following()}
|
followers={followers()}
|
||||||
isCurrentUser={author().slug === user()?.slug}
|
following={following()}
|
||||||
/>
|
isCurrentUser={author().slug === user()?.slug}
|
||||||
</div>
|
/>
|
||||||
</Show>
|
|
||||||
<div class={clsx(styles.groupControls, 'row')}>
|
|
||||||
<div class="col-md-16">
|
|
||||||
<ul class="view-switcher">
|
|
||||||
<li classList={{ 'view-switcher__item--selected': getPage().route === 'author' }}>
|
|
||||||
<a href={getPagePath(router, 'author', { slug: props.authorSlug })}>{t('Publications')}</a>
|
|
||||||
<span class="view-switcher__counter">{author().stat?.shouts}</span>
|
|
||||||
</li>
|
|
||||||
<li classList={{ 'view-switcher__item--selected': getPage().route === 'authorComments' }}>
|
|
||||||
<a href={getPagePath(router, 'authorComments', { slug: props.authorSlug })}>
|
|
||||||
{t('Comments')}
|
|
||||||
</a>
|
|
||||||
<span class="view-switcher__counter">{author().stat?.commented}</span>
|
|
||||||
</li>
|
|
||||||
<li classList={{ 'view-switcher__item--selected': getPage().route === 'authorAbout' }}>
|
|
||||||
<a
|
|
||||||
onClick={() => checkBioHeight()}
|
|
||||||
href={getPagePath(router, 'authorAbout', { slug: props.authorSlug })}
|
|
||||||
>
|
|
||||||
{t('Profile')}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class={clsx('col-md-8', styles.additionalControls)}>
|
|
||||||
<div class={styles.ratingContainer}>
|
|
||||||
{t('Karma')}
|
|
||||||
<AuthorRatingControl author={props.author} class={styles.ratingControl} />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class={clsx(styles.groupControls, 'row')}>
|
||||||
</div>
|
<div class="col-md-16">
|
||||||
|
<ul class="view-switcher">
|
||||||
|
<li classList={{ 'view-switcher__item--selected': getPage().route === 'author' }}>
|
||||||
|
<a href={getPagePath(router, 'author', { slug: props.authorSlug })}>
|
||||||
|
{t('Publications')}
|
||||||
|
</a>
|
||||||
|
<span class="view-switcher__counter">{author().stat.shouts}</span>
|
||||||
|
</li>
|
||||||
|
<li classList={{ 'view-switcher__item--selected': getPage().route === 'authorComments' }}>
|
||||||
|
<a href={getPagePath(router, 'authorComments', { slug: props.authorSlug })}>
|
||||||
|
{t('Comments')}
|
||||||
|
</a>
|
||||||
|
<span class="view-switcher__counter">{author().stat.commented}</span>
|
||||||
|
</li>
|
||||||
|
<li classList={{ 'view-switcher__item--selected': getPage().route === 'authorAbout' }}>
|
||||||
|
<a
|
||||||
|
onClick={() => checkBioHeight()}
|
||||||
|
href={getPagePath(router, 'authorAbout', { slug: props.authorSlug })}
|
||||||
|
>
|
||||||
|
{t('Profile')}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class={clsx('col-md-8', styles.additionalControls)}>
|
||||||
|
<div class={styles.ratingContainer}>
|
||||||
|
{t('Karma')}
|
||||||
|
<AuthorRatingControl author={props.author} class={styles.ratingControl} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Switch>
|
<Switch>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user