small fix

This commit is contained in:
josc146 2024-05-28 21:19:26 +08:00
parent 79476f66a6
commit 1b3aa629da

View File

@ -115,6 +115,8 @@ const Configs: FC = observer(() => {
const onClickSave = () => {
commonStore.setModelConfig(selectedIndex, selectedConfig);
const webgpu = selectedConfig.modelParameters.device === 'WebGPU';
if (!webgpu) {
// When clicking RunButton in Configs page, updateConfig will be called twice,
// because there are also RunButton in other pages, and the calls to updateConfig in both places are necessary.
updateConfig({
@ -137,6 +139,7 @@ const Configs: FC = observer(() => {
toast(error, { type: 'error' });
}
});
}
toast(t('Config Saved'), { autoClose: 300, type: 'success' });
};