@@ -100,6 +100,9 @@ function SettingsPage() {
100100 const [ zAiSonnetModel , setZAiSonnetModel ] = useState ( 'glm-4.7' )
101101 const [ zAiOpusModel , setZAiOpusModel ] = useState ( 'glm-4.7' )
102102
103+ // Developer mode restart state
104+ const [ isRestarting , setIsRestarting ] = useState ( false )
105+
103106 // Sync local form state with fetched server values
104107 useEffect ( ( ) => {
105108 if ( port !== undefined ) setLocalPort ( String ( port ) )
@@ -921,7 +924,7 @@ function SettingsPage() {
921924 onClick = { ( ) => {
922925 restartVibora . mutate ( undefined , {
923926 onSuccess : ( ) => {
924- toast . success ( t ( 'developer.restartInitiated' ) )
927+ setIsRestarting ( true )
925928 } ,
926929 onError : ( error ) => {
927930 toast . error ( t ( 'developer.buildFailed' ) , {
@@ -930,16 +933,18 @@ function SettingsPage() {
930933 } ,
931934 } )
932935 } }
933- disabled = { restartVibora . isPending }
936+ disabled = { restartVibora . isPending || isRestarting }
934937 className = "shrink-0"
935938 >
936939 < HugeiconsIcon
937940 icon = { Loading03Icon }
938- className = { `mr-2 size-4 ${ restartVibora . isPending ? 'animate-spin' : '' } ` }
941+ className = { `mr-2 size-4 ${ restartVibora . isPending || isRestarting ? 'animate-spin' : '' } ` }
939942 />
940- { restartVibora . isPending
941- ? t ( 'developer.building' )
942- : t ( 'developer.restartButton' ) }
943+ { isRestarting
944+ ? t ( 'developer.restarting' )
945+ : restartVibora . isPending
946+ ? t ( 'developer.building' )
947+ : t ( 'developer.restartButton' ) }
943948 </ Button >
944949 </ div >
945950 </ div >
0 commit comments