footer-fix
This commit is contained in:
parent
93f6a1b080
commit
8fbcde234e
|
@ -46,7 +46,7 @@ export const Comment = (props: Props) => {
|
|||
const canEdit = createMemo(
|
||||
() =>
|
||||
Boolean(author()?.id) &&
|
||||
(props.comment?.created_by?.id === author().id || session()?.user?.roles.includes('editor')),
|
||||
(props.comment?.created_by?.id === author().id || session()?.user?.roles.includes('editor'))
|
||||
)
|
||||
|
||||
const comment = createMemo(() => props.comment)
|
||||
|
|
|
@ -83,7 +83,7 @@ export const FullArticle = (props: Props) => {
|
|||
Boolean(author()?.id) &&
|
||||
(props.article?.authors?.some((a) => Boolean(a) && a?.id === author().id) ||
|
||||
props.article?.created_by?.id === author().id ||
|
||||
session()?.user?.roles.includes('editor')),
|
||||
session()?.user?.roles.includes('editor'))
|
||||
)
|
||||
|
||||
const mainTopic = createMemo(() => {
|
||||
|
|
|
@ -28,7 +28,7 @@ export const AuthorsList = (props: Props) => {
|
|||
const result = await apiClient.loadAuthorsBy({
|
||||
by: { order: queryType },
|
||||
limit: PAGE_SIZE,
|
||||
offset: offset,
|
||||
offset: offset
|
||||
})
|
||||
|
||||
if (queryType === 'shouts') {
|
||||
|
@ -44,7 +44,7 @@ export const AuthorsList = (props: Props) => {
|
|||
const queryType = props.query
|
||||
const nextPage = currentPage()[queryType] + 1
|
||||
fetchAuthors(queryType, nextPage).then(() =>
|
||||
setCurrentPage({ ...currentPage(), [queryType]: nextPage }),
|
||||
setCurrentPage({ ...currentPage(), [queryType]: nextPage })
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ export const AuthorsList = (props: Props) => {
|
|||
author={author}
|
||||
isFollowed={{
|
||||
loaded: !loading(),
|
||||
value: isOwnerSubscribed(author.id),
|
||||
value: isOwnerSubscribed(author.id)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -125,7 +125,7 @@ export const ArticleCard = (props: ArticleCardProps) => {
|
|||
Boolean(author()?.id) &&
|
||||
(props.article?.authors?.some((a) => Boolean(a) && a?.id === author().id) ||
|
||||
props.article?.created_by?.id === author().id ||
|
||||
session()?.user?.roles.includes('editor')),
|
||||
session()?.user?.roles.includes('editor'))
|
||||
)
|
||||
|
||||
const scrollToComments = (event) => {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -33,7 +33,7 @@ export const AllAuthors = (props: Props) => {
|
|||
const { searchParams, changeSearchParams } = useRouter<AllAuthorsPageSearchParams>()
|
||||
const { sortedAuthors } = useAuthorsStore({
|
||||
authors: props.authors,
|
||||
sortBy: searchParams().by || 'name',
|
||||
sortBy: searchParams().by || 'name'
|
||||
})
|
||||
|
||||
const [searchQuery, setSearchQuery] = createSignal('')
|
||||
|
@ -51,7 +51,7 @@ export const AllAuthors = (props: Props) => {
|
|||
const byLetter = createMemo<{ [letter: string]: Author[] }>(() => {
|
||||
return sortedAuthors().reduce(
|
||||
(acc, author) => authorLetterReduce(acc, author, lang()),
|
||||
{} as { [letter: string]: Author[] },
|
||||
{} as { [letter: string]: Author[] }
|
||||
)
|
||||
})
|
||||
|
||||
|
@ -87,21 +87,21 @@ export const AllAuthors = (props: Props) => {
|
|||
<ul class={clsx(styles.viewSwitcher, 'view-switcher')}>
|
||||
<li
|
||||
class={clsx({
|
||||
['view-switcher__item--selected']: !searchParams().by || searchParams().by === 'shouts',
|
||||
['view-switcher__item--selected']: !searchParams().by || searchParams().by === 'shouts'
|
||||
})}
|
||||
>
|
||||
<a href="/authors?by=shouts">{t('By shouts')}</a>
|
||||
</li>
|
||||
<li
|
||||
class={clsx({
|
||||
['view-switcher__item--selected']: searchParams().by === 'followers',
|
||||
['view-switcher__item--selected']: searchParams().by === 'followers'
|
||||
})}
|
||||
>
|
||||
<a href="/authors?by=followers">{t('By popularity')}</a>
|
||||
</li>
|
||||
<li
|
||||
class={clsx({
|
||||
['view-switcher__item--selected']: searchParams().by === 'name',
|
||||
['view-switcher__item--selected']: searchParams().by === 'name'
|
||||
})}
|
||||
>
|
||||
<a href="/authors?by=name">{t('By name')}</a>
|
||||
|
|
|
@ -72,7 +72,7 @@ export const AuthorView = (props: Props) => {
|
|||
try {
|
||||
const [subscriptionsResult, followersResult] = await Promise.all([
|
||||
apiClient.getAuthorFollows({ slug }),
|
||||
apiClient.getAuthorFollowers({ slug }),
|
||||
apiClient.getAuthorFollowers({ slug })
|
||||
])
|
||||
|
||||
const { authors, topics } = subscriptionsResult
|
||||
|
|
|
@ -108,8 +108,8 @@ export const SessionProvider = (props: {
|
|||
changeSearchParams({ mode: 'confirm-email', m: 'auth' }, true)
|
||||
}
|
||||
},
|
||||
{ defer: true },
|
||||
),
|
||||
{ defer: true }
|
||||
)
|
||||
)
|
||||
|
||||
// handle token confirm
|
||||
|
@ -120,7 +120,7 @@ export const SessionProvider = (props: {
|
|||
changeSearchParams({
|
||||
mode: 'confirm-email',
|
||||
m: 'auth',
|
||||
access_token,
|
||||
access_token
|
||||
})
|
||||
else if (token) changeSearchParams({ mode: 'change-password', modal: 'auth', token })
|
||||
})
|
||||
|
|
|
@ -236,5 +236,5 @@ export const apiClient = {
|
|||
.query(reactionsLoadBy, { by, limit: limit ?? 1000, offset: offset ?? 0 })
|
||||
.toPromise()
|
||||
return resp.data.load_reactions_by
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user