Revert "o_0"
This reverts commit 899632a74d193e8c857541fe9adedf4e15434677.
This commit is contained in:
parent
417f2c6678
commit
c2f0ce0145
681
package-lock.json
generated
681
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -153,12 +153,12 @@ export const CommentsTree = (props: Props) => {
|
|||
</Show>
|
||||
</div>
|
||||
<ul class={styles.comments}>
|
||||
<For each={sortedComments().filter((r) => !r.reply_to)}>
|
||||
<For each={sortedComments().filter((r) => !r.replyTo)}>
|
||||
{(reaction) => (
|
||||
<Comment
|
||||
sortedComments={sortedComments()}
|
||||
isArticleAuthor={Boolean(
|
||||
props.articleAuthors.some((a) => a.slug === reaction.created_by.slug),
|
||||
props.articleAuthors.some((a) => a?.slug === reaction.created_by.slug),
|
||||
)}
|
||||
comment={reaction}
|
||||
clickedReply={(id) => setClickedReplyId(id)}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
import { clsx } from 'clsx'
|
||||
import { createEffect, createMemo, createSignal, Show } from 'solid-js'
|
||||
|
||||
import { useLocalize } from '../../../context/localize'
|
||||
import { useMediaQuery } from '../../../context/mediaQuery'
|
||||
import { useSession } from '../../../context/session'
|
||||
import styles from './TopicBadge.module.scss'
|
||||
import { FollowingEntity, Topic } from '../../../graphql/schema/core.gen'
|
||||
import { createMemo, createSignal, Show } from 'solid-js'
|
||||
import { imageProxy } from '../../../utils/imageProxy'
|
||||
import { Button } from '../../_shared/Button'
|
||||
import { useSession } from '../../../context/session'
|
||||
import { useLocalize } from '../../../context/localize'
|
||||
import { follow, unfollow } from '../../../stores/zine/common'
|
||||
import { capitalize } from '../../../utils/capitalize'
|
||||
import { getImageUrl } from '../../../utils/getImageUrl'
|
||||
|
@ -19,16 +22,16 @@ type Props = {
|
|||
}
|
||||
|
||||
export const TopicBadge = (props: Props) => {
|
||||
const { t, lang } = useLocalize()
|
||||
const { mediaMatches } = useMediaQuery()
|
||||
const [isMobileView, setIsMobileView] = createSignal(false)
|
||||
const [isSubscribing, setIsSubscribing] = createSignal(false)
|
||||
createEffect(() => {
|
||||
setIsMobileView(!mediaMatches.sm)
|
||||
})
|
||||
const { t } = useLocalize()
|
||||
const {
|
||||
subscriptions,
|
||||
actions: { loadSubscriptions },
|
||||
actions: { loadSubscriptions, loadSession },
|
||||
isAuthenticated,
|
||||
session,
|
||||
} = useSession()
|
||||
|
||||
const subscribed = createMemo(() =>
|
||||
|
@ -51,18 +54,10 @@ export const TopicBadge = (props: Props) => {
|
|||
|
||||
return (
|
||||
<div class={styles.TopicBadge}>
|
||||
<div class={styles.basicInfo}>
|
||||
<a
|
||||
href={`/topic/${props.topic.slug}`}
|
||||
class={clsx(styles.picture, {
|
||||
[styles.withImage]: props.topic.pic,
|
||||
[styles.smallSize]: isMobileView(),
|
||||
})}
|
||||
style={
|
||||
props.topic.pic && {
|
||||
'background-image': `url('${getImageUrl(props.topic.pic, { width: 40, height: 40 })}')`,
|
||||
}
|
||||
}
|
||||
class={clsx(styles.picture, { [styles.withImage]: props.topic.pic })}
|
||||
style={props.topic.pic && { 'background-image': `url('${imageProxy(props.topic.pic)}')` }}
|
||||
/>
|
||||
<a href={`/topic/${props.topic.slug}`} class={styles.info}>
|
||||
<span class={styles.title}>{title()}</span>
|
||||
|
@ -77,13 +72,16 @@ export const TopicBadge = (props: Props) => {
|
|||
<div class={clsx('text-truncate', styles.description)}>{props.topic.body}</div>
|
||||
</Show>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<Show when={isAuthenticated()}>
|
||||
<div class={styles.actions}>
|
||||
<Show
|
||||
when={!props.minimizeSubscribeButton}
|
||||
fallback={
|
||||
<CheckButton text={t('Follow')} checked={subscribed()} onClick={() => subscribe(!subscribed)} />
|
||||
<CheckButton
|
||||
text={t('Follow')}
|
||||
checked={subscribed()}
|
||||
onClick={() => subscribe(!subscribed)}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Show
|
||||
|
@ -92,7 +90,7 @@ export const TopicBadge = (props: Props) => {
|
|||
<Button
|
||||
variant="primary"
|
||||
size="S"
|
||||
value={isSubscribing() ? t('subscribing...') : t('Subscribe')}
|
||||
value={isSubscribing() ? t('...subscribing') : t('Subscribe')}
|
||||
onClick={() => subscribe(true)}
|
||||
class={styles.subscribeButton}
|
||||
/>
|
||||
|
@ -108,6 +106,7 @@ export const TopicBadge = (props: Props) => {
|
|||
</Show>
|
||||
</Show>
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -181,8 +181,6 @@ export const InboxView = (props: Props) => {
|
|||
setIsScrollToNewVisible(false)
|
||||
}
|
||||
|
||||
const isLoaded = createMemo(() => props.isLoaded)
|
||||
|
||||
return (
|
||||
<div class={clsx('container', styles.Inbox)}>
|
||||
<Modal variant="narrow" name="inviteToChat">
|
||||
|
|
Loading…
Reference in New Issue
Block a user