fix: Remove vertical scrolling in the tab bar and dashboard and reduce scrollbar height in tab bar

This commit is contained in:
LukeGus
2025-10-22 12:09:35 -05:00
parent f9411bec00
commit ee3101c5c6
3 changed files with 38 additions and 3 deletions

View File

@@ -5,6 +5,37 @@
<link rel="icon" type="image/svg+xml" href="/favicon.ico" /> <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Termix</title> <title>Termix</title>
<style>
/* Custom scrollbar styles */
.hide-scrollbar {
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
}
.hide-scrollbar::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera */
}
.skinny-scrollbar {
scrollbar-width: thin; /* Firefox */
scrollbar-color: #4a4a4a #1e1e21; /* thumb and track color for Firefox */
}
.skinny-scrollbar::-webkit-scrollbar {
width: 6px; /* width for vertical scrollbar */
height: 6px; /* height for horizontal scrollbar */
}
.skinny-scrollbar::-webkit-scrollbar-track {
background: #1e1e21; /* track color */
}
.skinny-scrollbar::-webkit-scrollbar-thumb {
background-color: #4a4a4a; /* thumb color */
border-radius: 3px; /* roundness of the thumb */
border: 1px solid #1e1e21; /* border around the thumb */
}
</style>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>

View File

@@ -546,7 +546,9 @@ export function Dashboard({
{t("dashboard.reset")} {t("dashboard.reset")}
</Button> </Button>
</div> </div>
<div className="grid gap-4 grid-cols-[repeat(auto-fit,minmax(200px,1fr))] auto-rows-min overflow-y-auto overflow-x-hidden"> <div
className={`grid gap-4 grid-cols-[repeat(auto-fit,minmax(200px,1fr))] auto-rows-min overflow-x-hidden ${recentActivityLoading ? "overflow-y-hidden" : "overflow-y-auto"}`}
>
{recentActivityLoading ? ( {recentActivityLoading ? (
<div className="flex flex-row items-center text-muted-foreground text-sm"> <div className="flex flex-row items-center text-muted-foreground text-sm">
<Loader2 className="animate-spin mr-2" size={16} /> <Loader2 className="animate-spin mr-2" size={16} />
@@ -650,7 +652,9 @@ export function Dashboard({
<ChartLine className="mr-3" /> <ChartLine className="mr-3" />
{t("dashboard.serverStats")} {t("dashboard.serverStats")}
</p> </p>
<div className="grid gap-4 grid-cols-[repeat(auto-fit,minmax(200px,1fr))] auto-rows-min overflow-y-auto overflow-x-hidden"> <div
className={`grid gap-4 grid-cols-[repeat(auto-fit,minmax(200px,1fr))] auto-rows-min overflow-x-hidden ${serverStatsLoading ? "overflow-y-hidden" : "overflow-y-auto"}`}
>
{serverStatsLoading ? ( {serverStatsLoading ? (
<div className="flex flex-row items-center text-muted-foreground text-sm"> <div className="flex flex-row items-center text-muted-foreground text-sm">
<Loader2 className="animate-spin mr-2" size={16} /> <Loader2 className="animate-spin mr-2" size={16} />

View File

@@ -486,7 +486,7 @@ export function TopNavbar({
> >
<div <div
ref={containerRef} ref={containerRef}
className="h-full p-1 pr-2 border-r-2 border-dark-border w-[calc(100%-6rem)] flex items-center overflow-x-auto gap-1" className="h-full p-1 pr-2 border-r-2 border-dark-border w-[calc(100%-6rem)] flex items-center overflow-x-auto overflow-y-hidden skinny-scrollbar gap-1"
> >
{tabs.map((tab: TabData, index: number) => { {tabs.map((tab: TabData, index: number) => {
const isActive = tab.id === currentTab; const isActive = tab.id === currentTab;