From 135cf9d939457a867b68f60daf6f89f67add4791 Mon Sep 17 00:00:00 2001 From: oeyoews Date: Sat, 23 Mar 2024 00:23:12 +0800 Subject: [PATCH] feat: support url field for tiddlywiki --- entrypoints/popup/Popup.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/entrypoints/popup/Popup.vue b/entrypoints/popup/Popup.vue index f911617..98e44c1 100644 --- a/entrypoints/popup/Popup.vue +++ b/entrypoints/popup/Popup.vue @@ -67,7 +67,7 @@ fetch(`http://localhost:${port.value}/status`).then((res) => { }) -const save2TiddlyWiki = async (title: string, text: string, port: string) => { +const save2TiddlyWiki = async (title: string, text: string, port: string, url: string) => { if (!status.value.tiddlywiki_version) { ElMessage({ message: '请先连接 TiddlyWiki', @@ -85,6 +85,7 @@ const save2TiddlyWiki = async (title: string, text: string, port: string) => { body: JSON.stringify({ text, creator: username.value, type: 'text/markdown', + url, created: dayjs(new Date()).utc().format('YYYYMMDDHHmmss') }) }).then((res) => { @@ -97,8 +98,6 @@ const save2TiddlyWiki = async (title: string, text: string, port: string) => { }) } - -