+
Gráfico não encontrado.
);
@@ -219,64 +237,51 @@ export function ChartWindowPage({ theme }: ChartWindowPageProps) {
};
return (
-
-
+
+
{chart.title}
-
-
+ section]:h-full [&>section]:rounded-none [&>section]:border-0"
+ : "min-h-0 flex-1 bg-white [&>section]:h-full [&>section]:rounded-none [&>section]:border-0 [&>section]:shadow-none"
+ }
+ >
{
- void openChartWindow(chartId);
+ const chart = charts.find((item) => item.id === chartId);
+
+ void openChartWindow(
+ chartId,
+ theme,
+ chart?.title ?? "Chart",
+ );
}, 100);
};
diff --git a/src/features/maincharts/utils/openChartWindow.ts b/src/features/maincharts/utils/openChartWindow.ts
index 66d1f25..1083df1 100644
--- a/src/features/maincharts/utils/openChartWindow.ts
+++ b/src/features/maincharts/utils/openChartWindow.ts
@@ -1,6 +1,10 @@
import { WebviewWindow } from "@tauri-apps/api/webviewWindow";
-export async function openChartWindow(chartId: string) {
+export async function openChartWindow(
+ chartId: string,
+ theme: "dark" | "light",
+ title: string,
+) {
const label = `chart-${chartId}`;
const existing = await WebviewWindow.getByLabel(label);
@@ -12,9 +16,9 @@ export async function openChartWindow(chartId: string) {
}
const chartWindow = new WebviewWindow(label, {
- url: `/chart-window/${chartId}`,
+ url: `/chart-window/${chartId}?theme=${theme}`,
- title: "Chart",
+ title,
width: 920,
height: 680,