[146] Astro fixies

This commit is contained in:
ilya-bkv 2023-03-09 17:08:43 +03:00
parent 58a2091e0d
commit 57d6ac14db
5 changed files with 29 additions and 12 deletions

View File

@ -231,5 +231,7 @@
"Your name will appear on your profile page and as your signature in publications, comments and responses.": "Your name will appear on your profile page and as your signature in publications, comments and responses", "Your name will appear on your profile page and as your signature in publications, comments and responses.": "Your name will appear on your profile page and as your signature in publications, comments and responses",
"zine": "zine", "zine": "zine",
"By time": "By time", "By time": "By time",
"New only": "New only" "New only": "New only",
"Bookmarks": "Bookmarks",
"Logout": "Logout"
} }

View File

@ -249,5 +249,7 @@
"view": "просмотр", "view": "просмотр",
"zine": "журнал", "zine": "журнал",
"By time": "По порядку", "By time": "По порядку",
"New only": "Только новые" "New only": "Только новые",
"Bookmarks": "Закладки",
"Logout": "Выход"
} }

View File

@ -105,6 +105,14 @@ export const FullArticle = (props: ArticleProps) => {
actions: { loadReactionsBy } actions: { loadReactionsBy }
} = useReactions() } = useReactions()
let commentsRef: HTMLDivElement | undefined
const scrollToComments = () => {
if (!isReactionsLoaded()) {
return
}
commentsRef.scrollIntoView({ behavior: 'smooth' })
}
return ( return (
<> <>
<Title>{props.article.title}</Title> <Title>{props.article.title}</Title>
@ -195,9 +203,9 @@ export const FullArticle = (props: ArticleProps) => {
</div> </div>
</Show> </Show>
<div class={styles.shoutStatsItem}> <div class={styles.shoutStatsItem} onClick={() => scrollToComments()}>
<Icon name="comment" class={styles.icon} /> <Icon name="comment" class={styles.icon} />
{props.article.stat?.commented || ''} {/*{props.article.stat?.commented || ''}*/}
</div> </div>
<div class={styles.shoutStatsItem}> <div class={styles.shoutStatsItem}>
@ -259,6 +267,7 @@ export const FullArticle = (props: ArticleProps) => {
)} )}
</For> </For>
</div> </div>
<div ref={commentsRef}>
<Show when={isReactionsLoaded()}> <Show when={isReactionsLoaded()}>
<CommentsTree <CommentsTree
shoutId={props.article.id} shoutId={props.article.id}
@ -268,6 +277,7 @@ export const FullArticle = (props: ArticleProps) => {
</Show> </Show>
</div> </div>
</div> </div>
</div>
</> </>
) )
} }

View File

@ -39,6 +39,7 @@ export default gql`
viewed viewed
reacted reacted
rating rating
commented
} }
} }
} }

View File

@ -140,7 +140,9 @@ export const ProfileSettingsPage = () => {
value={form.slug} value={form.slug}
class="nolabel" class="nolabel"
/> />
<Show when={slugError()}>
<p class="form-message form-message--error">{t(`${slugError()}`)}</p> <p class="form-message form-message--error">{t(`${slugError()}`)}</p>
</Show>
</div> </div>
</div> </div>
</div> </div>