Merge branch 'show_followers' into 'dev'
Show followers list See merge request discoursio/discoursio-webapp!42
This commit is contained in:
commit
2fb7e89793
|
@ -105,7 +105,6 @@ export const Comment = (props: Props) => {
|
||||||
<Userpic
|
<Userpic
|
||||||
user={comment().createdBy as Author}
|
user={comment().createdBy as Author}
|
||||||
isBig={false}
|
isBig={false}
|
||||||
isAuthorsList={false}
|
|
||||||
class={clsx({
|
class={clsx({
|
||||||
[styles.compactUserpic]: props.compact
|
[styles.compactUserpic]: props.compact
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -123,10 +123,12 @@ export const FullArticle = (props: ArticleProps) => {
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<Show when={props.article.cover}>
|
||||||
class={styles.shoutCover}
|
<div
|
||||||
style={{ 'background-image': `url('${props.article.cover}')` }}
|
class={styles.shoutCover}
|
||||||
/>
|
style={{ 'background-image': `url('${props.article.cover}')` }}
|
||||||
|
/>
|
||||||
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Show when={media() && props.article.layout !== 'image'}>
|
<Show when={media() && props.article.layout !== 'image'}>
|
||||||
|
@ -244,7 +246,7 @@ export const FullArticle = (props: ArticleProps) => {
|
||||||
<For each={props.article.authors}>
|
<For each={props.article.authors}>
|
||||||
{(a) => (
|
{(a) => (
|
||||||
<div class="col-xl-12">
|
<div class="col-xl-12">
|
||||||
<AuthorCard author={a} compact={false} hasLink={true} liteButtons={true} />
|
<AuthorCard author={a} hasLink={true} liteButtons={true} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { useLocalize } from '../../context/localize'
|
||||||
|
|
||||||
interface AuthorCardProps {
|
interface AuthorCardProps {
|
||||||
caption?: string
|
caption?: string
|
||||||
compact?: boolean
|
hideWriteButton?: boolean
|
||||||
hideDescription?: boolean
|
hideDescription?: boolean
|
||||||
hideFollow?: boolean
|
hideFollow?: boolean
|
||||||
hasLink?: boolean
|
hasLink?: boolean
|
||||||
|
@ -166,7 +166,7 @@ export const AuthorCard = (props: AuthorCardProps) => {
|
||||||
</button>
|
</button>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={!props.compact && !props.isAuthorsList}>
|
<Show when={!props.hideWriteButton}>
|
||||||
<button
|
<button
|
||||||
class={styles.button}
|
class={styles.button}
|
||||||
classList={{
|
classList={{
|
||||||
|
|
|
@ -6,7 +6,7 @@ export const AuthorFull = (props: { author: Author }) => {
|
||||||
return (
|
return (
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-18 col-lg-16 user-details">
|
<div class="col-md-18 col-lg-16 user-details">
|
||||||
<AuthorCard author={props.author} compact={false} isAuthorPage={true} />
|
<AuthorCard author={props.author} isAuthorPage={true} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -69,7 +69,7 @@ export const Beside = (props: BesideProps) => {
|
||||||
<Show when={props.wrapper === 'author'}>
|
<Show when={props.wrapper === 'author'}>
|
||||||
<AuthorCard
|
<AuthorCard
|
||||||
author={value as Author}
|
author={value as Author}
|
||||||
compact={true}
|
hideWriteButton={true}
|
||||||
hasLink={true}
|
hasLink={true}
|
||||||
truncateBio={true}
|
truncateBio={true}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -99,7 +99,7 @@ export const AuthorView = (props: AuthorProps) => {
|
||||||
})
|
})
|
||||||
setCommented(data)
|
setCommented(data)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[getReactionsBy]:', error)
|
console.error('[getReactionsBy comment]', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -209,6 +209,19 @@ export const AuthorView = (props: AuthorProps) => {
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</Match>
|
</Match>
|
||||||
|
<Match when={searchParams().by === 'followed'}>
|
||||||
|
<div class="wide-container">
|
||||||
|
<div class="row">
|
||||||
|
<For each={followers()}>
|
||||||
|
{(follower: Author) => (
|
||||||
|
<div class="col-md-6 col-lg-4">
|
||||||
|
<AuthorCard author={follower} hideWriteButton={true} hasLink={true} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</For>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Match>
|
||||||
<Match when={searchParams().by === 'rating'}>
|
<Match when={searchParams().by === 'rating'}>
|
||||||
<Row1 article={sortedArticles()[0]} />
|
<Row1 article={sortedArticles()[0]} />
|
||||||
<Row2 articles={sortedArticles().slice(1, 3)} isEqual={true} />
|
<Row2 articles={sortedArticles().slice(1, 3)} isEqual={true} />
|
||||||
|
|
|
@ -123,7 +123,7 @@ export const FeedView = () => {
|
||||||
<For each={topAuthors().slice(0, 5)}>
|
<For each={topAuthors().slice(0, 5)}>
|
||||||
{(author) => (
|
{(author) => (
|
||||||
<li>
|
<li>
|
||||||
<AuthorCard author={author} compact={true} hasLink={true} />
|
<AuthorCard author={author} hideWriteButton={true} hasLink={true} />
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
@ -154,7 +154,7 @@ export const FeedView = () => {
|
||||||
<AuthorCard
|
<AuthorCard
|
||||||
author={comment.createdBy as Author}
|
author={comment.createdBy as Author}
|
||||||
isFeedMode={true}
|
isFeedMode={true}
|
||||||
compact={true}
|
hideWriteButton={true}
|
||||||
hideFollow={true}
|
hideFollow={true}
|
||||||
/>
|
/>
|
||||||
<div class={clsx('text-truncate', styles.commentArticleTitle)}>
|
<div class={clsx('text-truncate', styles.commentArticleTitle)}>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user