+
+ }
+ items={getTrafficChartDownloadItems(chartId, containerId, filename)}
+ />
+ );
+}
diff --git a/src/components/dashboard/platform/PlatformViewSwitcher.tsx b/src/components/dashboard/platform/PlatformViewSwitcher.tsx
index ffa9584d..6d49c8cf 100644
--- a/src/components/dashboard/platform/PlatformViewSwitcher.tsx
+++ b/src/components/dashboard/platform/PlatformViewSwitcher.tsx
@@ -17,6 +17,7 @@ interface IPlatformViewSwitcherProps {
onSelectAll: () => void;
layout?: "header" | "mobile";
className?: string;
+ isPlatformSelectDisabled?: boolean;
}
export default function PlatformViewSwitcher({
@@ -26,9 +27,19 @@ export default function PlatformViewSwitcher({
onSelectAll,
layout = "header",
className,
+ isPlatformSelectDisabled = false,
}: IPlatformViewSwitcherProps) {
const isMobileLayout = layout === "mobile";
+ const platformTriggerClassName = twMerge(
+ "flex h-12 items-center rounded-2xl",
+ isMobileLayout ? "w-full min-w-0" : "w-34 shrink-0",
+ isAllView &&
+ "border border-surface-400 bg-surface-100 text-text-muted hover:bg-surface-200",
+ isPlatformSelectDisabled &&
+ "cursor-not-allowed border border-surface-400 bg-surface-200 text-text-muted hover:bg-surface-200",
+ );
+
return (
);
diff --git a/src/components/dashboard/platform/SinglePlatformView.tsx b/src/components/dashboard/platform/SinglePlatformView.tsx
index d2454089..1088c1d4 100644
--- a/src/components/dashboard/platform/SinglePlatformView.tsx
+++ b/src/components/dashboard/platform/SinglePlatformView.tsx
@@ -25,6 +25,7 @@ import DashboardAiSummarySection from "@/components/dashboard/ai-report/componen
import BudgetGaugeChart from "@/components/dashboard/charts/BudgetGaugeChart";
import PlatformDetailTable from "@/components/dashboard/platform/PlatformDetailTable";
import PlatformTrafficChart from "@/components/dashboard/platform/PlatformTrafficChart";
+import PlatformTrafficChartDownload from "@/components/dashboard/platform/PlatformTrafficChartDownload";
import {
PlatformDualBudgetGaugeSkeleton,
PlatformSingleBudgetGaugeSkeleton,
@@ -163,6 +164,7 @@ export default function SinglePlatformView({
]}
/>
}
+ RightElement={
downloadChartPng(chartId, filename),
+ },
+ {
+ label: "SVG 저장",
+ onClick: () => downloadChartSvg(containerId, filename),
+ },
+ {
+ label: "CSV 다운로드",
+ onClick: () => downloadChartCsv(chartId),
+ },
+ ];
+}
+
+export function getPlatformTrafficFilename(platform: string) {
+ return `platform-traffic-${platform}-${todayStamp()}`;
+}
+
+export function getPlatformAllTrafficFilename() {
+ return `platform-all-traffic-${todayStamp()}`;
+}
diff --git a/src/components/sidebar/WorkspaceSwitcher.tsx b/src/components/sidebar/WorkspaceSwitcher.tsx
index f8cc8ce3..a3d0b489 100644
--- a/src/components/sidebar/WorkspaceSwitcher.tsx
+++ b/src/components/sidebar/WorkspaceSwitcher.tsx
@@ -282,7 +282,12 @@ export function WorkspaceSwitcher({
))}
+
0 && "border-t border-surface-300",
+ )}
+ >