minor-fixes
Some checks failed
deploy / test (push) Failing after 1m9s

This commit is contained in:
Untone 2023-12-31 08:01:34 +03:00
parent 4119c2d30c
commit 8879519b47
6 changed files with 15 additions and 13 deletions

View File

@ -7,16 +7,16 @@ import { useSession } from '../../../context/session'
import { Author, FollowingEntity } from '../../../graphql/schema/core.gen' import { Author, FollowingEntity } from '../../../graphql/schema/core.gen'
import { router, useRouter } from '../../../stores/router' import { router, useRouter } from '../../../stores/router'
import { follow, unfollow } from '../../../stores/zine/common' import { follow, unfollow } from '../../../stores/zine/common'
// import { capitalize } from '../../../utils/capitalize'
import { isCyrillic } from '../../../utils/cyrillic'
import { translit } from '../../../utils/ru2en'
import { Button } from '../../_shared/Button' import { Button } from '../../_shared/Button'
import { CheckButton } from '../../_shared/CheckButton' import { CheckButton } from '../../_shared/CheckButton'
import { Icon } from '../../_shared/Icon' import { Icon } from '../../_shared/Icon'
import { Userpic } from '../Userpic' import { Userpic } from '../Userpic'
import { translit } from '../../../utils/ru2en'
import styles from './AuthorBadge.module.scss' import styles from './AuthorBadge.module.scss'
import stylesButton from '../../_shared/Button/Button.module.scss' import stylesButton from '../../_shared/Button/Button.module.scss'
import { capitalize } from '../../../utils/capitalize'
import { isCyrillic } from '../../../utils/cyrillic'
type Props = { type Props = {
author: Author author: Author

View File

@ -10,6 +10,7 @@ import { FollowingEntity, Topic } from '../../../graphql/schema/core.gen'
import { SubscriptionFilter } from '../../../pages/types' import { SubscriptionFilter } from '../../../pages/types'
import { router, useRouter } from '../../../stores/router' import { router, useRouter } from '../../../stores/router'
import { follow, unfollow } from '../../../stores/zine/common' import { follow, unfollow } from '../../../stores/zine/common'
import { isCyrillic } from '../../../utils/cyrillic'
import { isAuthor } from '../../../utils/isAuthor' import { isAuthor } from '../../../utils/isAuthor'
import { translit } from '../../../utils/ru2en' import { translit } from '../../../utils/ru2en'
import { Button } from '../../_shared/Button' import { Button } from '../../_shared/Button'
@ -22,7 +23,6 @@ import { Userpic } from '../Userpic'
import styles from './AuthorCard.module.scss' import styles from './AuthorCard.module.scss'
import stylesButton from '../../_shared/Button/Button.module.scss' import stylesButton from '../../_shared/Button/Button.module.scss'
import { isCyrillic } from '../../../utils/cyrillic'
type Props = { type Props = {
author: Author author: Author

View File

@ -5,10 +5,10 @@ import { useLocalize } from '../../../context/localize'
import { Author } from '../../../graphql/schema/core.gen' import { Author } from '../../../graphql/schema/core.gen'
import { capitalize } from '../../../utils/capitalize' import { capitalize } from '../../../utils/capitalize'
import { isCyrillic } from '../../../utils/cyrillic' import { isCyrillic } from '../../../utils/cyrillic'
import { translit } from '../../../utils/ru2en'
import { Userpic } from '../Userpic' import { Userpic } from '../Userpic'
import styles from './AhtorLink.module.scss' import styles from './AhtorLink.module.scss'
import { translit } from '../../../utils/ru2en'
type Props = { type Props = {
author: Author author: Author

View File

@ -7,17 +7,17 @@ import { createEffect, createMemo, createSignal, For, Show } from 'solid-js'
import { useLocalize } from '../../context/localize' import { useLocalize } from '../../context/localize'
import { useRouter } from '../../stores/router' import { useRouter } from '../../stores/router'
import { loadAuthors, setAuthorsSort, useAuthorsStore } from '../../stores/zine/authors' import { loadAuthors, setAuthorsSort, useAuthorsStore } from '../../stores/zine/authors'
import { capitalize } from '../../utils/capitalize'
import { isCyrillic } from '../../utils/cyrillic'
import { dummyFilter } from '../../utils/dummyFilter' import { dummyFilter } from '../../utils/dummyFilter'
import { getImageUrl } from '../../utils/getImageUrl' import { getImageUrl } from '../../utils/getImageUrl'
import { translit } from '../../utils/ru2en'
import { scrollHandler } from '../../utils/scroll' import { scrollHandler } from '../../utils/scroll'
import { Loading } from '../_shared/Loading' import { Loading } from '../_shared/Loading'
import { SearchField } from '../_shared/SearchField' import { SearchField } from '../_shared/SearchField'
import { AuthorBadge } from '../Author/AuthorBadge' import { AuthorBadge } from '../Author/AuthorBadge'
import styles from './AllAuthors.module.scss' import styles from './AllAuthors.module.scss'
import { isCyrillic } from '../../utils/cyrillic'
import { capitalize } from '../../utils/capitalize'
import { translit } from '../../utils/ru2en'
type AllAuthorsPageSearchParams = { type AllAuthorsPageSearchParams = {
by: '' | 'name' | 'shouts' | 'followers' by: '' | 'name' | 'shouts' | 'followers'
@ -87,7 +87,7 @@ export const AllAuthorsView = (props: Props) => {
let letter = '' let letter = ''
if (!letter && author && author.name) { if (!letter && author && author.name) {
const name = translate(author) const name = translate(author)
.replace(/[^A-zА0-9]/, ' ') .replace(/[^\dA-zА-я]/, ' ')
.trim() .trim()
const nameParts = name.trim().split(' ') const nameParts = name.trim().split(' ')
const found = nameParts.filter(Boolean).pop() const found = nameParts.filter(Boolean).pop()

View File

@ -18,8 +18,8 @@ import { DropDown } from '../../_shared/DropDown'
import { Icon } from '../../_shared/Icon' import { Icon } from '../../_shared/Icon'
import { Loading } from '../../_shared/Loading' import { Loading } from '../../_shared/Loading'
import { CommentDate } from '../../Article/CommentDate' import { CommentDate } from '../../Article/CommentDate'
import { AuthorLink } from '../../Author/AuthorLink'
import { AuthorBadge } from '../../Author/AuthorBadge' import { AuthorBadge } from '../../Author/AuthorBadge'
import { AuthorLink } from '../../Author/AuthorLink'
import { ArticleCard } from '../../Feed/ArticleCard' import { ArticleCard } from '../../Feed/ArticleCard'
import { Sidebar } from '../../Feed/Sidebar' import { Sidebar } from '../../Feed/Sidebar'

View File

@ -9,7 +9,7 @@ import { useLocalize } from '../../context/localize'
import { useSession } from '../../context/session' import { useSession } from '../../context/session'
import { useRouter } from '../../stores/router' import { useRouter } from '../../stores/router'
import { showModal } from '../../stores/ui' import { showModal } from '../../stores/ui'
import { AuthorsSortBy, useAuthorsStore } from '../../stores/zine/authors' // import { AuthorsSortBy, useAuthorsStore } from '../../stores/zine/authors'
import { Icon } from '../_shared/Icon' import { Icon } from '../_shared/Icon'
import { Popover } from '../_shared/Popover' import { Popover } from '../_shared/Popover'
import SimplifiedEditor from '../Editor/SimplifiedEditor' import SimplifiedEditor from '../Editor/SimplifiedEditor'
@ -47,9 +47,9 @@ export const InboxView = (props: Props) => {
const { const {
chats, chats,
messages, messages,
actions: { loadChats, loadRecipients, getMessages, sendMessage, createChat }, actions: { loadChats, getMessages, sendMessage, createChat },
} = useInbox() } = useInbox()
const [recipients, setRecipients] = createSignal<Author[]>([]) const [recipients, setRecipients] = createSignal<Author[]>(props.authors)
const [sortByGroup, setSortByGroup] = createSignal(false) const [sortByGroup, setSortByGroup] = createSignal(false)
const [sortByPerToPer, setSortByPerToPer] = createSignal(false) const [sortByPerToPer, setSortByPerToPer] = createSignal(false)
const [currentDialog, setCurrentDialog] = createSignal<Chat>() const [currentDialog, setCurrentDialog] = createSignal<Chat>()
@ -189,6 +189,8 @@ export const InboxView = (props: Props) => {
setIsScrollToNewVisible(false) setIsScrollToNewVisible(false)
} }
const isLoaded = createMemo(() => props.isLoaded)
return ( return (
<div class={clsx('container', styles.Inbox)}> <div class={clsx('container', styles.Inbox)}>
<Modal variant="narrow" name="inviteToChat"> <Modal variant="narrow" name="inviteToChat">