mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 07:35:24 +00:00
fix: fleet detail buttons overflowing the sidebar
This commit is contained in:
1 parent
f9ad5a0189
commit
deb86d11b6
1 file changed
+46
-26
@@ -1268,31 +1268,51 @@ function FleetDetail({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col flex-1 min-h-0">
|
<div className="flex flex-col flex-1 min-h-0">
|
||||||
<div className="flex items-center gap-2 p-3 border-b border-border shrink-0">
|
<div className="flex flex-col gap-2 p-3 border-b border-border shrink-0">
|
||||||
<Button variant="ghost" size="sm" onClick={onBack}>
|
<div className="flex min-w-0 items-center gap-2">
|
||||||
<ChevronLeft className="size-4" />
|
<Button
|
||||||
</Button>
|
variant="ghost"
|
||||||
<span
|
size="sm"
|
||||||
className="size-2.5 shrink-0"
|
className="shrink-0"
|
||||||
style={{ backgroundColor: fleet.color ?? "#6b7280" }}
|
onClick={onBack}
|
||||||
/>
|
>
|
||||||
<span className="text-sm font-semibold truncate">{fleet.name}</span>
|
<ChevronLeft className="size-4" />
|
||||||
<Badge variant="secondary" className="ml-1">
|
</Button>
|
||||||
{t("newUi.sidebar.fleets.memberCount", { count: members.length })}
|
<span
|
||||||
</Badge>
|
className="size-2.5 shrink-0"
|
||||||
<Button
|
style={{ backgroundColor: fleet.color ?? "#6b7280" }}
|
||||||
variant="outline"
|
/>
|
||||||
size="sm"
|
<span className="min-w-0 flex-1 truncate text-sm font-semibold">
|
||||||
className="ml-auto"
|
{fleet.name}
|
||||||
onClick={() => setShareOpen(true)}
|
</span>
|
||||||
>
|
<Badge variant="secondary" className="shrink-0">
|
||||||
<Share2 className="size-3.5 mr-1.5" />
|
{t("newUi.sidebar.fleets.memberCount", { count: members.length })}
|
||||||
{t("newUi.sidebar.fleets.shareFleet")}
|
</Badge>
|
||||||
</Button>
|
</div>
|
||||||
<Button variant="outline" size="sm" onClick={() => setPickerOpen(true)}>
|
<div className="flex min-w-0 gap-2">
|
||||||
<Settings2 className="size-3.5 mr-1.5" />
|
<Button
|
||||||
{t("newUi.sidebar.fleets.manageMembers")}
|
variant="outline"
|
||||||
</Button>
|
size="sm"
|
||||||
|
className="min-w-0 flex-1"
|
||||||
|
onClick={() => setShareOpen(true)}
|
||||||
|
>
|
||||||
|
<Share2 className="size-3.5 shrink-0" />
|
||||||
|
<span className="truncate">
|
||||||
|
{t("newUi.sidebar.fleets.shareFleet")}
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
className="min-w-0 flex-1"
|
||||||
|
onClick={() => setPickerOpen(true)}
|
||||||
|
>
|
||||||
|
<Settings2 className="size-3.5 shrink-0" />
|
||||||
|
<span className="truncate">
|
||||||
|
{t("newUi.sidebar.fleets.manageMembers")}
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex-1 min-h-0 overflow-y-auto p-3">
|
<div className="flex-1 min-h-0 overflow-y-auto p-3">
|
||||||
@@ -1308,7 +1328,7 @@ function FleetDetail({
|
|||||||
<div className="flex flex-col gap-3">
|
<div className="flex flex-col gap-3">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<select
|
<select
|
||||||
className="flex-1 px-2 py-1.5 text-xs bg-background border border-border text-foreground outline-none"
|
className="min-w-0 flex-1 px-2 py-1.5 text-xs bg-background border border-border text-foreground outline-none"
|
||||||
value={actionView}
|
value={actionView}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setActionView(e.target.value as FleetActionView)
|
setActionView(e.target.value as FleetActionView)
|
||||||
|
|||||||
Reference in new issue
Block a user