improve path processing
This commit is contained in:
@@ -295,7 +295,7 @@ const SidePanel: FC = observer(() => {
|
||||
OpenSaveFileDialog('*.txt', 'conversation.txt', savedContent).then((path) => {
|
||||
if (path)
|
||||
toastWithButton(t('Conversation Saved'), t('Open'), () => {
|
||||
OpenFileFolder(path, false);
|
||||
OpenFileFolder(path);
|
||||
});
|
||||
}).catch(e => {
|
||||
toast(t('Error') + ' - ' + (e.message || e), { type: 'error', autoClose: 2500 });
|
||||
|
||||
@@ -426,7 +426,7 @@ const CompositionPanel: FC = observer(() => {
|
||||
OpenSaveFileDialog('*.txt', 'abc-music.txt', commonStore.compositionParams.prompt).then((path) => {
|
||||
if (path)
|
||||
toastWithButton(t('File Saved'), t('Open'), () => {
|
||||
OpenFileFolder(path, false);
|
||||
OpenFileFolder(path);
|
||||
});
|
||||
}).catch((e) => {
|
||||
toast(t('Error') + ' - ' + (e.message || e), { type: 'error', autoClose: 2500 });
|
||||
@@ -437,7 +437,7 @@ const CompositionPanel: FC = observer(() => {
|
||||
OpenSaveFileDialogBytes('*.mid', 'music.mid', Array.from(new Uint8Array(params.midi))).then((path) => {
|
||||
if (path)
|
||||
toastWithButton(t('File Saved'), t('Open'), () => {
|
||||
OpenFileFolder(path, false);
|
||||
OpenFileFolder(path);
|
||||
});
|
||||
}).catch((e) => {
|
||||
toast(t('Error') + ' - ' + (e.message || e), { type: 'error', autoClose: 2500 });
|
||||
|
||||
@@ -67,7 +67,7 @@ const Downloads: FC = observer(() => {
|
||||
AddToDownloadList(status.path, status.url);
|
||||
}} />}
|
||||
<ToolTipButton desc={t('Open Folder')} icon={<Folder20Regular />} onClick={() => {
|
||||
OpenFileFolder(status.path, false);
|
||||
OpenFileFolder(status.path);
|
||||
}} />
|
||||
</div>
|
||||
</Field>
|
||||
|
||||
@@ -132,7 +132,7 @@ const columns: TableColumnDefinition<ModelSourceItem>[] = [
|
||||
{
|
||||
item.isComplete &&
|
||||
<ToolTipButton desc={t('Open Folder')} icon={<Folder20Regular />} onClick={() => {
|
||||
OpenFileFolder(`${commonStore.settings.customModelsPath}/${item.name}`, true);
|
||||
OpenFileFolder(`${commonStore.settings.customModelsPath}/${item.name}`);
|
||||
}} />
|
||||
}
|
||||
{item.downloadUrl && !item.isComplete &&
|
||||
|
||||
@@ -398,7 +398,7 @@ const LoraFinetune: FC = observer(() => {
|
||||
'Even for multi-turn conversations, they must be written in a single line using `\\n` to indicate line breaks. ' +
|
||||
'If they are different dialogues or topics, they should be written in separate lines.')} />
|
||||
<ToolTipButton desc={t('Open Folder')} icon={<Folder20Regular />} onClick={() => {
|
||||
OpenFileFolder(dataParams.dataPath, false);
|
||||
OpenFileFolder(dataParams.dataPath);
|
||||
}} />
|
||||
</div>
|
||||
<div className="flex gap-2 items-center">
|
||||
|
||||
Reference in New Issue
Block a user