diff --git a/apps/publisher-dashboard/src/lib/components/dashboard/dashboard-card.svelte b/apps/publisher-dashboard/src/lib/components/dashboard/dashboard-card.svelte new file mode 100644 index 0000000..7964f38 --- /dev/null +++ b/apps/publisher-dashboard/src/lib/components/dashboard/dashboard-card.svelte @@ -0,0 +1,27 @@ + + +
+
+

{title}

+
+ +
+ {@render children()} +
+
diff --git a/apps/publisher-dashboard/src/lib/components/dashboard/index.ts b/apps/publisher-dashboard/src/lib/components/dashboard/index.ts index adcfec0..070e611 100644 --- a/apps/publisher-dashboard/src/lib/components/dashboard/index.ts +++ b/apps/publisher-dashboard/src/lib/components/dashboard/index.ts @@ -1,3 +1,4 @@ +export { default as DashboardCard } from "./dashboard-card.svelte"; export { default as FrequentFilters } from "./frequent-filters.svelte"; export { default as MetricCard } from "./metric-card.svelte"; export { default as PeakTrafficChart } from "./peak-traffic-chart.svelte"; diff --git a/apps/publisher-dashboard/src/lib/components/dashboard/peak-traffic-chart.svelte b/apps/publisher-dashboard/src/lib/components/dashboard/peak-traffic-chart.svelte index ab172de..ddd1963 100644 --- a/apps/publisher-dashboard/src/lib/components/dashboard/peak-traffic-chart.svelte +++ b/apps/publisher-dashboard/src/lib/components/dashboard/peak-traffic-chart.svelte @@ -1,5 +1,6 @@ -
-
-

Peak Traffic Hours

-
- -
-
+ +
+ +
-
+
{#each hours as hour} -
- {hour} -
+ {hour} {/each}
- -
-
- {#each hours as _, hourIndex} - {#each days as _, dayIndex} - {@const value = heatmapData[hourIndex][dayIndex]} + +
+ +
+ {#each hours as _} +
+ {/each} +
+ + +
+ {#each days as _, dayIndex} + {@const thisMonth = thisMonthData[dayIndex]} + {@const lastMonth = lastMonthData[dayIndex]} +
+
+ + +
- -
- {value}% -
+ + + + + + + +
- {/each} +
{/each}
-
+
{#each days as day}
{day}
{/each} @@ -89,18 +112,30 @@ function getCellOpacity(value: number): number {
-
+
-
- {#each [0.2, 0.4, 0.6, 0.8, 1] as opacity} -
- {/each} +
+ This month +
+
+
+ + + + + + + +
- Traffic intensity + Last month
-
+