From 28c66a564ab254dcd40fb76b201e1da02dfc0c31 Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 5 Jul 2024 22:40:54 +0300 Subject: [PATCH] preprocess-text-fix --- src/components/Article/CommentsTree.tsx | 4 +- .../Author/AuthorCard/AuthorCard.tsx | 10 +- src/components/Discours/Footer.tsx | 6 +- .../Feed/Placeholder/Placeholder.tsx | 4 +- .../AuthModalHeader/AuthModalHeader.tsx | 10 +- src/components/Nav/AuthModal/index.tsx | 2 +- src/components/Nav/Header/Header.tsx | 63 ++- src/components/Nav/Modal/Modal.tsx | 8 +- src/components/Nav/Modal/Opener.tsx | 4 +- src/components/Nav/Topics/Topics.tsx | 2 +- .../Views/AllAuthors/AllAuthors.tsx | 27 +- src/components/Views/AllTopics/AllTopics.tsx | 6 +- src/components/Views/Feed/Feed.tsx | 4 +- src/components/Views/FeedSettings.tsx | 6 +- src/components/Views/StaticPage.tsx | 35 +- .../_shared/InviteMembers/InviteMembers.tsx | 2 +- .../_shared/Newsletter/Newsletter.tsx | 2 +- src/context/authors.tsx | 8 +- src/context/localize.tsx | 3 +- src/context/topics.tsx | 4 +- src/intl/i18next.ts | 10 +- src/intl/locales/en/translation.json | 4 +- src/intl/locales/ru/translation.json | 14 +- src/intl/prepositions.ts | 77 +++ src/lib/sortby.ts | 4 +- src/routes/(static)/debate.tsx | 103 ++++ src/routes/(static)/dogma.tsx | 44 ++ src/routes/(static)/guide.tsx | 216 +++++++++ src/routes/(static)/manifest.tsx | 269 +++++------ src/routes/(static)/partners.tsx | 28 +- src/routes/(static)/principles.tsx | 160 +++++++ src/routes/(static)/support.tsx | 113 +++++ src/routes/(static)/terms.tsx | 450 ++++++++---------- src/routes/(static)/thanks.tsx | 71 +++ src/routes/[slug].tsx | 34 +- src/routes/edit/[id]/(draft).tsx | 5 +- templates/authorizer_email_confirmation.html | 2 +- 37 files changed, 1271 insertions(+), 543 deletions(-) create mode 100644 src/intl/prepositions.ts create mode 100644 src/routes/(static)/debate.tsx create mode 100644 src/routes/(static)/dogma.tsx create mode 100644 src/routes/(static)/guide.tsx create mode 100644 src/routes/(static)/principles.tsx create mode 100644 src/routes/(static)/support.tsx create mode 100644 src/routes/(static)/thanks.tsx diff --git a/src/components/Article/CommentsTree.tsx b/src/components/Article/CommentsTree.tsx index 0a3a7dea..da61ce66 100644 --- a/src/components/Article/CommentsTree.tsx +++ b/src/components/Article/CommentsTree.tsx @@ -98,7 +98,7 @@ export const CommentsTree = (props: Props) => {

{t('Comments')} {comments().length.toString() || ''} 0}> -  +{newReactions().length} + {` +${newReactions().length}`}

0}> @@ -150,7 +150,7 @@ export const CommentsTree = (props: Props) => { {t('sign up')} {' '} - {t('or')}  + {t('or')}{' '} {t('sign in')} diff --git a/src/components/Author/AuthorCard/AuthorCard.tsx b/src/components/Author/AuthorCard/AuthorCard.tsx index 0f679cde..fe444e13 100644 --- a/src/components/Author/AuthorCard/AuthorCard.tsx +++ b/src/components/Author/AuthorCard/AuthorCard.tsx @@ -1,13 +1,14 @@ -import type { Author, Community } from '~/graphql/schema/core.gen' - +import { redirect, useNavigate, useSearchParams } from '@solidjs/router' import { clsx } from 'clsx' import { For, Show, createEffect, createMemo, createSignal, onMount } from 'solid-js' import { Button } from '~/components/_shared/Button' +import stylesButton from '~/components/_shared/Button/Button.module.scss' import { FollowingCounters } from '~/components/_shared/FollowingCounters/FollowingCounters' import { ShowOnlyOnClient } from '~/components/_shared/ShowOnlyOnClient' import { FollowsFilter, useFollowing } from '~/context/following' import { useLocalize } from '~/context/localize' import { useSession } from '~/context/session' +import type { Author, Community } from '~/graphql/schema/core.gen' import { FollowingEntity, Topic } from '~/graphql/schema/core.gen' import { isCyrillic } from '~/intl/translate' import { translit } from '~/intl/translit' @@ -16,9 +17,6 @@ import { Modal } from '../../Nav/Modal' import { TopicBadge } from '../../Topic/TopicBadge' import { AuthorBadge } from '../AuthorBadge' import { Userpic } from '../Userpic' - -import { useNavigate, useSearchParams } from '@solidjs/router' -import stylesButton from '~/components/_shared/Button/Button.module.scss' import styles from './AuthorCard.module.scss' type Props = { @@ -251,7 +249,7 @@ export const AuthorCard = (props: Props) => {
diff --git a/src/components/Nav/Header/Header.tsx b/src/components/Nav/Header/Header.tsx index 2bb79163..27b3b843 100644 --- a/src/components/Nav/Header/Header.tsx +++ b/src/components/Nav/Header/Header.tsx @@ -1,4 +1,4 @@ -import { A, useLocation, useNavigate, useSearchParams } from '@solidjs/router' +import { A, redirect, useLocation, useNavigate, useSearchParams } from '@solidjs/router' import { clsx } from 'clsx' import { For, Show, createEffect, createSignal, onCleanup, onMount } from 'solid-js' import { useLocalize } from '~/context/localize' @@ -120,7 +120,7 @@ export const Header = (props: Props) => { requireAuthentication(() => { ev?.preventDefault() - navigate('/edit/new') + redirect('/edit/new') }, 'create') } @@ -149,13 +149,9 @@ export const Header = (props: Props) => { } const handleToggleMenuByLink = (event: MouseEvent, route: string) => { - console.debug('toggling menu link', fixed(), route) event.preventDefault() - if (loc.pathname === route) { - toggleFixed() - } - - navigate(route) + if (fixed()) toggleFixed() + if (loc.pathname !== route) navigate(route) } return (
{

{t('Participating')}

@@ -312,9 +308,9 @@ export const Header = (props: Props) => {

{ >

@@ -409,34 +405,37 @@ export const Header = (props: Props) => { > diff --git a/src/components/Views/FeedSettings.tsx b/src/components/Views/FeedSettings.tsx index 34089309..b2faf237 100644 --- a/src/components/Views/FeedSettings.tsx +++ b/src/components/Views/FeedSettings.tsx @@ -35,7 +35,7 @@ export const FeedSettingsView = () => {
- +
- +
- +