diff --git a/src/components/CodemirrorEditor/EditorHeader/PostInfo.vue b/src/components/CodemirrorEditor/EditorHeader/PostInfo.vue index 668ca302a..de51835ae 100644 --- a/src/components/CodemirrorEditor/EditorHeader/PostInfo.vue +++ b/src/components/CodemirrorEditor/EditorHeader/PostInfo.vue @@ -5,7 +5,7 @@ import { Check, Info } from 'lucide-vue-next' import { CheckboxIndicator, CheckboxRoot, Primitive } from 'radix-vue' const store = useStore() -const { output } = storeToRefs(store) +const { output, editor } = storeToRefs(store) const dialogVisible = ref(false) const extensionInstalled = ref(false) @@ -17,6 +17,7 @@ const form = ref({ desc: ``, thumb: ``, content: ``, + markdown: ``, accounts: [] as PostAccount[], }) @@ -28,6 +29,7 @@ async function prePost() { title: ``, desc: ``, content: ``, + markdown: ``, accounts: [], } try { @@ -39,6 +41,7 @@ async function prePost() { .textContent ?? ``, desc: document.querySelector(`#output p`)!.textContent ?? ``, content: output.value, + markdown: editor.value?.getValue() ?? ``, accounts: allAccounts.value, } } @@ -121,7 +124,7 @@ onBeforeMount(() => { 提示 - 此功能由第三方浏览器插件支持,本平台不保证安全性。 + 此功能由第三方浏览器插件支持,本平台不保证安全性及同步准确度。 @@ -198,5 +201,5 @@ onBeforeMount(() => { - + diff --git a/src/components/CodemirrorEditor/EditorHeader/PostTaskDialog.vue b/src/components/CodemirrorEditor/EditorHeader/PostTaskDialog.vue new file mode 100644 index 000000000..24a60f7c3 --- /dev/null +++ b/src/components/CodemirrorEditor/EditorHeader/PostTaskDialog.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/types/index.ts b/src/types/index.ts index 7b2a1a68e..5e59ce928 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -83,6 +83,8 @@ export interface PostAccount { type: string uid: string checked: boolean + status?: string + error?: string } export interface Post { @@ -90,5 +92,6 @@ export interface Post { desc: string thumb: string content: string + markdown: string accounts: PostAccount[] }