Merge branch 'fixies_after_remove_astro' into 'dev'

[146] Astro fixies

See merge request discoursio/discoursio-webapp!39
This commit is contained in:
Igor 2023-03-09 14:18:20 +00:00
commit 191e3066db
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,13 +267,15 @@ export const FullArticle = (props: ArticleProps) => {
)} )}
</For> </For>
</div> </div>
<Show when={isReactionsLoaded()}> <div ref={commentsRef}>
<CommentsTree <Show when={isReactionsLoaded()}>
shoutId={props.article.id} <CommentsTree
shoutSlug={props.article.slug} shoutId={props.article.id}
commentAuthors={props.article.authors} shoutSlug={props.article.slug}
/> commentAuthors={props.article.authors}
</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"
/> />
<p class="form-message form-message--error">{t(`${slugError()}`)}</p> <Show when={slugError()}>
<p class="form-message form-message--error">{t(`${slugError()}`)}</p>
</Show>
</div> </div>
</div> </div>
</div> </div>