forked from coracle/flotilla
Use welshman/app
This commit is contained in:
+6
-8
@@ -1,4 +1,3 @@
|
||||
import cx from 'classnames'
|
||||
import type {Writable} from "svelte/store"
|
||||
import {nprofileEncode} from "nostr-tools/nip19"
|
||||
import {SvelteNodeViewRenderer} from "svelte-tiptap"
|
||||
@@ -23,6 +22,7 @@ import {
|
||||
TagExtension as TopicExtension,
|
||||
} from "nostr-editor"
|
||||
import type {StampedEvent} from "@welshman/util"
|
||||
import {signer, topicSearch, profileSearch} from "@welshman/app"
|
||||
import {LinkExtension, asInline, createSuggestions} from "@lib/tiptap"
|
||||
import GroupComposeMention from "@app/components/GroupComposeMention.svelte"
|
||||
import GroupComposeTopic from "@app/components/GroupComposeTopic.svelte"
|
||||
@@ -34,8 +34,6 @@ import GroupComposeLink from "@app/components/GroupComposeLink.svelte"
|
||||
import GroupComposeSuggestions from "@app/components/GroupComposeSuggestions.svelte"
|
||||
import GroupComposeTopicSuggestion from "@app/components/GroupComposeTopicSuggestion.svelte"
|
||||
import GroupComposeProfileSuggestion from "@app/components/GroupComposeProfileSuggestion.svelte"
|
||||
import {signer} from "@app/base"
|
||||
import {searchProfiles, searchTopics} from "@app/state"
|
||||
import {getPubkeyHints} from "@app/commands"
|
||||
|
||||
export const addFile = (editor: Editor) => editor.chain().selectFiles().run()
|
||||
@@ -90,7 +88,7 @@ export const getChatEditorOptions = ({uploading, sendMessage}: ChatComposeEditor
|
||||
char: "@",
|
||||
name: "nprofile",
|
||||
editor: this.editor,
|
||||
search: searchProfiles,
|
||||
search: profileSearch,
|
||||
select: (pubkey: string, props: any) => {
|
||||
const relays = getPubkeyHints(pubkey)
|
||||
const nprofile = nprofileEncode({pubkey, relays})
|
||||
@@ -119,13 +117,13 @@ export const getChatEditorOptions = ({uploading, sendMessage}: ChatComposeEditor
|
||||
const attrs = {
|
||||
...mark.attrs,
|
||||
...HTMLAttributes,
|
||||
target: '_blank',
|
||||
rel: 'noopener noreferer',
|
||||
target: "_blank",
|
||||
rel: "noopener noreferer",
|
||||
href: `https://coracle.social/topics/${mark.attrs.tag.toLowerCase()}`,
|
||||
class: "underline",
|
||||
}
|
||||
|
||||
return ['a', attrs, 0]
|
||||
return ["a", attrs, 0]
|
||||
},
|
||||
addProseMirrorPlugins() {
|
||||
return [
|
||||
@@ -133,7 +131,7 @@ export const getChatEditorOptions = ({uploading, sendMessage}: ChatComposeEditor
|
||||
char: "#",
|
||||
name: "topic",
|
||||
editor: this.editor,
|
||||
search: searchTopics,
|
||||
search: topicSearch,
|
||||
select: (name: string, props: any) => props.command({name}),
|
||||
allowCreate: true,
|
||||
suggestionComponent: GroupComposeTopicSuggestion,
|
||||
|
||||
Reference in New Issue
Block a user