From 8e564295c33ffcb34e46f48cfa1f292ed5f0f3d3 Mon Sep 17 00:00:00 2001 From: oeyoews Date: Sat, 23 Mar 2024 15:49:40 +0800 Subject: [PATCH] update name --- entrypoints/popup/Popup.vue | 13 ++++++------- package.json | 4 ++-- wxt.config.ts | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/entrypoints/popup/Popup.vue b/entrypoints/popup/Popup.vue index 8966ae7..2e9efdf 100644 --- a/entrypoints/popup/Popup.vue +++ b/entrypoints/popup/Popup.vue @@ -111,7 +111,10 @@ watch(isCheckTw5, (newValue, oldValue) => { // message: '检测到 TiddlyWiki 5.x', // type: 'success' // }) + checkStatus() } else { + // @ts-ignore + status.value = '' // ElMessage({ // message: '关闭 TiddlyWiki 5.x 检测', // type: 'info' @@ -121,10 +124,6 @@ watch(isCheckTw5, (newValue, oldValue) => { function checkStatus() { - if (!isCheckTw5.value) { - return - } - fetch(`http://localhost:${port.value}/status`).then((res) => { return res.json() }).then((data) => { @@ -159,9 +158,9 @@ watch(md, async () => { watch(port, () => { chrome.storage.local.set({ port: port.value }) - setTimeout(() => { + if (isCheckTw5.value) { checkStatus() - }, 1000); + } }) const currentTime = dayjs(new Date()).utc().format('YYYYMMDDHHmmss') @@ -277,7 +276,7 @@ const save2TiddlyWiki = async (title: string, text: string, port: number, url: s
-

启动时检查 TiddlyWiki5 状态

+

连接 TiddlyWiki5

diff --git a/package.json b/package.json index 41dc304..fd34bde 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "usewiki2", + "name": "Usewiki2", "description": "manifest.json description", "private": true, - "version": "0.0.8", + "version": "0.0.9", "type": "module", "scripts": { "dev": "wxt", diff --git a/wxt.config.ts b/wxt.config.ts index b36c8d4..477ccc9 100644 --- a/wxt.config.ts +++ b/wxt.config.ts @@ -51,7 +51,7 @@ export default defineConfig({ '48': 'icons/icon48.png', '128': 'icons/icon128.png', }, - + name: 'Usewiki2', permissions: [ 'contextMenus', // 'alarms',