Skip to content

Commit

Permalink
修复任务跳转脚本未显示文件大小,订阅删除未删除 repo 目录
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Sep 8, 2024
1 parent 69fcf45 commit ff98c3a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions back/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/');
Expand Down Expand Up @@ -101,6 +102,7 @@ export default {
uploadPath,
configPath,
scriptPath,
repoPath,
samplePath,
blackFileList: [
'auth.json',
Expand Down
2 changes: 2 additions & 0 deletions back/services/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/script/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -643,7 +644,7 @@ const Script = () => {
fontSize: 12,
lineNumbersMinChars: 3,
glyphMargin: false,
accessibilitySupport: 'off'
accessibilitySupport: 'off',
}}
onMount={(editor) => {
editorRef.current = editor;
Expand Down

0 comments on commit ff98c3a

Please sign in to comment.