fix(app): position status circle inside input wrapper and fix dialog padding
This commit is contained in:
@@ -54,14 +54,25 @@ async function checkHealth(url: string, platform: ReturnType<typeof usePlatform>
|
|||||||
function AddRow(props: AddRowProps) {
|
function AddRow(props: AddRowProps) {
|
||||||
return (
|
return (
|
||||||
<div class="flex items-center px-4 min-h-14 py-3 min-w-0 flex-1">
|
<div class="flex items-center px-4 min-h-14 py-3 min-w-0 flex-1">
|
||||||
<div class="relative flex-1 min-w-0">
|
<div class="flex-1 min-w-0 [&_[data-slot=input-wrapper]]:relative">
|
||||||
<div
|
<div
|
||||||
classList={{
|
classList={{
|
||||||
"size-1.5 rounded-full absolute left-3 top-1/2 -translate-y-1/2": true,
|
"size-1.5 rounded-full absolute left-3 z-10 pointer-events-none": true,
|
||||||
"bg-icon-success-base": props.status === true,
|
"bg-icon-success-base": props.status === true,
|
||||||
"bg-icon-critical-base": props.status === false,
|
"bg-icon-critical-base": props.status === false,
|
||||||
"bg-border-weak-base": props.status === undefined,
|
"bg-border-weak-base": props.status === undefined,
|
||||||
}}
|
}}
|
||||||
|
style={{ top: "50%", transform: "translateY(-50%)" }}
|
||||||
|
ref={(el) => {
|
||||||
|
// Position relative to input-wrapper
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
const wrapper = el.parentElement?.querySelector('[data-slot="input-wrapper"]')
|
||||||
|
if (wrapper instanceof HTMLElement) {
|
||||||
|
wrapper.style.position = "relative"
|
||||||
|
wrapper.appendChild(el)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
type="text"
|
type="text"
|
||||||
@@ -346,7 +357,7 @@ export function DialogSelectServer() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog title={language.t("dialog.server.title")}>
|
<Dialog title={language.t("dialog.server.title")}>
|
||||||
<div class="flex flex-col gap-2 pb-5">
|
<div class="flex flex-col gap-2">
|
||||||
<List
|
<List
|
||||||
search={{ placeholder: language.t("dialog.server.search.placeholder"), autofocus: false }}
|
search={{ placeholder: language.t("dialog.server.search.placeholder"), autofocus: false }}
|
||||||
noInitialSelection
|
noInitialSelection
|
||||||
@@ -546,7 +557,7 @@ export function DialogSelectServer() {
|
|||||||
}}
|
}}
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
<div class="px-5">
|
<div class="px-5 pb-5">
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
icon="plus-small"
|
icon="plus-small"
|
||||||
|
|||||||
Reference in New Issue
Block a user