From 166592407309af88386bcbaab5997ecb94011bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Fri, 31 May 2024 22:25:07 +0200 Subject: [PATCH] =?UTF-8?q?give=20dark=20mode=20some=20love=20=F0=9F=96=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboards/[dashboardId]/list-reports.tsx | 29 ++++- .../list-dashboards/list-dashboards.tsx | 12 +- .../event-conversions-list.tsx | 2 +- .../events/event-list/event-edit.tsx | 2 +- .../events/event-list/event-list.tsx | 2 +- .../events/event-list/event-listener.tsx | 2 +- .../events/event-list/setup-server.md | 41 +++++++ .../[projectId]/layout-menu.tsx | 4 +- .../[projectId]/layout-sidebar.tsx | 6 +- .../layout-sticky-below-header.tsx | 2 +- .../[projectId]/page-layout.tsx | 4 +- .../[profileId]/most-events/most-events.tsx | 2 +- .../popular-routes/popular-routes.tsx | 2 +- .../profile-activity/profile-activity.tsx | 4 +- .../profiles/profile-last-seen/index.tsx | 2 +- .../[projectId]/realtime/map/map.tsx | 16 ++- .../[projectId]/realtime/page.tsx | 2 +- .../realtime/realtime-live-histogram.tsx | 4 +- .../retention/last-active-users/chart.tsx | 2 +- .../retention/rolling-active-users/chart.tsx | 2 +- .../users-retention-series/chart.tsx | 2 +- .../retention/weekly-cohorts/index.tsx | 4 +- apps/dashboard/src/app/(auth)/layout.tsx | 4 +- .../dashboard/src/app/(onboarding)/layout.tsx | 6 +- .../[projectId]/connect/connect-app.tsx | 2 +- .../[projectId]/connect/connect-backend.tsx | 2 +- .../[projectId]/connect/connect-web.tsx | 2 +- .../connect/onboarding-connect.tsx | 2 +- .../verify/onboarding-verify-listener.tsx | 4 +- apps/dashboard/src/app/(onboarding)/steps.tsx | 14 +-- apps/dashboard/src/app/layout.tsx | 2 +- apps/dashboard/src/components/chart-ssr.tsx | 2 +- .../src/components/forms/checkbox-item.tsx | 2 +- .../src/components/full-page-empty-state.tsx | 2 +- .../src/components/full-width-navbar.tsx | 2 +- .../src/components/fullscreen-toggle.tsx | 2 +- .../overview/overview-live-histogram.tsx | 4 +- .../components/overview/overview-metrics.tsx | 2 +- .../components/profiles/profile-avatar.tsx | 2 +- .../src/components/projects/project-card.tsx | 6 +- .../components/report/chart/ChartLoading.tsx | 2 +- .../components/report/chart/MetricCard.tsx | 8 +- .../report/chart/ReportAreaChart.tsx | 2 +- .../report/chart/ReportBarChart.tsx | 2 +- .../report/chart/ReportChartTooltip.tsx | 2 +- .../report/chart/ReportHistogramChart.tsx | 2 +- .../report/chart/ReportLineChart.tsx | 2 +- .../components/report/funnel/Funnel.old.tsx | 4 +- .../src/components/report/funnel/Funnel.tsx | 4 +- .../report/sidebar/ReportBreakdowns.tsx | 2 +- .../report/sidebar/ReportEvents.tsx | 4 +- .../report/sidebar/filters/FilterItem.tsx | 2 +- .../sidebar/filters/FiltersCombobox.tsx | 2 +- .../report/sidebar/filters/FiltersList.tsx | 2 +- apps/dashboard/src/components/syntax.tsx | 2 +- .../src/components/ui/alert-dialog.tsx | 4 +- apps/dashboard/src/components/ui/alert.tsx | 2 +- apps/dashboard/src/components/ui/badge.tsx | 2 +- apps/dashboard/src/components/ui/button.tsx | 7 +- apps/dashboard/src/components/ui/dialog.tsx | 2 +- .../src/components/ui/gradient-background.tsx | 2 +- apps/dashboard/src/components/ui/input.tsx | 2 +- .../dashboard/src/components/ui/key-value.tsx | 2 +- apps/dashboard/src/components/ui/progress.tsx | 2 +- apps/dashboard/src/components/ui/sheet.tsx | 4 +- apps/dashboard/src/components/ui/sonner.tsx | 2 +- apps/dashboard/src/components/ui/switch.tsx | 4 +- apps/dashboard/src/components/ui/table.tsx | 2 +- apps/dashboard/src/components/ui/tabs.tsx | 2 +- apps/dashboard/src/components/ui/textarea.tsx | 18 ++- apps/dashboard/src/components/ui/toast.tsx | 4 +- apps/dashboard/src/components/ui/toaster.tsx | 2 +- .../dashboard/src/components/widget-table.tsx | 2 +- apps/dashboard/src/components/widget.tsx | 2 +- apps/dashboard/src/modals/Testimonial.tsx | 2 +- apps/dashboard/src/styles/globals.css | 114 ++++++++---------- apps/dashboard/tailwind.config.js | 20 ++- 77 files changed, 256 insertions(+), 199 deletions(-) create mode 100644 apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/setup-server.md diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx index 7f81ab95..7a874917 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/[dashboardId]/list-reports.tsx @@ -1,6 +1,7 @@ 'use client'; import { StickyBelowHeader } from '@/app/(app)/[organizationSlug]/[projectId]/layout-sticky-below-header'; +import { FullPageEmptyState } from '@/components/full-page-empty-state'; import { useOverviewOptions } from '@/components/overview/useOverviewOptions'; import { LazyChart } from '@/components/report/chart/LazyChart'; import { Button } from '@/components/ui/button'; @@ -14,7 +15,13 @@ import { import { useAppParams } from '@/hooks/useAppParams'; import { api, handleError } from '@/trpc/client'; import { cn } from '@/utils/cn'; -import { ChevronRight, MoreHorizontal, PlusIcon, Trash } from 'lucide-react'; +import { + ChevronRight, + LayoutPanelTopIcon, + MoreHorizontal, + PlusIcon, + Trash, +} from 'lucide-react'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; import { toast } from 'sonner'; @@ -138,6 +145,26 @@ export function ListReports({ reports }: ListReportsProps) { ); })} + {reports.length === 0 && ( + +

You can visualize your data with a report

+ +
+ )} ); diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/list-dashboards/list-dashboards.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/list-dashboards/list-dashboards.tsx index bf1f5ebd..999bd125 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/list-dashboards/list-dashboards.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/dashboards/list-dashboards/list-dashboards.tsx @@ -96,7 +96,7 @@ export function ListDashboards({ dashboards }: ListDashboardsProps) {
@@ -114,19 +114,19 @@ export function ListDashboards({ dashboards }: ListDashboardsProps) { return (
- -
+ +
{report.name}
); })} {item.reports.length > 6 && ( -
- +
+
{item.reports.length - 5} more
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-conversions-list/event-conversions-list.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-conversions-list/event-conversions-list.tsx index 161fa5fa..b31b365e 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-conversions-list/event-conversions-list.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-conversions-list/event-conversions-list.tsx @@ -28,7 +28,7 @@ export function EventConversionsList({ data }: EventListProps) { {showDateHeader(item.createdAt, list[index - 1]?.createdAt) && (
-
+
{item.createdAt.toLocaleDateString()}
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-edit.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-edit.tsx index decbb11b..d20ffe94 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-edit.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-edit.tsx @@ -106,7 +106,7 @@ export function EventEdit({ event, open, setOpen }: Props) { setIcon(name); }} className={cn( - 'inline-flex h-8 w-8 flex-shrink-0 cursor-pointer items-center justify-center rounded-md bg-slate-100 transition-all', + 'bg-def-200 inline-flex h-8 w-8 flex-shrink-0 cursor-pointer items-center justify-center rounded-md transition-all', name === selectedIcon ? 'scale-110 ring-1 ring-black' : '[&_svg]:opacity-50' diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-list.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-list.tsx index aeb3c7d0..40693ba1 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-list.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-list.tsx @@ -63,7 +63,7 @@ function EventList({ data, count }: EventListProps) {
{index === 0 ? :
}
-
+
{item.createdAt.toLocaleDateString()}
{index === 0 && ( diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-listener.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-listener.tsx index c0381dbc..a446403f 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-listener.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/events/event-list/event-listener.tsx @@ -38,7 +38,7 @@ export default function EventListener() { setCounter(0); router.refresh(); }} - className="flex h-8 items-center gap-2 rounded border border-border bg-background px-3 text-sm font-medium leading-none" + className="flex h-8 items-center gap-2 rounded border border-border bg-card px-3 text-sm font-medium leading-none" >
/dev/null +sudo apt-get update + +# Install Docker +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +# Verify +sudo docker run hello-world +``` + +## Install caprover + +`docker run -p 80:80 -p 443:443 -p 3000:3000 -e ACCEPTED_TERMS=true -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover` + +## Point domain to server + +`*.apps.example.com -> server ip` + +## Setup caprover + +caprover serversetup diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/layout-menu.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/layout-menu.tsx index beaa59c2..dfdbdf95 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/layout-menu.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/layout-menu.tsx @@ -42,8 +42,8 @@ function LinkWithIcon({ return (
-
-
+
+
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/page-layout.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/page-layout.tsx index 2b213119..15df48a2 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/page-layout.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/page-layout.tsx @@ -15,7 +15,7 @@ async function PageLayout({ title, organizationSlug }: PageLayoutProps) { return ( <> -
+
{title}
@@ -30,7 +30,7 @@ async function PageLayout({ title, organizationSlug }: PageLayoutProps) { const Loading = ({ title }: PageLayoutProps) => ( <> -
+
{title}
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/most-events/most-events.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/most-events/most-events.tsx index 674f7a3b..ffb6ebff 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/most-events/most-events.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/most-events/most-events.tsx @@ -18,7 +18,7 @@ const MostEvents = ({ data }: Props) => { {data.slice(0, 5).map((item) => (
{ {data.slice(0, 5).map((item) => (
{ key={date.toISOString()} className={cn( 'aspect-square w-full rounded', - hit ? 'bg-blue-600' : 'bg-slate-100' + hit ? 'bg-highlight' : 'bg-def-200' )} >
); @@ -94,7 +94,7 @@ const ProfileActivity = ({ data }: Props) => { key={date.toISOString()} className={cn( 'aspect-square w-full rounded', - hit ? 'bg-blue-600' : 'bg-slate-100' + hit ? 'bg-highlight' : 'bg-def-200' )} >
); diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/profile-last-seen/index.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/profile-last-seen/index.tsx index c23a9ab5..5887484f 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/profile-last-seen/index.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/profile-last-seen/index.tsx @@ -37,7 +37,7 @@ export default async function ProfileLastSeenServer({ projectId }: Props) {
{ return size * multiplier; }; + const theme = useTheme(); + console.log(theme.theme); + return (
{ )) @@ -149,13 +153,17 @@ const Map = ({ markers }: Props) => { - + diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/page.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/page.tsx index aab89132..3f3c3c2c 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/page.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/page.tsx @@ -29,7 +29,7 @@ export default function Page({
-
+
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/realtime-live-histogram.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/realtime-live-histogram.tsx index fec5593d..040736a7 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/realtime-live-histogram.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/realtime/realtime-live-histogram.tsx @@ -85,7 +85,7 @@ export function RealtimeLiveHistogram({ {staticArray.map((percent, i) => (
))} @@ -106,7 +106,7 @@ export function RealtimeLiveHistogram({
+
Days since last seen diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/rolling-active-users/chart.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/rolling-active-users/chart.tsx index a3bcb296..1cd88179 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/rolling-active-users/chart.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/rolling-active-users/chart.tsx @@ -29,7 +29,7 @@ function Tooltip(props: any) { return null; } return ( -
+
{payload.date}
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/users-retention-series/chart.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/users-retention-series/chart.tsx index e34a1067..b7001730 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/users-retention-series/chart.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/users-retention-series/chart.tsx @@ -33,7 +33,7 @@ function Tooltip({ payload }: any) { return null; } return ( -
+
{formatDate(new Date(date))}
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/weekly-cohorts/index.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/weekly-cohorts/index.tsx index 58c6e3fc..9c62032e 100644 --- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/weekly-cohorts/index.tsx +++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/retention/weekly-cohorts/index.tsx @@ -15,7 +15,7 @@ const Cell = ({ value, ratio }: { value: number; ratio: number }) => { className={cn('relative h-8 border', ratio !== 0 && 'border-background')} >
{value}
@@ -76,7 +76,7 @@ const WeeklyCohortsServer = async ({ projectId }: Props) => { {res.map((row) => ( - + {row.first_seen} { return ( <> -
+
-
+
{children}
diff --git a/apps/dashboard/src/app/(onboarding)/layout.tsx b/apps/dashboard/src/app/(onboarding)/layout.tsx index 749a3f11..a4108d55 100644 --- a/apps/dashboard/src/app/(onboarding)/layout.tsx +++ b/apps/dashboard/src/app/(onboarding)/layout.tsx @@ -12,15 +12,15 @@ const Page = ({ children }: Props) => { <>
-
+
-
+
-
+
Welcome to Openpanel diff --git a/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/connect/connect-app.tsx b/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/connect/connect-app.tsx index 3ad590e4..2e65020b 100644 --- a/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/connect/connect-app.tsx +++ b/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/connect/connect-app.tsx @@ -30,7 +30,7 @@ const ConnectApp = ({ client }: Props) => { className="flex items-center gap-4 rounded-md border p-2 py-2 text-left" key={framework.name} > -
+
{ className="flex items-center gap-4 rounded-md border p-2 py-2 text-left" key={framework.name} > -
+
{ className="flex items-center gap-4 rounded-md border p-2 py-2 text-left" key={framework.name} > -
+
{ } > -
+
Credentials diff --git a/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/verify/onboarding-verify-listener.tsx b/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/verify/onboarding-verify-listener.tsx index bd998616..0d69aaba 100644 --- a/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/verify/onboarding-verify-listener.tsx +++ b/apps/dashboard/src/app/(onboarding)/onboarding/[projectId]/verify/onboarding-verify-listener.tsx @@ -54,7 +54,7 @@ const VerifyListener = ({ client, events: _events, onVerified }: Props) => { } return ( - + ); }; @@ -70,7 +70,7 @@ const VerifyListener = ({ client, events: _events, onVerified }: Props) => {
{renderIcon()} diff --git a/apps/dashboard/src/app/(onboarding)/steps.tsx b/apps/dashboard/src/app/(onboarding)/steps.tsx index ec973cda..49209608 100644 --- a/apps/dashboard/src/app/(onboarding)/steps.tsx +++ b/apps/dashboard/src/app/(onboarding)/steps.tsx @@ -59,9 +59,9 @@ const Steps = ({ className }: Props) => { const currentIndex = steps.findIndex((i) => i.status === 'current'); return (
-
+
{ className={cn( 'flex flex-shrink-0 items-center gap-2 self-start px-3 py-1.5', step.status === 'current' && - 'rounded-xl border border-border bg-background', + 'rounded-xl border border-border bg-card', step.status === 'completed' && index !== currentIndex - 1 && 'max-md:hidden' @@ -87,18 +87,16 @@ const Steps = ({ className }: Props) => {
{step.status === 'current' && ( -
+
)}
{step.status === 'completed' && } diff --git a/apps/dashboard/src/app/layout.tsx b/apps/dashboard/src/app/layout.tsx index 8f3ff0ec..71563cc6 100644 --- a/apps/dashboard/src/app/layout.tsx +++ b/apps/dashboard/src/app/layout.tsx @@ -25,7 +25,7 @@ export default function RootLayout({ return ( (