Skip to content

Commit

Permalink
enable button start server when user first time visit
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Jan 17, 2024
1 parent 292496e commit a6aec56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/screens/LocalServer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const LocalServerScreen = () => {
<Button
block
themes={serverEnabled ? 'danger' : 'success'}
disabled={stateModel.loading || firstTimeVisitAPIServer}
disabled={stateModel.loading}
onClick={() => {
if (serverEnabled) {
window.core?.api?.stopServer()
Expand All @@ -116,6 +116,10 @@ const LocalServerScreen = () => {
isVerboseEnabled
)
setServerEnabled(true)
if (firstTimeVisitAPIServer) {
localStorage.setItem(FIRST_TIME_VISIT_API_SERVER, 'false')
setFirstTimeVisitAPIServer(false)
}
}
}}
>
Expand Down

0 comments on commit a6aec56

Please sign in to comment.