fix: highlight menu dropdown server options
This commit is contained in:
parent
3445a25606
commit
50c499601e
@ -73,6 +73,8 @@ const LocalServerScreen = () => {
|
|||||||
const [host, setHost] = useAtom(hostAtom)
|
const [host, setHost] = useAtom(hostAtom)
|
||||||
const [port, setPort] = useAtom(portAtom)
|
const [port, setPort] = useAtom(portAtom)
|
||||||
|
|
||||||
|
const hostOptions = ['127.0.0.1', '0.0.0.0']
|
||||||
|
|
||||||
const FIRST_TIME_VISIT_API_SERVER = 'firstTimeVisitAPIServer'
|
const FIRST_TIME_VISIT_API_SERVER = 'firstTimeVisitAPIServer'
|
||||||
|
|
||||||
const [firstTimeVisitAPIServer, setFirstTimeVisitAPIServer] =
|
const [firstTimeVisitAPIServer, setFirstTimeVisitAPIServer] =
|
||||||
@ -166,8 +168,19 @@ const LocalServerScreen = () => {
|
|||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="127.0.0.1">127.0.0.1</SelectItem>
|
{hostOptions.map((option, i) => {
|
||||||
<SelectItem value="0.0.0.0">0.0.0.0</SelectItem>
|
return (
|
||||||
|
<SelectItem
|
||||||
|
key={i}
|
||||||
|
value={option}
|
||||||
|
className={twMerge(
|
||||||
|
host === option && 'bg-secondary'
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{option}
|
||||||
|
</SelectItem>
|
||||||
|
)
|
||||||
|
})}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user