fix: should disable start model button when there is a model is loading (#4713)
This commit is contained in:
parent
a47942d7df
commit
c5a5e55afe
@ -135,9 +135,11 @@ const MyModelList = ({ model }: Props) => {
|
|||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'flex items-center space-x-2 px-4 py-2 hover:bg-[hsla(var(--dropdown-menu-hover-bg))]',
|
'flex items-center space-x-2 px-4 py-2 hover:bg-[hsla(var(--dropdown-menu-hover-bg))]',
|
||||||
serverEnabled && 'cursor-not-allowed opacity-40'
|
(serverEnabled || stateModel.loading) &&
|
||||||
|
'cursor-not-allowed opacity-40'
|
||||||
)}
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (serverEnabled || stateModel.loading) return
|
||||||
onModelActionClick(model.id)
|
onModelActionClick(model.id)
|
||||||
setMore(false)
|
setMore(false)
|
||||||
}}
|
}}
|
||||||
@ -159,7 +161,7 @@ const MyModelList = ({ model }: Props) => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
disabled={!serverEnabled}
|
disabled={!serverEnabled || stateModel.loading}
|
||||||
content={
|
content={
|
||||||
<span>
|
<span>
|
||||||
{activeModel && activeModel.id === model.id
|
{activeModel && activeModel.id === model.id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user