mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-18 07:56:57 +00:00
responsive Uptime Page
This commit is contained in:
parent
1088806921
commit
a3b47bd314
@ -47,10 +47,10 @@ const timeFormats = {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const gridColumns = {
|
const minBoxWidths = {
|
||||||
1: 30,
|
1: 24,
|
||||||
2: 56,
|
2: 24,
|
||||||
3: 30
|
3: 24
|
||||||
};
|
};
|
||||||
|
|
||||||
interface UptimeData {
|
interface UptimeData {
|
||||||
@ -193,10 +193,9 @@ export default function Uptime() {
|
|||||||
|
|
||||||
<Tooltip.Provider>
|
<Tooltip.Provider>
|
||||||
<div
|
<div
|
||||||
className="grid gap-0.5 w-full overflow-x-auto pb-2"
|
className="grid gap-0.5 w-full pb-2"
|
||||||
style={{
|
style={{
|
||||||
gridTemplateColumns: `repeat(${gridColumns[timespan]}, minmax(0, 1fr))`,
|
gridTemplateColumns: `repeat(auto-fit, minmax(${minBoxWidths[timespan]}px, 1fr))`
|
||||||
minWidth: `${gridColumns[timespan] * 24}px`
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{reversedSummary.map((entry) => (
|
{reversedSummary.map((entry) => (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user