From ff98c3a4998c2c7d02de639ff51c9cad4b1b1dbb Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 8 Sep 2024 21:08:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E8=84=9A=E6=9C=AC=E6=9C=AA=E6=98=BE=E7=A4=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=A7=E5=B0=8F=EF=BC=8C=E8=AE=A2=E9=98=85=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=9C=AA=E5=88=A0=E9=99=A4=20repo=20=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/config/index.ts | 2 ++ back/services/subscription.ts | 2 ++ src/pages/script/index.tsx | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/back/config/index.ts b/back/config/index.ts index de4f6ceb..9b4d7037 100644 --- a/back/config/index.ts +++ b/back/config/index.ts @@ -31,6 +31,7 @@ const tmpPath = path.join(rootPath, '.tmp/'); const samplePath = path.join(rootPath, 'sample/'); const configPath = path.join(dataPath, 'config/'); const scriptPath = path.join(dataPath, 'scripts/'); +const repoPath = path.join(dataPath, 'repo/'); const bakPath = path.join(dataPath, 'bak/'); const logPath = path.join(dataPath, 'log/'); const dbPath = path.join(dataPath, 'db/'); @@ -101,6 +102,7 @@ export default { uploadPath, configPath, scriptPath, + repoPath, samplePath, blackFileList: [ 'auth.json', diff --git a/back/services/subscription.ts b/back/services/subscription.ts index 69cc5fc2..039b0819 100644 --- a/back/services/subscription.ts +++ b/back/services/subscription.ts @@ -277,7 +277,9 @@ export default class SubscriptionService { } for (const doc of docs) { const filePath = join(config.scriptPath, doc.alias); + const repoPath = join(config.repoPath, doc.alias); await rmPath(filePath); + await rmPath(repoPath); } } } diff --git a/src/pages/script/index.tsx b/src/pages/script/index.tsx index 02bfb187..c420b69c 100644 --- a/src/pages/script/index.tsx +++ b/src/pages/script/index.tsx @@ -108,6 +108,7 @@ const Script = () => { }; const item = findNode(_data, (c) => c.key === obj.node.key); if (item) { + obj.node = item; setExpandedKeys([p as string]); onTreeSelect([vkey], obj); } @@ -643,7 +644,7 @@ const Script = () => { fontSize: 12, lineNumbersMinChars: 3, glyphMargin: false, - accessibilitySupport: 'off' + accessibilitySupport: 'off', }} onMount={(editor) => { editorRef.current = editor;