Skip to content

Commit

Permalink
enhancement: remove tooltip local api server when server start (#4275)
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur authored Dec 16, 2024
1 parent e5a2d41 commit 5041651
Showing 1 changed file with 29 additions and 35 deletions.
64 changes: 29 additions & 35 deletions web/screens/LocalServer/LocalServerLeftPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,44 +163,38 @@ const LocalServerLeftPanel = () => {
</div>
</div>

<Tooltip
trigger={
<div className="p-3">
<p className="mb-2 block font-semibold">Server Options</p>

<div className="flex w-full">
<Select
value={host}
onValueChange={(e) => setHost(e)}
disabled={serverEnabled}
options={hostOptions}
block
/>
</div>
<div className="p-3">
<p className="mb-2 block font-semibold">Server Options</p>

<div className="relative z-50 mt-2 block">
<Input
className={twMerge(
errorRangePort && 'border-[hsla(var(--destructive-bg))]'
)}
type="number"
value={port}
onChange={(e) => {
handleChangePort(e.target.value)
}}
maxLength={5}
disabled={serverEnabled}
/>
</div>
<div className="flex w-full">
<Select
value={host}
onValueChange={(e) => setHost(e)}
disabled={serverEnabled}
options={hostOptions}
block
/>
</div>

{errorRangePort && (
<p className="mt-2 text-xs text-[hsla(var(--destructive-bg))]">{`The port range should be from 0 to 65536`}</p>
<div className="relative z-50 mt-2 block">
<Input
className={twMerge(
errorRangePort && 'border-[hsla(var(--destructive-bg))]'
)}
</div>
}
disabled={!serverEnabled}
content="Settings cannot be modified while the server is running"
/>
type="number"
value={port}
onChange={(e) => {
handleChangePort(e.target.value)
}}
maxLength={5}
disabled={serverEnabled}
/>
</div>

{errorRangePort && (
<p className="mt-2 text-xs text-[hsla(var(--destructive-bg))]">{`The port range should be from 0 to 65536`}</p>
)}
</div>

<div className="space-y-4 px-3">
<div className="block">
Expand Down

0 comments on commit 5041651

Please sign in to comment.