From c4922ad1d4ee0d32ccb4c9400c22b9a7cac339de Mon Sep 17 00:00:00 2001 From: josc146 Date: Sat, 20 May 2023 15:22:46 +0800 Subject: [PATCH] chore --- frontend/src/App.tsx | 1 + frontend/src/components/RunButton.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 0c05548..a4d225d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -93,6 +93,7 @@ const App: FC = observer(() => { }} position="top-center" autoClose={4000} + pauseOnHover={true} hideProgressBar={true} newestOnTop={true} closeOnClick={false} diff --git a/frontend/src/components/RunButton.tsx b/frontend/src/components/RunButton.tsx index 7005503..539e3c1 100644 --- a/frontend/src/components/RunButton.tsx +++ b/frontend/src/components/RunButton.tsx @@ -94,6 +94,9 @@ export const RunButton: FC<{ onClickRun?: MouseEventHandler, iconMode?: boolean commonStore.setModelStatus(ModelStatus.Offline); toast(t('Failed to switch model'), {type: 'error'}); } + }).catch(() => { + commonStore.setModelStatus(ModelStatus.Offline); + toast(t('Failed to switch model'), {type: 'error'}); }); } }).catch(() => {