refactor: directory
This commit is contained in:
@@ -189,6 +189,11 @@ export default function ScriptsPage() {
|
||||
void submitPublish(publish.releaseNote, publish.visibility);
|
||||
};
|
||||
|
||||
const triggerUpload = (parentPath?: string) => {
|
||||
chooseUpload(parentPath);
|
||||
uploadInputRef.current?.click();
|
||||
};
|
||||
|
||||
return (
|
||||
<section className="workspace-layout">
|
||||
<ScriptExplorer
|
||||
@@ -203,11 +208,11 @@ export default function ScriptsPage() {
|
||||
keyword={keyword}
|
||||
onKeywordChange={setKeyword}
|
||||
onRefresh={() => void load(true)}
|
||||
onUpload={() => chooseUpload("")}
|
||||
onUpload={() => triggerUpload("")}
|
||||
onOpenCreateDialog={(parentPath, scriptType) =>
|
||||
openCreateDialog(parentPath, scriptType)}
|
||||
onOpenFolderDialog={(parentPath) => openFolderDialog(parentPath)}
|
||||
onChooseUpload={(parentPath) => chooseUpload(parentPath)}
|
||||
onChooseUpload={(parentPath) => triggerUpload(parentPath)}
|
||||
onContextMenu={showContextMenu}
|
||||
onSelect={openTab}
|
||||
uploadInputRef={uploadInputRef}
|
||||
|
||||
Reference in New Issue
Block a user