mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 23:16:37 +08:00
feat(frontend): biome
This commit is contained in:
@@ -97,7 +97,8 @@ function SparklineMetricCard({
|
||||
formatter: (params: unknown) => {
|
||||
const items = Array.isArray(params) ? params : [];
|
||||
const item = items[0] as
|
||||
{ axisValueLabel?: string; value?: number } | undefined;
|
||||
| { axisValueLabel?: string; value?: number }
|
||||
| undefined;
|
||||
if (!item) return '';
|
||||
const raw = typeof item.value === 'number' ? item.value : 0;
|
||||
const formatted = valueFormatter
|
||||
|
||||
@@ -206,7 +206,8 @@ export function RatePressureChart({ data, hours }: RatePressureChartProps) {
|
||||
const applyVisibleAxisMax = useCallback(
|
||||
(startPercent: number, endPercent: number) => {
|
||||
const instance = chartRef.current?.getEchartsInstance?.() as
|
||||
EChartsType | undefined;
|
||||
| EChartsType
|
||||
| undefined;
|
||||
if (!instance) return;
|
||||
instance.setOption(
|
||||
{
|
||||
@@ -242,7 +243,8 @@ export function RatePressureChart({ data, hours }: RatePressureChartProps) {
|
||||
}>;
|
||||
}) => {
|
||||
const instance = chartRef.current?.getEchartsInstance?.() as
|
||||
EChartsType | undefined;
|
||||
| EChartsType
|
||||
| undefined;
|
||||
const { start, end } = readZoomPercent(
|
||||
params,
|
||||
chartModel.rpsValues.length,
|
||||
|
||||
@@ -335,7 +335,7 @@ export function RuleFlowCanvas({
|
||||
);
|
||||
const contextCanDeleteEdge = Boolean(
|
||||
contextMenu?.kind === 'edge' &&
|
||||
graph.edges.some((edge) => edge.id === contextMenu.id),
|
||||
graph.edges.some((edge) => edge.id === contextMenu.id),
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@import 'tailwindcss';
|
||||
@import 'tw-animate-css';
|
||||
@import "tailwindcss";
|
||||
@import "tw-animate-css";
|
||||
@plugin "@tailwindcss/typography";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
@@ -7,10 +7,10 @@
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
--font-sans: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||
--font-mono:
|
||||
var(--font-geist-mono), 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono',
|
||||
'PingFang SC', 'Microsoft YaHei', monospace;
|
||||
var(--font-geist-mono), "SF Mono", "Monaco", "Inconsolata", "Roboto Mono",
|
||||
"PingFang SC", "Microsoft YaHei", monospace;
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
|
||||
Reference in New Issue
Block a user