-
-
- {(instance) => (
-
-
setShowLinkInput(false)} />}
- >
-
- instance.chain().focus().toggleBold().run()}
- title={t('Bold')}
- >
-
-
- instance.chain().focus().toggleItalic().run()}
- title={t('Italic')}
- >
-
-
-
-
-
- instance.chain().focus().toggleBlockquote().run()}
- title={t('Add blockquote')}
- >
-
-
- showModal('simplifiedEditorUploadImage')}
- title={t('Add image')}
- >
-
-
-
-
-
- )}
-
-
+
0}>
diff --git a/src/components/Editor/SimplifiedEditor.tsx b/src/components/Editor/SimplifiedEditor.tsx
index a474f9c7..f09c55c6 100644
--- a/src/components/Editor/SimplifiedEditor.tsx
+++ b/src/components/Editor/SimplifiedEditor.tsx
@@ -11,15 +11,15 @@ import { useUI } from '~/context/ui'
import { base, custom } from '~/lib/editorExtensions'
import { useEscKeyDownHandler } from '~/lib/useEscKeyDownHandler'
import { UploadedFile } from '~/types/upload'
+import { UploadModalContent } from '../Upload/UploadModalContent'
+import { renderUploadedImage } from '../Upload/renderUploadedImage'
import { Modal } from '../_shared/Modal/Modal'
import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient'
-import { ToolbarControls } from './EditorToolbar'
+import { ToolbarControls } from './EditorToolbar/SimplifiedToolbar'
import { LinkBubbleMenuModule } from './LinkBubbleMenu'
import { TextBubbleMenu } from './TextBubbleMenu'
-import { UploadModalContent } from './UploadModalContent'
-import { renderUploadedImage } from './renderUploadedImage'
-import styles from './SimplifiedEditor.module.scss'
+import styles from './Editor.module.scss'
export type SimplifiedEditorProps = {
placeholder: string
diff --git a/src/components/Editor/TextBubbleMenu/TextBubbleMenu.tsx b/src/components/Editor/TextBubbleMenu/TextBubbleMenu.tsx
index 7d72ab0a..8352c69a 100644
--- a/src/components/Editor/TextBubbleMenu/TextBubbleMenu.tsx
+++ b/src/components/Editor/TextBubbleMenu/TextBubbleMenu.tsx
@@ -11,7 +11,7 @@ import { InsertLinkForm } from '../InsertLinkForm'
import styles from './TextBubbleMenu.module.scss'
-const SimplifiedEditor = lazy(() => import('../../Editor/SimplifiedEditor'))
+const MiniEditor = lazy(() => import('../../Editor/MiniEditor/MiniEditor'))
type BubbleMenuProps = {
editor: Editor
@@ -146,18 +146,13 @@ export const TextBubbleMenu = (props: BubbleMenuProps) => {
- handleAddFootnote(value)}
- variant={'bordered'}
- initialContent={footNote()}
+ onSubmit={(value: string) => handleAddFootnote(value)}
+ content={footNote()}
onCancel={() => {
setFootnoteEditorOpen(false)
}}
- submitButtonText={t('Send')}
/>
diff --git a/src/components/Editor/index.ts b/src/components/Editor/index.ts
index e2327288..4f9a58ab 100644
--- a/src/components/Editor/index.ts
+++ b/src/components/Editor/index.ts
@@ -1,4 +1,4 @@
export { EditorComponent as Editor } from './Editor'
export { Panel } from './Panel'
-export { TopicSelect } from './TopicSelect'
-export { UploadModalContent } from './UploadModalContent'
+export { TopicSelect } from '../TopicSelect'
+export { UploadModalContent } from '../Upload/UploadModalContent'
diff --git a/src/components/Editor/TopicSelect/TopicSelect.module.scss b/src/components/TopicSelect/TopicSelect.module.scss
similarity index 100%
rename from src/components/Editor/TopicSelect/TopicSelect.module.scss
rename to src/components/TopicSelect/TopicSelect.module.scss
diff --git a/src/components/Editor/TopicSelect/TopicSelect.tsx b/src/components/TopicSelect/TopicSelect.tsx
similarity index 100%
rename from src/components/Editor/TopicSelect/TopicSelect.tsx
rename to src/components/TopicSelect/TopicSelect.tsx
diff --git a/src/components/Editor/TopicSelect/index.ts b/src/components/TopicSelect/index.ts
similarity index 100%
rename from src/components/Editor/TopicSelect/index.ts
rename to src/components/TopicSelect/index.ts
diff --git a/src/components/Editor/AudioUploader/AudioUploader.module.scss b/src/components/Upload/AudioUploader/AudioUploader.module.scss
similarity index 100%
rename from src/components/Editor/AudioUploader/AudioUploader.module.scss
rename to src/components/Upload/AudioUploader/AudioUploader.module.scss
diff --git a/src/components/Editor/AudioUploader/AudioUploader.tsx b/src/components/Upload/AudioUploader/AudioUploader.tsx
similarity index 100%
rename from src/components/Editor/AudioUploader/AudioUploader.tsx
rename to src/components/Upload/AudioUploader/AudioUploader.tsx
diff --git a/src/components/Editor/AudioUploader/index.ts b/src/components/Upload/AudioUploader/index.ts
similarity index 100%
rename from src/components/Editor/AudioUploader/index.ts
rename to src/components/Upload/AudioUploader/index.ts
diff --git a/src/components/Editor/UploadModalContent/UploadModalContent.module.scss b/src/components/Upload/UploadModalContent/UploadModalContent.module.scss
similarity index 100%
rename from src/components/Editor/UploadModalContent/UploadModalContent.module.scss
rename to src/components/Upload/UploadModalContent/UploadModalContent.module.scss
diff --git a/src/components/Editor/UploadModalContent/UploadModalContent.tsx b/src/components/Upload/UploadModalContent/UploadModalContent.tsx
similarity index 98%
rename from src/components/Editor/UploadModalContent/UploadModalContent.tsx
rename to src/components/Upload/UploadModalContent/UploadModalContent.tsx
index 31ddc7fe..69b9f01f 100644
--- a/src/components/Editor/UploadModalContent/UploadModalContent.tsx
+++ b/src/components/Upload/UploadModalContent/UploadModalContent.tsx
@@ -10,7 +10,7 @@ import { useSession } from '~/context/session'
import { useUI } from '~/context/ui'
import { handleImageUpload } from '~/lib/handleImageUpload'
import { UploadedFile } from '~/types/upload'
-import { InlineForm } from '../InlineForm'
+import { InlineForm } from '../../_shared/InlineForm'
import styles from './UploadModalContent.module.scss'
diff --git a/src/components/Editor/UploadModalContent/index.ts b/src/components/Upload/UploadModalContent/index.ts
similarity index 100%
rename from src/components/Editor/UploadModalContent/index.ts
rename to src/components/Upload/UploadModalContent/index.ts
diff --git a/src/components/Editor/VideoUploader/VideoUploader.module.scss b/src/components/Upload/VideoUploader/VideoUploader.module.scss
similarity index 100%
rename from src/components/Editor/VideoUploader/VideoUploader.module.scss
rename to src/components/Upload/VideoUploader/VideoUploader.module.scss
diff --git a/src/components/Editor/VideoUploader/VideoUploader.tsx b/src/components/Upload/VideoUploader/VideoUploader.tsx
similarity index 100%
rename from src/components/Editor/VideoUploader/VideoUploader.tsx
rename to src/components/Upload/VideoUploader/VideoUploader.tsx
diff --git a/src/components/Editor/VideoUploader/index.ts b/src/components/Upload/VideoUploader/index.ts
similarity index 100%
rename from src/components/Editor/VideoUploader/index.ts
rename to src/components/Upload/VideoUploader/index.ts
diff --git a/src/components/Editor/renderUploadedImage.ts b/src/components/Upload/renderUploadedImage.ts
similarity index 100%
rename from src/components/Editor/renderUploadedImage.ts
rename to src/components/Upload/renderUploadedImage.ts
diff --git a/src/components/Views/EditView/EditView.tsx b/src/components/Views/EditView/EditView.tsx
index 0e22f777..25dd9d7c 100644
--- a/src/components/Views/EditView/EditView.tsx
+++ b/src/components/Views/EditView/EditView.tsx
@@ -21,14 +21,14 @@ import { LayoutType } from '~/types/common'
import { MediaItem } from '~/types/mediaitem'
import { clone } from '~/utils/clone'
import { Editor as EditorComponent, Panel } from '../../Editor'
-import { AudioUploader } from '../../Editor/AudioUploader'
import { AutoSaveNotice } from '../../Editor/AutoSaveNotice'
-import { VideoUploader } from '../../Editor/VideoUploader'
+import { AudioUploader } from '../../Upload/AudioUploader'
+import { VideoUploader } from '../../Upload/VideoUploader'
import { Modal } from '../../_shared/Modal'
import { TableOfContents } from '../../_shared/TableOfContents'
import styles from './EditView.module.scss'
-const SimplifiedEditor = lazy(() => import('../../Editor/SimplifiedEditor'))
+const MicroEditor = lazy(() => import('../../Editor/MicroEditor/MicroEditor'))
const GrowingTextarea = lazy(() => import('~/components/_shared/GrowingTextarea/GrowingTextarea'))
type Props = {
@@ -358,13 +358,10 @@ export const EditView = (props: Props) => {
/>
- handleInputChange('lead', value)}
+ content={form.lead}
+ onChange={(value: string) => handleInputChange('lead', value)}
/>
diff --git a/src/components/Views/Inbox/Inbox.tsx b/src/components/Views/Inbox/Inbox.tsx
index 87dd02eb..ffc4e7c8 100644
--- a/src/components/Views/Inbox/Inbox.tsx
+++ b/src/components/Views/Inbox/Inbox.tsx
@@ -1,6 +1,6 @@
import { useNavigate } from '@solidjs/router'
import { clsx } from 'clsx'
-import { For, Show, createEffect, createMemo, createSignal, on, onMount } from 'solid-js'
+import { For, Show, createEffect, createMemo, createSignal, lazy, on, onMount } from 'solid-js'
import QuotedMessage from '~/components/Inbox/QuotedMessage'
import { Icon } from '~/components/_shared/Icon'
import { InviteMembers } from '~/components/_shared/InviteMembers'
@@ -17,7 +17,6 @@ import type {
} from '~/graphql/schema/chat.gen'
import type { Author } from '~/graphql/schema/core.gen'
import { getShortDate } from '~/utils/date'
-import SimplifiedEditor from '../../Editor/SimplifiedEditor'
import DialogCard from '../../Inbox/DialogCard'
import DialogHeader from '../../Inbox/DialogHeader'
import { Message } from '../../Inbox/Message'
@@ -26,6 +25,8 @@ import Search from '../../Inbox/Search'
import { Modal } from '../../_shared/Modal'
import styles from './Inbox.module.scss'
+const MiniEditor = lazy(() => import('../../Editor/MiniEditor/MiniEditor'))
+
const userSearch = (array: Author[], keyword: string) => {
return array.filter((value) => new RegExp(keyword.trim(), 'gi').test(value.name || ''))
}
@@ -38,7 +39,6 @@ export const InboxView = (props: { authors: Author[]; chat?: Chat }) => {
const [sortByPerToPer, setSortByPerToPer] = createSignal(false)
const [currentDialog, setCurrentDialog] = createSignal
()
const [messageToReply, setMessageToReply] = createSignal(null)
- const [isClear, setClear] = createSignal(false)
const [isScrollToNewVisible, setIsScrollToNewVisible] = createSignal(false)
const { session } = useSession()
const authorId = createMemo(() => session()?.user?.app_data?.profile?.id || 0)
@@ -77,11 +77,9 @@ export const InboxView = (props: { authors: Author[]; chat?: Chat }) => {
reply_to: messageToReply()?.id,
chat_id: currentDialog()?.id || ''
} as MutationCreate_MessageArgs)
- setClear(true)
setMessageToReply(null)
if (messagesContainerRef)
(messagesContainerRef as HTMLDivElement).scrollTop = messagesContainerRef?.scrollHeight || 0
- setClear(false)
}
createEffect(
@@ -291,15 +289,7 @@ export const InboxView = (props: { authors: Author[]; chat?: Chat }) => {
/>
- handleSubmit(message)}
- submitByCtrlEnter={true}
- />
+
diff --git a/src/components/Views/Profile/ProfileSettings.tsx b/src/components/Views/Profile/ProfileSettings.tsx
index daa0e22a..7cfab5d9 100644
--- a/src/components/Views/Profile/ProfileSettings.tsx
+++ b/src/components/Views/Profile/ProfileSettings.tsx
@@ -14,7 +14,6 @@ import {
onMount
} from 'solid-js'
import { createStore } from 'solid-js/store'
-import SimplifiedEditor from '~/components/Editor/SimplifiedEditor'
import { useLocalize } from '~/context/localize'
import { useProfile } from '~/context/profile'
import { useSession } from '~/context/session'
@@ -35,7 +34,7 @@ import { SocialNetworkInput } from '../../_shared/SocialNetworkInput'
import styles from './Settings.module.scss'
import { profileSocialLinks } from './profileSocialLinks'
-// const SimplifiedEditor = lazy(() => import('~/components/Editor/SimplifiedEditor'))
+const MicroEditor = lazy(() => import('../../Editor/MicroEditor/MicroEditor'))
const GrowingTextarea = lazy(() => import('~/components/_shared/GrowingTextarea/GrowingTextarea'))
function filterNulls(arr: InputMaybe
[]): string[] {
@@ -340,18 +339,7 @@ export const ProfileSettings = () => {
/>
{t('About')}
-
+
diff --git a/src/components/Editor/InlineForm/InlineForm.module.scss b/src/components/_shared/InlineForm/InlineForm.module.scss
similarity index 100%
rename from src/components/Editor/InlineForm/InlineForm.module.scss
rename to src/components/_shared/InlineForm/InlineForm.module.scss
diff --git a/src/components/Editor/InlineForm/InlineForm.tsx b/src/components/_shared/InlineForm/InlineForm.tsx
similarity index 100%
rename from src/components/Editor/InlineForm/InlineForm.tsx
rename to src/components/_shared/InlineForm/InlineForm.tsx
diff --git a/src/components/Editor/InlineForm/index.ts b/src/components/_shared/InlineForm/index.ts
similarity index 100%
rename from src/components/Editor/InlineForm/index.ts
rename to src/components/_shared/InlineForm/index.ts
diff --git a/src/components/_shared/SolidSwiper/EditorSwiper.tsx b/src/components/_shared/SolidSwiper/EditorSwiper.tsx
index c65af966..303086d7 100644
--- a/src/components/_shared/SolidSwiper/EditorSwiper.tsx
+++ b/src/components/_shared/SolidSwiper/EditorSwiper.tsx
@@ -3,7 +3,6 @@ import { clsx } from 'clsx'
import { For, Show, createEffect, createSignal, lazy, on, onMount } from 'solid-js'
import SwiperCore from 'swiper'
import { Manipulation, Navigation, Pagination } from 'swiper/modules'
-
import { useLocalize } from '~/context/localize'
import { useSnackbar } from '~/context/ui'
import { composeMediaItems } from '~/lib/composeMediaItems'
@@ -23,7 +22,7 @@ import { MediaItem } from '~/types/mediaitem'
import { UploadedFile } from '~/types/upload'
import styles from './Swiper.module.scss'
-const SimplifiedEditor = lazy(() => import('../../Editor/SimplifiedEditor'))
+const MicroEditor = lazy(() => import('../../Editor/MicroEditor/MicroEditor'))
type Props = {
images: MediaItem[]
@@ -316,9 +315,8 @@ export const EditorSwiper = (props: Props) => {
value={props.images[slideIndex()]?.source}
onChange={(event) => handleSlideDescriptionChange(slideIndex(), 'source', event.target.value)}
/>
- setSlideBody(value)}
/>
diff --git a/src/entry-client.tsx b/src/entry-client.tsx
index a7df337b..540bffc0 100644
--- a/src/entry-client.tsx
+++ b/src/entry-client.tsx
@@ -9,3 +9,5 @@ mount(() => , document.getElementById('app') || document.body)
// navigator.serviceWorker.register(`/sw.js`);
// });
// }
+
+export default {}