mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-14 08:50:31 +00:00
Run pre-commit hooks over existing codebase
Co-Authored-By: Ben Phelps <ben@phelps.io>
This commit is contained in:
parent
fa50bbad9c
commit
19c25713c4
387 changed files with 4785 additions and 4109 deletions
|
@ -1,7 +1,3 @@
|
|||
export default function Block({ position, children }) {
|
||||
return (
|
||||
<div className={`absolute ${position} z-20 text-sm pointer-events-none`}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
return <div className={`absolute ${position} z-20 text-sm pointer-events-none`}>{children}</div>;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@ class Chart extends PureComponent {
|
|||
<AreaChart data={dataPoints}>
|
||||
<defs>
|
||||
<linearGradient id="color" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="5%" stopColor="rgb(var(--color-500))" stopOpacity={0.4}/>
|
||||
<stop offset="95%" stopColor="rgb(var(--color-500))" stopOpacity={0.1}/>
|
||||
<stop offset="5%" stopColor="rgb(var(--color-500))" stopOpacity={0.4} />
|
||||
<stop offset="95%" stopColor="rgb(var(--color-500))" stopOpacity={0.1} />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<Area
|
||||
|
@ -24,7 +24,8 @@ class Chart extends PureComponent {
|
|||
type="monotoneX"
|
||||
dataKey="value"
|
||||
stroke="rgb(var(--color-500))"
|
||||
fillOpacity={1} fill="url(#color)"
|
||||
fillOpacity={1}
|
||||
fill="url(#color)"
|
||||
baseLine={0}
|
||||
/>
|
||||
<Tooltip
|
||||
|
@ -34,7 +35,7 @@ class Chart extends PureComponent {
|
|||
classNames="rounded-md text-xs p-0.5"
|
||||
contentStyle={{
|
||||
backgroundColor: "rgb(var(--color-800))",
|
||||
color: "rgb(var(--color-100))"
|
||||
color: "rgb(var(--color-100))",
|
||||
}}
|
||||
/>
|
||||
</AreaChart>
|
||||
|
|
|
@ -11,15 +11,15 @@ class ChartDual extends PureComponent {
|
|||
<div className="absolute -top-1 -left-1 h-[120px] w-[calc(100%+0.5em)] z-0">
|
||||
<div className="overflow-clip z-10 w-full h-full">
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
<AreaChart data={dataPoints} stackOffset={stackOffset ?? "none"}>
|
||||
<AreaChart data={dataPoints} stackOffset={stackOffset ?? "none"}>
|
||||
<defs>
|
||||
<linearGradient id="colorA" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="5%" stopColor="rgb(var(--color-800))" stopOpacity={0.8}/>
|
||||
<stop offset="95%" stopColor="rgb(var(--color-800))" stopOpacity={0.5}/>
|
||||
<stop offset="5%" stopColor="rgb(var(--color-800))" stopOpacity={0.8} />
|
||||
<stop offset="95%" stopColor="rgb(var(--color-800))" stopOpacity={0.5} />
|
||||
</linearGradient>
|
||||
<linearGradient id="colorB" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="5%" stopColor="rgb(var(--color-500))" stopOpacity={0.4}/>
|
||||
<stop offset="95%" stopColor="rgb(var(--color-500))" stopOpacity={0.1}/>
|
||||
<stop offset="5%" stopColor="rgb(var(--color-500))" stopOpacity={0.4} />
|
||||
<stop offset="95%" stopColor="rgb(var(--color-500))" stopOpacity={0.1} />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
|
@ -30,7 +30,8 @@ class ChartDual extends PureComponent {
|
|||
type="monotoneX"
|
||||
dataKey="a"
|
||||
stroke="rgb(var(--color-700))"
|
||||
fillOpacity={1} fill="url(#colorA)"
|
||||
fillOpacity={1}
|
||||
fill="url(#colorA)"
|
||||
/>
|
||||
<Area
|
||||
name={label[1]}
|
||||
|
@ -39,7 +40,8 @@ class ChartDual extends PureComponent {
|
|||
type="monotoneX"
|
||||
dataKey="b"
|
||||
stroke="rgb(var(--color-500))"
|
||||
fillOpacity={1} fill="url(#colorB)"
|
||||
fillOpacity={1}
|
||||
fill="url(#colorB)"
|
||||
/>
|
||||
<Tooltip
|
||||
allowEscapeViewBox={{ x: false, y: false }}
|
||||
|
@ -48,9 +50,8 @@ class ChartDual extends PureComponent {
|
|||
classNames="rounded-md text-xs p-0.5"
|
||||
contentStyle={{
|
||||
backgroundColor: "rgb(var(--color-800))",
|
||||
color: "rgb(var(--color-100))"
|
||||
color: "rgb(var(--color-100))",
|
||||
}}
|
||||
|
||||
/>
|
||||
</AreaChart>
|
||||
</ResponsiveContainer>
|
||||
|
|
|
@ -3,8 +3,8 @@ export default function Container({ children, chart = true, className = "" }) {
|
|||
<div>
|
||||
{children}
|
||||
<div className={`absolute top-0 right-0 bottom-0 left-0 overflow-clip pointer-events-none ${className}`} />
|
||||
{ chart && <div className="h-[68px] overflow-clip" /> }
|
||||
{ !chart && <div className="h-[16px] overflow-clip" /> }
|
||||
{chart && <div className="h-[68px] overflow-clip" />}
|
||||
{!chart && <div className="h-[16px] overflow-clip" />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@ export default function Tooltip({ active, payload, formatter }) {
|
|||
<div className="bg-theme-800/80 rounded-md text-theme-200 px-2 py-0">
|
||||
{payload.map((pld, id) => (
|
||||
<div key={Math.random()} className="first-of-type:pt-0 pt-0.5">
|
||||
<div>{formatter(pld.value)} {payload[id].name}</div>
|
||||
<div>
|
||||
{formatter(pld.value)} {payload[id].name}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
@ -12,4 +14,4 @@ export default function Tooltip({ active, payload, formatter }) {
|
|||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@ import { useTranslation } from "next-i18next";
|
|||
export default function Error() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return <div className="absolute bottom-2 left-2 z-20 text-red-400 text-xs opacity-75">
|
||||
{t("widget.api_error")}
|
||||
</div>;
|
||||
return <div className="absolute bottom-2 left-2 z-20 text-red-400 text-xs opacity-75">{t("widget.api_error")}</div>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue