This commit is contained in:
josc146
2023-06-01 16:54:21 +08:00
parent 06a125b8d7
commit b63370928d
15 changed files with 85 additions and 31 deletions

View File

@@ -132,5 +132,6 @@
"Are you sure you want to reset all configs? This will obtain the latest preset configs, but will override your custom configs and cannot be undone.": "你确定要重置所有配置吗?这会获取最新的预设配置,但会覆盖你的自定义配置,并且无法撤销",
"Advanced": "高级",
"Custom Python Path": "自定义Python路径",
"Custom Models Path": "自定义模型路径"
"Custom Models Path": "自定义模型路径",
"MacOS is not supported yet, please convert manually.": "暂不支持MacOS, 请手动转换"
}

View File

@@ -835,6 +835,11 @@ export const Configs: FC = observer(() => {
</div>
} />
<ToolTipButton text={t('Convert')} desc={t('Convert model with these configs')} onClick={async () => {
if(commonStore.platform=="darwin"){
toast(t("MacOS is not supported yet, please convert manually."), { type: 'info' })
return
}
const modelPath = `${commonStore.settings.customModelsPath}/${selectedConfig.modelParameters.modelName}`;
if (await FileExists(modelPath)) {
const strategy = getStrategy(selectedConfig);

View File

@@ -62,7 +62,7 @@ export const Downloads: FC = observer(() => {
ContinueDownload(status.url);
}} />}
<ToolTipButton desc={t('Open Folder')} icon={<Folder20Regular />} onClick={() => {
OpenFileFolder(status.path);
OpenFileFolder(`${commonStore.settings.customModelsPath}/${status.name}`);
}} />
</div>
</Field>