From 0c2702c0d7ba64f120898ccaa416b8c18874617e Mon Sep 17 00:00:00 2001 From: Eduard Gert Date: Mon, 11 May 2026 13:30:05 +0200 Subject: [PATCH] update height and wording --- .../src/components/ProfileSelector.tsx | 355 ++++++++---------- .../src/modules/settings/SettingsSSH.tsx | 4 +- .../settings/SettingsTroubleshooting.tsx | 27 +- client/ui-wails/main.go | 4 +- 4 files changed, 163 insertions(+), 227 deletions(-) diff --git a/client/ui-wails/frontend/src/components/ProfileSelector.tsx b/client/ui-wails/frontend/src/components/ProfileSelector.tsx index db59f383d..c403f8f06 100644 --- a/client/ui-wails/frontend/src/components/ProfileSelector.tsx +++ b/client/ui-wails/frontend/src/components/ProfileSelector.tsx @@ -4,14 +4,7 @@ import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; import * as ScrollArea from "@radix-ui/react-scroll-area"; import { Command } from "cmdk"; import { Dialogs } from "@wailsio/runtime"; -import { - ChevronDown, - MoreVertical, - PlusCircle, - Search, - Trash2, - UserMinus, -} from "lucide-react"; +import { ChevronDown, MoreVertical, PlusCircle, Search, Trash2, UserMinus } from "lucide-react"; import { cn } from "@/lib/cn"; import { generateColorFromString } from "@/lib/color"; import { NewProfileDialog } from "@/components/NewProfileDialog"; @@ -56,9 +49,7 @@ export const ProfileSelector = ({ email = "" }: Props) => { const selected = profiles.find((p) => p.id === selectedId) ?? profiles[0]; - const sorted = [...profiles].sort((a, b) => - a.name.localeCompare(b.name), - ); + const sorted = [...profiles].sort((a, b) => a.name.localeCompare(b.name)); const handleSelect = (id: string) => { setSelectedId(id); @@ -115,172 +106,145 @@ export const ProfileSelector = ({ email = "" }: Props) => { return ( <> - - - - - - - e.preventDefault()} - > - -
-
- - -
-
- - - - - -
-

- No Profiles Found -

-

- Try a different search term - or create a new profile. -

-
-
- - {sorted.map((profile) => ( - - handleSelect(profile.id) - } - onDeregister={() => - handleDeregister(profile.id) - } - onDelete={() => - handleDelete(profile.id) - } - /> - ))} -
-
- - - -
- -
- -
+
-
- -
- - New Profile + + {selected?.name ?? "No profile"} - - - - - - + {email && ( + + {email} + + )} +
+ + + + + + e.preventDefault()} + > + +
+
+ + +
+
+ + + + + +
+

+ No Profiles Found +

+

+ Try a different search term or create a new + profile. +

+
+
+ + {sorted.map((profile) => ( + handleSelect(profile.id)} + onDeregister={() => handleDeregister(profile.id)} + onDelete={() => handleDelete(profile.id)} + /> + ))} +
+
+ + + +
+ +
+ + + + + + + ); }; @@ -293,13 +257,7 @@ type ProfileRowProps = { onDelete: () => void; }; -const ProfileRow = ({ - profile, - selected, - onSelect, - onDeregister, - onDelete, -}: ProfileRowProps) => { +const ProfileRow = ({ profile, selected, onSelect, onDeregister, onDelete }: ProfileRowProps) => { const [menuOpen, setMenuOpen] = useState(false); const initial = profile.name.charAt(0).toUpperCase(); const initialColor = generateColorFromString(profile.name); @@ -311,13 +269,15 @@ const ProfileRow = ({ onSelect={() => onSelect()} className={cn( "group flex items-center gap-2 pl-2 pr-3 py-1.5 rounded-md cursor-default outline-none", - "data-[selected=true]:bg-nb-gray-920", - selected && "bg-nb-gray-920", + "data-[selected=true]:bg-nb-gray-910", + selected && "bg-nb-gray-910", )} >
@@ -326,19 +286,13 @@ const ProfileRow = ({ {profile.name} - +
diff --git a/client/ui-wails/frontend/src/modules/settings/SettingsTroubleshooting.tsx b/client/ui-wails/frontend/src/modules/settings/SettingsTroubleshooting.tsx index df043cae8..e21e9d042 100644 --- a/client/ui-wails/frontend/src/modules/settings/SettingsTroubleshooting.tsx +++ b/client/ui-wails/frontend/src/modules/settings/SettingsTroubleshooting.tsx @@ -94,7 +94,7 @@ export function SettingsTroubleshooting() { onChange={(e) => setTraceMinutes(Math.max(1, Math.min(30, Number(e.target.value) || 1))) } - customSuffix={"Minutes"} + customSuffix={"Minute(s)"} disabled={!trace} />
@@ -119,12 +119,7 @@ function ProgressSection({ stage, onCancel }: { stage: DebugStage; onCancel: () "Collecting logs, system details, and connection state. This usually takes a moment — keep this window open until it completes." } actions={ - } @@ -186,20 +181,12 @@ function DoneResult({ Close {showKey ? ( - ) : ( result.path && ( - @@ -235,10 +222,8 @@ function DoneResult({ } > Upload failed - {result.uploadFailureReason - ? `: ${result.uploadFailureReason}` - : "."}{" "} - The bundle is still saved locally. + {result.uploadFailureReason ? `: ${result.uploadFailureReason}` : "."} The + bundle is still saved locally. )} diff --git a/client/ui-wails/main.go b/client/ui-wails/main.go index 62d44ca73..73f0c311e 100644 --- a/client/ui-wails/main.go +++ b/client/ui-wails/main.go @@ -104,8 +104,8 @@ func main() { Title: "NetBird", Width: 925, MinWidth: 925, - Height: 600, - MinHeight: 600, + Height: 615, + MinHeight: 615, Hidden: false, BackgroundColour: application.NewRGB(24, 26, 29), URL: "/",