fix: add dashboard line breaks

This commit is contained in:
LukeGus
2025-12-31 14:39:26 -06:00
parent faebdf7374
commit d792ba4c5b

View File

@@ -669,57 +669,109 @@ export function Dashboard({
<div className="grid gap-4 grid-cols-3 auto-rows-min overflow-y-auto overflow-x-hidden thin-scrollbar"> <div className="grid gap-4 grid-cols-3 auto-rows-min overflow-y-auto overflow-x-hidden thin-scrollbar">
<Button <Button
variant="outline" variant="outline"
className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 min-w-0 !bg-canvas" className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 !bg-canvas"
onClick={handleAddHost} onClick={handleAddHost}
> >
<Server <div className="flex flex-col items-center w-full max-w-full">
className="shrink-0" <Server
style={{ width: "40px", height: "40px" }} className="shrink-0"
/> style={{ width: "40px", height: "40px" }}
<span className="font-semibold text-sm mt-2"> />
{t("dashboard.addHost")} <span
</span> className="font-semibold text-sm mt-2 text-center block"
style={{
wordWrap: "break-word",
overflowWrap: "break-word",
width: "100%",
maxWidth: "100%",
hyphens: "auto",
display: "block",
whiteSpace: "normal",
}}
>
{t("dashboard.addHost")}
</span>
</div>
</Button> </Button>
<Button <Button
variant="outline" variant="outline"
className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 min-w-0 !bg-canvas" className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 !bg-canvas"
onClick={handleAddCredential} onClick={handleAddCredential}
> >
<Key <div className="flex flex-col items-center w-full max-w-full">
className="shrink-0" <Key
style={{ width: "40px", height: "40px" }} className="shrink-0"
/> style={{ width: "40px", height: "40px" }}
<span className="font-semibold text-sm mt-2"> />
{t("dashboard.addCredential")} <span
</span> className="font-semibold text-sm mt-2 text-center block"
style={{
wordWrap: "break-word",
overflowWrap: "break-word",
width: "100%",
maxWidth: "100%",
hyphens: "auto",
display: "block",
whiteSpace: "normal",
}}
>
{t("dashboard.addCredential")}
</span>
</div>
</Button> </Button>
{isAdmin && ( {isAdmin && (
<Button <Button
variant="outline" variant="outline"
className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 min-w-0 !bg-canvas" className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 !bg-canvas"
onClick={handleOpenAdminSettings} onClick={handleOpenAdminSettings}
> >
<Settings <div className="flex flex-col items-center w-full max-w-full">
className="shrink-0" <Settings
style={{ width: "40px", height: "40px" }} className="shrink-0"
/> style={{ width: "40px", height: "40px" }}
<span className="font-semibold text-sm mt-2"> />
{t("dashboard.adminSettings")} <span
</span> className="font-semibold text-sm mt-2 text-center block"
style={{
wordWrap: "break-word",
overflowWrap: "break-word",
width: "100%",
maxWidth: "100%",
hyphens: "auto",
display: "block",
whiteSpace: "normal",
}}
>
{t("dashboard.adminSettings")}
</span>
</div>
</Button> </Button>
)} )}
<Button <Button
variant="outline" variant="outline"
className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 min-w-0 !bg-canvas" className="border-2 !border-edge flex flex-col items-center justify-center h-auto p-3 !bg-canvas"
onClick={handleOpenUserProfile} onClick={handleOpenUserProfile}
> >
<User <div className="flex flex-col items-center w-full max-w-full">
className="shrink-0" <User
style={{ width: "40px", height: "40px" }} className="shrink-0"
/> style={{ width: "40px", height: "40px" }}
<span className="font-semibold text-sm mt-2"> />
{t("dashboard.userProfile")} <span
</span> className="font-semibold text-sm mt-2 text-center block"
style={{
wordWrap: "break-word",
overflowWrap: "break-word",
width: "100%",
maxWidth: "100%",
hyphens: "auto",
display: "block",
whiteSpace: "normal",
}}
>
{t("dashboard.userProfile")}
</span>
</div>
</Button> </Button>
</div> </div>
</div> </div>