Fixed author page controls visibiity
This commit is contained in:
parent
b22e27bce6
commit
ef281b0e31
|
@ -426,6 +426,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.shareControl {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.buttonSubscribe {
|
||||
align-items: center;
|
||||
aspect-ratio: 1/1;
|
||||
|
|
|
@ -208,8 +208,7 @@ export const AuthorCard = (props: Props) => {
|
|||
}
|
||||
>
|
||||
<div class={styles.subscribersContainer}>
|
||||
<Switch>
|
||||
<Match when={props.followers && props.followers.length > 0 && !props.isCurrentUser}>
|
||||
<Show when={props.followers && props.followers.length > 0}>
|
||||
<a href="?modal=followers" class={styles.subscribers}>
|
||||
<For each={props.followers.slice(0, 3)}>
|
||||
{(f) => <Userpic name={f.name} userpic={f.userpic} class={styles.userpic} />}
|
||||
|
@ -218,18 +217,9 @@ export const AuthorCard = (props: Props) => {
|
|||
{t('SubscriberWithCount', { count: props.followers.length })}
|
||||
</div>
|
||||
</a>
|
||||
</Match>
|
||||
<Match when={props.followers && props.followers.length > 0 && props.isCurrentUser}>
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() => redirectPage(router, 'profileSettings')}
|
||||
value={t('Edit profile')}
|
||||
/>
|
||||
</Match>
|
||||
</Switch>
|
||||
</Show>
|
||||
|
||||
<Switch>
|
||||
<Match when={!props.isCurrentUser && props.following && props.following.length > 0}>
|
||||
<Show when={props.following && props.following.length > 0}>
|
||||
<a href="?modal=following" class={styles.subscribers}>
|
||||
<For each={props.following.slice(0, 3)}>
|
||||
{(f) => {
|
||||
|
@ -245,23 +235,13 @@ export const AuthorCard = (props: Props) => {
|
|||
{t('SubscriptionWithCount', { count: props?.following.length ?? 0 })}
|
||||
</div>
|
||||
</a>
|
||||
</Match>
|
||||
<Match when={props.isCurrentUser && props.following && props.following.length > 0}>
|
||||
<SharePopup
|
||||
containerCssClass={stylesHeader.control}
|
||||
title={props.author.name}
|
||||
description={props.author.bio}
|
||||
imageUrl={props.author.userpic}
|
||||
shareUrl={getShareUrl({ pathname: `/author/${props.author.slug}` })}
|
||||
trigger={<Button variant="secondary" value={t('Share')} />}
|
||||
/>
|
||||
</Match>
|
||||
</Switch>
|
||||
</Show>
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
<ShowOnlyOnClient>
|
||||
<Show when={isSessionLoaded() && props.author.links}>
|
||||
<Show when={isSessionLoaded()}>
|
||||
<Show when={props.author.links && props.author.links.length}>
|
||||
<div class={styles.authorSubscribeSocial}>
|
||||
<For each={props.author.links}>
|
||||
{(link) => (
|
||||
|
@ -278,6 +258,7 @@ export const AuthorCard = (props: Props) => {
|
|||
)}
|
||||
</For>
|
||||
</div>
|
||||
</Show>
|
||||
<Show when={canFollow()}>
|
||||
<div class={styles.authorSubscribe}>
|
||||
<Show
|
||||
|
@ -362,6 +343,26 @@ export const AuthorCard = (props: Props) => {
|
|||
</Show>
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
<Show when={props.isCurrentUser}>
|
||||
<div class={styles.authorSubscribe}>
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() => redirectPage(router, 'profileSettings')}
|
||||
value={t('Edit profile')}
|
||||
class={styles.button}
|
||||
/>
|
||||
|
||||
<SharePopup
|
||||
containerCssClass={styles.shareControl}
|
||||
title={props.author.name}
|
||||
description={props.author.bio}
|
||||
imageUrl={props.author.userpic}
|
||||
shareUrl={getShareUrl({ pathname: `/author/${props.author.slug}` })}
|
||||
trigger={<Button variant="secondary" value={t('Share')} />}
|
||||
/>
|
||||
</div>
|
||||
</Show>
|
||||
</Show>
|
||||
</ShowOnlyOnClient>
|
||||
<Show when={props.followers}>
|
||||
|
|
Loading…
Reference in New Issue
Block a user