From 1e33d18c54cf596d674247c99231feafb55726e1 Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Fri, 10 May 2024 15:59:21 +0300 Subject: [PATCH 01/12] Expo fixes --- public/locales/en/translation.json | 1 + public/locales/ru/translation.json | 3 +- .../Feed/ArticleCard/ArticleCard.module.scss | 11 +- .../Feed/ArticleCard/ArticleCard.tsx | 1 + src/components/Feed/Sidebar/Sidebar.tsx | 2 +- src/components/Views/Expo/Expo.tsx | 103 +++++++++--------- src/styles/app.scss | 2 +- 7 files changed, 64 insertions(+), 59 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 064c8c5d..c6d80595 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -86,6 +86,7 @@ "Commenting": "Commenting", "Comments": "Comments", "CommentsWithCount": "{count, plural, =0 {{count} comments} one {{count} comment} few {{count} comments} other {{count} comments}}", + "Common feed": "All", "Communities": "Communities", "Community Discussion Rules": "Community Discussion Rules", "Community Principles": "Community Principles", diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 09497c5a..ee135233 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -31,7 +31,7 @@ "All posts rating": "Рейтинг всех постов", "All posts": "Все публикации", "All topics": "Все темы", - "All": "Общая лента", + "All": "Все", "Almost done! Check your email.": "Почти готово! Осталось подтвердить вашу почту.", "Are you sure you want to delete this comment?": "Уверены, что хотите удалить этот комментарий?", "Are you sure you want to delete this draft?": "Уверены, что хотите удалить этот черновик?", @@ -90,6 +90,7 @@ "Commenting": "Комментирование", "Comments": "Комментарии", "CommentsWithCount": "{count, plural, =0 {{count} комментариев} one {{count} комментарий} few {{count} комментария} other {{count} комментариев}}", + "Common feed": "Общая лента", "Communities": "Сообщества", "Community Discussion Rules": "Правила дискуссий в сообществе", "Community Principles": "Принципы сообщества", diff --git a/src/components/Feed/ArticleCard/ArticleCard.module.scss b/src/components/Feed/ArticleCard/ArticleCard.module.scss index d19865b1..02ba61f0 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.module.scss +++ b/src/components/Feed/ArticleCard/ArticleCard.module.scss @@ -13,7 +13,9 @@ &:hover { .shoutCardCover { - transform: scale(1.05); + img { + transform: scale(1.1); + } } } @@ -120,13 +122,10 @@ height: 100%; object-fit: cover; position: absolute; + transform: scale(1); + transition: transform 0.3s; width: 100%; } - - &:hover img { - /* TODO: small zoom on hover */ - transform: scaleZ(1.1); - } } .shoutAuthor { diff --git a/src/components/Feed/ArticleCard/ArticleCard.tsx b/src/components/Feed/ArticleCard/ArticleCard.tsx index 19529050..85f921a8 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.tsx +++ b/src/components/Feed/ArticleCard/ArticleCard.tsx @@ -99,6 +99,7 @@ const getMainTopicTitle = (article: Shout, lng: string) => { const LAYOUT_ASPECT = { music: styles.aspectRatio1x1, + audio: styles.aspectRatio1x1, literature: styles.aspectRatio16x9, video: styles.aspectRatio16x9, image: styles.aspectRatio4x3, diff --git a/src/components/Feed/Sidebar/Sidebar.tsx b/src/components/Feed/Sidebar/Sidebar.tsx index a116bc4b..ab8aacca 100644 --- a/src/components/Feed/Sidebar/Sidebar.tsx +++ b/src/components/Feed/Sidebar/Sidebar.tsx @@ -40,7 +40,7 @@ export const Sidebar = () => { > - {t('All')} + {t('Common feed')} diff --git a/src/components/Views/Expo/Expo.tsx b/src/components/Views/Expo/Expo.tsx index cb9fa754..3040cb9b 100644 --- a/src/components/Views/Expo/Expo.tsx +++ b/src/components/Views/Expo/Expo.tsx @@ -126,58 +126,61 @@ export const Expo = (props: Props) => { return (
+
+ +
+ 0} fallback={}>
-
{(shout) => ( diff --git a/src/styles/app.scss b/src/styles/app.scss index 0bb124a4..df2eefc9 100644 --- a/src/styles/app.scss +++ b/src/styles/app.scss @@ -678,7 +678,7 @@ figure { cursor: default; &:hover { - background: #fff; + background: transparent; } } } From 5bbd29ddd2fa03fed8f02f0085214a549cdab03c Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Fri, 17 May 2024 23:45:53 +0300 Subject: [PATCH 02/12] Fixed style on hovered article card --- src/components/Feed/ArticleCard/ArticleCard.module.scss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Feed/ArticleCard/ArticleCard.module.scss b/src/components/Feed/ArticleCard/ArticleCard.module.scss index 02ba61f0..42e9cdd9 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.module.scss +++ b/src/components/Feed/ArticleCard/ArticleCard.module.scss @@ -13,7 +13,8 @@ &:hover { .shoutCardCover { - img { + img, + .placeholderCoverImage { transform: scale(1.1); } } @@ -122,9 +123,13 @@ height: 100%; object-fit: cover; position: absolute; + width: 100%; + } + + img, + .placeholderCoverImage { transform: scale(1); transition: transform 0.3s; - width: 100%; } } From 7e2f2d51924c71a21c75f4e397c276709c476fee Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Sun, 19 May 2024 01:26:07 +0300 Subject: [PATCH 03/12] Fixed article cover animation --- src/components/Feed/ArticleCard/ArticleCard.module.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Feed/ArticleCard/ArticleCard.module.scss b/src/components/Feed/ArticleCard/ArticleCard.module.scss index 42e9cdd9..aeea9014 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.module.scss +++ b/src/components/Feed/ArticleCard/ArticleCard.module.scss @@ -113,7 +113,6 @@ padding-bottom: 56.2%; // 16:9 position: relative; transform-origin: 50% 50%; - transition: transform 1s ease-in-out; &.loading { background: rgb(0 0 0 / 20%); @@ -129,7 +128,7 @@ img, .placeholderCoverImage { transform: scale(1); - transition: transform 0.3s; + transition: transform 1s ease-in-out; } } From 8a36b21e6e18091f52f28e54fe4eaceb8ecffb6a Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 19 May 2024 01:14:28 +0300 Subject: [PATCH 04/12] handle-auth-errors --- src/components/Nav/AuthModal/LoginForm.tsx | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/Nav/AuthModal/LoginForm.tsx b/src/components/Nav/AuthModal/LoginForm.tsx index b33dabdc..dc5ffe54 100644 --- a/src/components/Nav/AuthModal/LoginForm.tsx +++ b/src/components/Nav/AuthModal/LoginForm.tsx @@ -96,27 +96,30 @@ export const LoginForm = () => { try { const { errors } = await signIn({ email: email(), password: password() }) if (errors?.length > 0) { - console.error('[signIn errors]', errors) - if (errors.some((error) => error.message.includes('user has not signed up email & password'))) { - setValidationErrors((prev) => ({ - ...prev, - password: t('Something went wrong, check email and password'), - })) - } else if (errors.some((error) => error.message.includes('user not found'))) { - setSubmitError(t('User was not found')) - } else if (errors.some((error) => error.message.includes('email not verified'))) { + console.warn('[signIn] errors: ', errors) + let msg = '' + if (errors.some((error) => error.message === 'user has not signed up email & password')) { + const password = t('Something went wrong, check email and password') + setValidationErrors((prev) => ({ ...prev, password })) + } else if (errors.some((error) => error.message === 'user not found')) { + msg = t('User was not found') + } else if (errors.some((error) => error.message === 'email not verified')) { + msg = t('This email is not verified') + } else { + msg = t('Error', errors[0].message) + } + + msg && setSubmitError(
- {t('This email is not verified')} + {msg} {'. '} {t('Send link again')}
, ) - } else { - setSubmitError(t('Error', errors[0].message)) - } + return } hideModal() From 2952e15591b3a878d2d1de6a1cbaecbc3cf86bf7 Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 19 May 2024 01:18:55 +0300 Subject: [PATCH 05/12] login-validations-fixes --- src/components/Nav/AuthModal/LoginForm.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/Nav/AuthModal/LoginForm.tsx b/src/components/Nav/AuthModal/LoginForm.tsx index dc5ffe54..dc57565b 100644 --- a/src/components/Nav/AuthModal/LoginForm.tsx +++ b/src/components/Nav/AuthModal/LoginForm.tsx @@ -97,28 +97,27 @@ export const LoginForm = () => { const { errors } = await signIn({ email: email(), password: password() }) if (errors?.length > 0) { console.warn('[signIn] errors: ', errors) - let msg = '' + if (errors.some((error) => error.message === 'user has not signed up email & password')) { const password = t('Something went wrong, check email and password') setValidationErrors((prev) => ({ ...prev, password })) } else if (errors.some((error) => error.message === 'user not found')) { - msg = t('User was not found') + const email = t('User was not found') + setValidationErrors((prev) => ({ ...prev, email })) } else if (errors.some((error) => error.message === 'email not verified')) { - msg = t('This email is not verified') + const email = t('This email is not verified') + setValidationErrors((prev) => ({ ...prev, email })) } else { - msg = t('Error', errors[0].message) - } - - msg && setSubmitError(
- {msg} + {t('Error', errors[0].message)} {'. '} {t('Send link again')}
, ) + } return } From f288cc3388fe5f487dae1dfbecf8e887bd937056 Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 19 May 2024 01:41:50 +0300 Subject: [PATCH 06/12] multierror --- src/components/Nav/AuthModal/LoginForm.tsx | 51 ++++++++++++---------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/src/components/Nav/AuthModal/LoginForm.tsx b/src/components/Nav/AuthModal/LoginForm.tsx index dc57565b..925c8864 100644 --- a/src/components/Nav/AuthModal/LoginForm.tsx +++ b/src/components/Nav/AuthModal/LoginForm.tsx @@ -97,28 +97,35 @@ export const LoginForm = () => { const { errors } = await signIn({ email: email(), password: password() }) if (errors?.length > 0) { console.warn('[signIn] errors: ', errors) - - if (errors.some((error) => error.message === 'user has not signed up email & password')) { - const password = t('Something went wrong, check email and password') - setValidationErrors((prev) => ({ ...prev, password })) - } else if (errors.some((error) => error.message === 'user not found')) { - const email = t('User was not found') - setValidationErrors((prev) => ({ ...prev, email })) - } else if (errors.some((error) => error.message === 'email not verified')) { - const email = t('This email is not verified') - setValidationErrors((prev) => ({ ...prev, email })) - } else { - setSubmitError( -
- {t('Error', errors[0].message)} - {'. '} - - {t('Send link again')} - -
, - ) - } - + errors.forEach((error) => { + switch (error.message) { + case 'user has not signed up email & password': { + setValidationErrors((prev) => ({ + ...prev, + password: t('Something went wrong, check email and password'), + })) + break + } + case 'user not found': { + setValidationErrors((prev) => ({ ...prev, email: t('User was not found') })) + break + } + case 'email not verified': { + setValidationErrors((prev) => ({ ...prev, email: t('This email is not verified') })) + break + } + default: + setSubmitError( +
+ {t('Error', errors[0].message)} + {'. '} + + {t('Send link again')} + +
, + ) + } + }) return } hideModal() From fd76d98d96b1c1ed6c3d784564ea7faafbed177d Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 19 May 2024 02:22:19 +0300 Subject: [PATCH 07/12] editor-autosave-fix --- src/components/Views/EditView/EditView.tsx | 63 +++++++++++----------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/src/components/Views/EditView/EditView.tsx b/src/components/Views/EditView/EditView.tsx index 1e8650b1..2148a3e4 100644 --- a/src/components/Views/EditView/EditView.tsx +++ b/src/components/Views/EditView/EditView.tsx @@ -2,7 +2,7 @@ import { clsx } from 'clsx' import deepEqual from 'fast-deep-equal' import { Accessor, Show, createMemo, createSignal, lazy, onCleanup, onMount } from 'solid-js' import { createStore } from 'solid-js/store' -import { throttle } from 'throttle-debounce' +import { debounce } from 'throttle-debounce' import { ShoutForm, useEditorContext } from '../../../context/editor' import { useLocalize } from '../../../context/localize' @@ -42,9 +42,8 @@ export const EMPTY_TOPIC: Topic = { slug: '', } -const THROTTLING_INTERVAL = 2000 -const AUTO_SAVE_INTERVAL = 5000 -const AUTO_SAVE_DELAY = 5000 +const AUTO_SAVE_DELAY = 3000 + const handleScrollTopButtonClick = (e) => { e.preventDefault() window.scrollTo({ @@ -104,6 +103,8 @@ export const EditView = (props: Props) => { return JSON.parse(form.media || '[]') }) + const [hasChanges, setHasChanges] = createSignal(false) + onMount(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 0) @@ -113,7 +114,7 @@ export const EditView = (props: Props) => { onCleanup(() => { window.removeEventListener('scroll', handleScroll) }) - // eslint-disable-next-line unicorn/consistent-function-scoping + const handleBeforeUnload = (event) => { if (!deepEqual(prevForm, form)) { event.returnValue = t( @@ -127,8 +128,8 @@ export const EditView = (props: Props) => { }) const handleTitleInputChange = (value: string) => { - setForm('title', value) - setForm('slug', slugify(value)) + handleInputChange('title', value) + handleInputChange('slug', slugify(value)) if (value) { setFormErrors('title', '') } @@ -136,21 +137,21 @@ export const EditView = (props: Props) => { const handleAddMedia = (data) => { const newMedia = [...mediaItems(), ...data] - setForm('media', JSON.stringify(newMedia)) + handleInputChange('media', JSON.stringify(newMedia)) } const handleSortedMedia = (data) => { - setForm('media', JSON.stringify(data)) + handleInputChange('media', JSON.stringify(data)) } const handleMediaDelete = (index) => { const copy = [...mediaItems()] copy.splice(index, 1) - setForm('media', JSON.stringify(copy)) + handleInputChange('media', JSON.stringify(copy)) } const handleMediaChange = (index, value) => { const updated = mediaItems().map((item, idx) => (idx === index ? value : item)) - setForm('media', JSON.stringify(updated)) + handleInputChange('media', JSON.stringify(updated)) } const [baseAudioFields, setBaseAudioFields] = createSignal({ @@ -162,7 +163,7 @@ export const EditView = (props: Props) => { const handleBaseFieldsChange = (key, value) => { if (mediaItems().length > 0) { const updated = mediaItems().map((media) => ({ ...media, [key]: value })) - setForm('media', JSON.stringify(updated)) + handleInputChange('media', JSON.stringify(updated)) } else { setBaseAudioFields({ ...baseAudioFields(), [key]: value }) } @@ -182,34 +183,32 @@ export const EditView = (props: Props) => { } } - let autoSaveTimeOutId: number | string | NodeJS.Timeout - const autoSave = async () => { - const hasChanges = !deepEqual(form, prevForm) - const hasTopic = Boolean(form.mainTopic) - if (hasChanges || hasTopic) { + console.log('autoSave called') + if (hasChanges()) { console.debug('saving draft', form) setSaving(true) saveDraftToLocalStorage(form) await saveDraft(form) setPrevForm(clone(form)) - setTimeout(() => setSaving(false), AUTO_SAVE_DELAY) + setSaving(false) + setHasChanges(false) } } - // Throttle the autoSave function - const throttledAutoSave = throttle(THROTTLING_INTERVAL, autoSave) + const debouncedAutoSave = debounce(AUTO_SAVE_DELAY, autoSave) - const autoSaveRecursive = () => { - autoSaveTimeOutId = setTimeout(() => { - throttledAutoSave() - autoSaveRecursive() - }, AUTO_SAVE_INTERVAL) + const handleInputChange = (key, value) => { + console.log(`[handleInputChange] ${key}: ${value}`) + setForm(key, value) + setHasChanges(true) + debouncedAutoSave() } onMount(() => { - autoSaveRecursive() - onCleanup(() => clearTimeout(autoSaveTimeOutId)) + onCleanup(() => { + debouncedAutoSave.cancel() + }) }) const showSubtitleInput = () => { @@ -310,7 +309,7 @@ export const EditView = (props: Props) => { subtitleInput.current = el }} allowEnterKey={false} - value={(value) => setForm('subtitle', value || '')} + value={(value) => handleInputChange('subtitle', value || '')} class={styles.subtitleInput} placeholder={t('Subheader')} initialValue={form.subtitle || ''} @@ -324,7 +323,7 @@ export const EditView = (props: Props) => { smallHeight={true} placeholder={t('A short introduction to keep the reader interested')} initialContent={form.lead} - onChange={(value) => setForm('lead', value)} + onChange={(value) => handleInputChange('lead', value)} /> @@ -345,7 +344,7 @@ export const EditView = (props: Props) => { } isMultiply={false} fileType={'image'} - onUpload={(val) => setForm('coverImageUrl', val[0].url)} + onUpload={(val) => handleInputChange('coverImageUrl', val[0].url)} /> } > @@ -362,7 +361,7 @@ export const EditView = (props: Props) => {
setForm('coverImageUrl', null)} + onClick={() => handleInputChange('coverImageUrl', null)} >
@@ -408,7 +407,7 @@ export const EditView = (props: Props) => { setForm('body', body)} + onChange={(body) => handleInputChange('body', body)} />
From fa54d89d53f8172dd241e128f41637dd0ec3401d Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Sun, 19 May 2024 01:38:56 +0300 Subject: [PATCH 08/12] Table of contents minor fixes --- public/locales/en/translation.json | 4 ++-- public/locales/ru/translation.json | 4 ++-- src/components/TableOfContents/TableOfContents.module.scss | 2 +- src/components/TableOfContents/TableOfContents.tsx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 46c92689..7c19f3d3 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -92,6 +92,7 @@ "Community Principles": "Community Principles", "Community values and rules of engagement for the open editorial team": "Community values and rules of engagement for the open editorial team", "Confirm": "Confirm", + "Contents": "Contents", "Contribute to free samizdat. Support Discours - an independent non-profit publication that works only for you. Become a pillar of the open newsroom": "Contribute to free samizdat. Support Discours - an independent non-profit publication that works only for you. Become a pillar of the open newsroom", "Cooperate": "Cooperate", "Copy link": "Copy link", @@ -471,7 +472,6 @@ "cancel": "cancel", "collections": "collections", "community": "community", - "contents": "contents", "delimiter": "delimiter", "discussion": "Discours", "dogma keywords": "Discours.io, dogma, editorial principles, code of ethics, journalism, community", @@ -542,4 +542,4 @@ "Incorrect old password": "Incorrect old password", "Repeat new password": "Repeat new password", "Incorrect new password confirm": "Incorrect new password confirm" -} \ No newline at end of file +} diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 88ca457e..3e4795d8 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -96,6 +96,7 @@ "Community Principles": "Принципы сообщества", "Community values and rules of engagement for the open editorial team": "Ценности сообщества и правила взаимодействия открытой редакции", "Confirm": "Подтвердить", + "Contents": "Оглавление", "Contribute to free samizdat. Support Discours - an independent non-profit publication that works only for you. Become a pillar of the open newsroom": "Внесите вклад в свободный самиздат. Поддержите Дискурс — независимое некоммерческое издание, которое работает только для вас. Станьте опорой открытой редакции", "Cooperate": "Соучаствовать", "Copy link": "Скопировать ссылку", @@ -493,7 +494,6 @@ "cancel": "отменить", "collections": "коллекции", "community": "сообщество", - "contents": "оглавление", "create_chat": "Создать чат", "create_group": "Создать группу", "delimiter": "разделитель", @@ -569,4 +569,4 @@ "Incorrect old password": "Старый пароль не верен", "Repeat new password": "Повторите новый пароль", "Incorrect new password confirm": "Неверное подтверждение нового пароля" -} \ No newline at end of file +} diff --git a/src/components/TableOfContents/TableOfContents.module.scss b/src/components/TableOfContents/TableOfContents.module.scss index 2e5fe4ac..8433e44d 100644 --- a/src/components/TableOfContents/TableOfContents.module.scss +++ b/src/components/TableOfContents/TableOfContents.module.scss @@ -157,7 +157,7 @@ color: #000; font-size: 14px; font-style: normal; - font-weight: 400; + font-weight: 500; line-height: 1.8rem; text-align: left; vertical-align: bottom; diff --git a/src/components/TableOfContents/TableOfContents.tsx b/src/components/TableOfContents/TableOfContents.tsx index 322aa925..d0a2de05 100644 --- a/src/components/TableOfContents/TableOfContents.tsx +++ b/src/components/TableOfContents/TableOfContents.tsx @@ -86,7 +86,7 @@ export const TableOfContents = (props: Props) => {
-

{t('contents')}

+

{t('Contents')}

    From 0e8e8f5d20a6c41001dc12d5ebae3f31bef43751 Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Mon, 20 May 2024 23:37:56 +0300 Subject: [PATCH 09/12] Add icons to the feed context popup --- public/icons/expert.svg | 4 +++ .../FeedArticlePopup.module.scss | 25 ++++++++++++++++--- .../FeedArticlePopup/FeedArticlePopup.tsx | 18 +++++++++---- 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 public/icons/expert.svg diff --git a/public/icons/expert.svg b/public/icons/expert.svg new file mode 100644 index 00000000..e81cb43e --- /dev/null +++ b/public/icons/expert.svg @@ -0,0 +1,4 @@ + + + diff --git a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss index d9141883..6b2d15d6 100644 --- a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss +++ b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss @@ -16,14 +16,15 @@ } .action { - display: flex; align-items: center; - width: 100%; box-sizing: border-box; - padding: 8px 16px; + display: flex; font-size: inherit; font-weight: 500; + gap: 0.8rem; + padding: 8px 16px; text-align: left; + width: 100%; white-space: nowrap; &.soon { @@ -32,11 +33,29 @@ gap: 0.6rem; width: 100%; justify-content: space-between; + + .icon { + opacity: 0.4; + } } &:hover { background: var(--black-500); color: var(--black-50) !important; + + .icon { + filter: invert(1); + opacity: 1 !important; + } + } + + .icon { + flex: 0 2.4rem; + min-width: 2.4rem; + } + + .title { + flex: 1; } } diff --git a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx index ce9990bb..1597138a 100644 --- a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx +++ b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx @@ -6,6 +6,7 @@ import { Show, createSignal } from 'solid-js' import { useLocalize } from '../../../context/localize' import { Popup } from '../../_shared/Popup' import { SoonChip } from '../../_shared/SoonChip' +import { Icon } from '../../_shared/Icon' import styles from './FeedArticlePopup.module.scss' @@ -38,7 +39,8 @@ export const FeedArticlePopup = (props: Props) => { setHidePopup(true) }} > - {t('Share')} + +
    {t('Share')}
    @@ -51,7 +53,8 @@ export const FeedArticlePopup = (props: Props) => { setHidePopup(true) }} > - {t('Help to edit')} + +
    {t('Help to edit')}
    @@ -64,19 +67,24 @@ export const FeedArticlePopup = (props: Props) => { setHidePopup(false) }} > - {t('Invite experts')} + +
    {t('Invite experts')}
  • {/**/} From 9ba7bfada8799cfab18afbb6a29f7bf37512edd5 Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Mon, 20 May 2024 23:39:59 +0300 Subject: [PATCH 10/12] Fixed code style --- .../Feed/FeedArticlePopup/FeedArticlePopup.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx index 1597138a..0943b814 100644 --- a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx +++ b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx @@ -4,9 +4,9 @@ import { clsx } from 'clsx' import { Show, createSignal } from 'solid-js' import { useLocalize } from '../../../context/localize' +import { Icon } from '../../_shared/Icon' import { Popup } from '../../_shared/Popup' import { SoonChip } from '../../_shared/SoonChip' -import { Icon } from '../../_shared/Icon' import styles from './FeedArticlePopup.module.scss' @@ -39,7 +39,7 @@ export const FeedArticlePopup = (props: Props) => { setHidePopup(true) }} > - +
    {t('Share')}
    @@ -53,7 +53,7 @@ export const FeedArticlePopup = (props: Props) => { setHidePopup(true) }} > - +
    {t('Help to edit')}
    @@ -67,22 +67,22 @@ export const FeedArticlePopup = (props: Props) => { setHidePopup(false) }} > - +
    {t('Invite experts')}
  • From 1a2d197e0c7db2f67a44769aca7e23c3b556c79f Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 27 May 2024 22:13:55 +0300 Subject: [PATCH 11/12] profile-hotfix --- src/components/Views/Author/Author.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index 9c0423ba..41749ea7 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -66,7 +66,7 @@ export const AuthorView = (props: Props) => { const { authors, profile, topics } = appdata setFollowers(myFollowers) setAuthor(profile) - setFollowing([...authors, ...topics]) + setFollowing([...(authors || []), ...(topics || [])]) } } }) @@ -75,6 +75,7 @@ export const AuthorView = (props: Props) => { const bioWrapperRef: { current: HTMLDivElement } = { current: null } const fetchData = async (slug: string) => { + if (author()?.stat.followers || author()?.stat.followers === (followers() || [])?.length) return try { const [subscriptionsResult, followersResult, authorResult] = await Promise.all([ apiClient.getAuthorFollows({ slug }), @@ -215,7 +216,7 @@ export const AuthorView = (props: Props) => { slug: props.authorSlug, })} > - {t('Profile')} + {t('About')}
From e40df167d843d16b86b214460671e73576ec4cc9 Mon Sep 17 00:00:00 2001 From: dog Date: Thu, 6 Jun 2024 13:25:39 +0300 Subject: [PATCH 12/12] fix all expo path --- src/components/Views/Expo/Expo.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/Views/Expo/Expo.tsx b/src/components/Views/Expo/Expo.tsx index 3040cb9b..4c3ff1a3 100644 --- a/src/components/Views/Expo/Expo.tsx +++ b/src/components/Views/Expo/Expo.tsx @@ -123,18 +123,15 @@ export const Expo = (props: Props) => { loadMoreWithoutScrolling(LOAD_MORE_PAGE_SIZE) setArticlesEndPage((prev) => prev + LOAD_MORE_PAGE_SIZE) } - + console.log(props.layout) return (