From a31d6cc141eba123b9450027d9be4d86ef4d6a43 Mon Sep 17 00:00:00 2001 From: Suhail Kakar Date: Fri, 12 Jul 2024 18:09:04 +0530 Subject: [PATCH 1/5] ui: reskin dashboard colors --- packages/www/components.json | 2 +- .../www/components/ApiKeys/CreateDialog.tsx | 5 ++- .../AssetDetails/AssetChildrenHeadingBox.tsx | 4 +- .../AssetDetails/AssetOverviewTab.tsx | 7 +++- .../AssetsTable/CreateAssetDialog/index.tsx | 2 + .../www/components/FeaturesModel/index.tsx | 2 +- packages/www/components/FileUpload/index.tsx | 3 +- .../www/components/GettingStarted/index.tsx | 19 ++++++--- packages/www/components/Header/index.tsx | 1 - packages/www/components/Logger/index.tsx | 2 +- .../components/PaymentMethodDialog/index.tsx | 2 +- .../www/components/Project/ProjectTile.tsx | 18 +++++---- .../Project/createProjectDialog.tsx | 5 ++- .../Project/deleteProjectDialog.tsx | 2 +- packages/www/components/Sidebar/index.tsx | 36 ++++++----------- .../SigningKeysTable/CreateDialog.tsx | 3 +- .../SigningKeysTable/CreateKeyDialog.tsx | 3 +- .../SigningKeysTable/DeleteKeysDialog.tsx | 2 +- .../MultistreamTargetsTable/Toolbox.tsx | 4 +- .../StreamChildrenHeadingBox.tsx | 8 +++- .../StreamDetails/StreamPlayerBox/index.tsx | 15 ++++--- .../components/StreamDetails/Terminate.tsx | 2 +- .../StreamSessionsTable/DeleteDialog.tsx | 2 +- .../StreamsTable/CreateStreamDialog.tsx | 9 ++++- .../components/StreamsTable/StreamFilter.tsx | 11 ++--- .../Table/components/TableEmptyState.tsx | 1 + .../components/TableStateDeleteDialog.tsx | 2 +- .../www/components/Table/filters/index.tsx | 20 ++++++---- packages/www/components/Table/index.tsx | 3 +- .../www/components/TypeFilterCard/index.tsx | 12 +++--- .../WebhookDialogs/CreateEditDialog.tsx | 4 +- .../WebhookDialogs/DeleteDialog.tsx | 2 +- packages/www/css/tailwind.css | 40 +++++++++++++------ packages/www/layouts/dashboard.tsx | 5 +-- packages/www/package.json | 1 + .../pages/projects/[projectId]/settings.tsx | 3 +- packages/www/pages/settings/projects.tsx | 1 + packages/www/tailwind.config.js | 13 +++--- yarn.lock | 17 +++++--- 39 files changed, 176 insertions(+), 117 deletions(-) diff --git a/packages/www/components.json b/packages/www/components.json index 29baf27e29..b5f29f83ff 100644 --- a/packages/www/components.json +++ b/packages/www/components.json @@ -12,6 +12,6 @@ }, "aliases": { "components": "components", - "utils": "lib" + "utils": "lib/cn" } } diff --git a/packages/www/components/ApiKeys/CreateDialog.tsx b/packages/www/components/ApiKeys/CreateDialog.tsx index 949da2f91c..e8d848740c 100644 --- a/packages/www/components/ApiKeys/CreateDialog.tsx +++ b/packages/www/components/ApiKeys/CreateDialog.tsx @@ -116,7 +116,9 @@ const CreateDialog = ({ return ( - + {!newToken && ( <> @@ -332,6 +334,7 @@ const CreateDialog = ({ size="2" disabled={creating} type="submit" + className="bg-accent text-foreground" variant="primary"> {creating && ( - @@ -169,7 +173,8 @@ curl --request POST \ gap: "$5", gridTemplateColumns: "repeat(auto-fill, minmax(46%, 1fr))", }}> - - + { return ( - - + ); }; diff --git a/packages/www/components/Header/index.tsx b/packages/www/components/Header/index.tsx index 41dcfcb913..beee25b5c9 100644 --- a/packages/www/components/Header/index.tsx +++ b/packages/www/components/Header/index.tsx @@ -93,7 +93,6 @@ const Header = ({ breadcrumbs = [] }) => { height: 60, width: "100%", margin: "0 auto", - maxWidth: "1520px", }}> {breadcrumbs.map((breadcrumb, i) => { diff --git a/packages/www/components/Logger/index.tsx b/packages/www/components/Logger/index.tsx index 000fc4f930..788bf7d507 100644 --- a/packages/www/components/Logger/index.tsx +++ b/packages/www/components/Logger/index.tsx @@ -182,10 +182,10 @@ const Logger = ({ stream, ...props }: { stream: Stream }) => { diff --git a/packages/www/components/PaymentMethodDialog/index.tsx b/packages/www/components/PaymentMethodDialog/index.tsx index 8a8b4c1429..62076737a9 100644 --- a/packages/www/components/PaymentMethodDialog/index.tsx +++ b/packages/www/components/PaymentMethodDialog/index.tsx @@ -127,7 +127,7 @@ const PaymentMethodDialog = ({ invalidateQuery }) => { - + - + - {item.title} + {item.title} ))} @@ -96,7 +98,9 @@ function ProjectTile({ name, id, invalidateQuery }) { - diff --git a/packages/www/components/Project/createProjectDialog.tsx b/packages/www/components/Project/createProjectDialog.tsx index a7be55692e..da42422130 100644 --- a/packages/www/components/Project/createProjectDialog.tsx +++ b/packages/www/components/Project/createProjectDialog.tsx @@ -28,7 +28,9 @@ const CreateProjectDialog = ({ return ( - + Create Project @@ -82,6 +84,7 @@ const CreateProjectDialog = ({ type="submit" size="2" disabled={creating} + className="bg-accent text-foreground" variant="primary"> {creating && ( - + Delete Project diff --git a/packages/www/components/Sidebar/index.tsx b/packages/www/components/Sidebar/index.tsx index 79f6eddeb1..b6592edd66 100644 --- a/packages/www/components/Sidebar/index.tsx +++ b/packages/www/components/Sidebar/index.tsx @@ -56,14 +56,14 @@ export const NavLink = styled(A, { gap: "$2", textDecoration: "none", "&:hover": { - bc: "$neutral4", + bc: "hsl(var(--accent))", textDecoration: "none", }, "&:focus": { outline: "none", }, variants: { - active: { true: { bc: "$neutral4" } }, + active: { true: { bc: "hsl(var(--accent))" } }, }, }); @@ -232,7 +232,7 @@ const Sidebar = ({ id }: { id: SidebarId }) => { const response = canSendEmail("resetPassword"); if (!response.canSend) { openSnackbar( - `Please wait ${response.waitTime} seconds before sending another email.`, + `Please wait ${response.waitTime} seconds before sending another email.` ); return; } @@ -245,30 +245,18 @@ const Sidebar = ({ id }: { id: SidebarId }) => { return ( <> - + @@ -297,9 +285,9 @@ const Sidebar = ({ id }: { id: SidebarId }) => { { { outline: "none", }, "&:hover": { - backgroundColor: "$neutral4", borderRadius: "$3", }, }}> @@ -445,13 +433,13 @@ const Sidebar = ({ id }: { id: SidebarId }) => { Projects @@ -598,7 +586,7 @@ const Sidebar = ({ id }: { id: SidebarId }) => { )} - ), + ) )} - + {!newKey && ( <> @@ -98,6 +98,7 @@ const CreateDialog = ({ size="2" disabled={isLoading} type="submit" + className="bg-accent text-foreground" variant="primary"> {isLoading && ( - + {!newKey && ( <> @@ -100,6 +100,7 @@ const CreateKeyDialog = ({ size="2" disabled={isLoading} type="submit" + className="bg-accent text-foreground" variant="primary"> {isLoading && ( - + Delete {state.selectedRows.length} signing key diff --git a/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx b/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx index 1159d37256..d4650483ee 100644 --- a/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx +++ b/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx @@ -39,7 +39,7 @@ const DisableDialog = ({ const [saving, setSaving] = useState(false); return ( setOpen(!open)}> - + Disable multistream target? @@ -104,7 +104,7 @@ const DeleteDialog = ({ return ( - + Delete multistream target? diff --git a/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx b/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx index 621552c7b1..351de5486d 100644 --- a/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx +++ b/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx @@ -79,12 +79,16 @@ const StreamChildrenHeadingBox = ({ - - + @@ -128,7 +129,9 @@ const StreamPlayerBox = ({ + - + Delete {total} session{total > 1 && "s"}? diff --git a/packages/www/components/StreamsTable/CreateStreamDialog.tsx b/packages/www/components/StreamsTable/CreateStreamDialog.tsx index b51b854cc7..072fc44bf9 100644 --- a/packages/www/components/StreamsTable/CreateStreamDialog.tsx +++ b/packages/www/components/StreamsTable/CreateStreamDialog.tsx @@ -28,8 +28,12 @@ const CreateStreamDialog = ({ const [streamName, setStreamName] = useState(""); return ( - - + + Create a new livestream @@ -85,6 +89,7 @@ const CreateStreamDialog = ({ - + - Filters - diff --git a/packages/www/components/Table/index.tsx b/packages/www/components/Table/index.tsx index a1174b5490..20e7f13c10 100644 --- a/packages/www/components/Table/index.tsx +++ b/packages/www/components/Table/index.tsx @@ -311,8 +311,6 @@ export const DataTableComponent = >({ justify="between" css={{ mb: "$3", - borderBottom: "1px solid", - borderColor: border ? "$neutral5" : "transparent", pb: border ? "$2" : 0, }}> {/* Header title */} @@ -374,6 +372,7 @@ export const DataTableComponent = >({ )} {createAction && ( @@ -174,7 +171,7 @@ curl --request POST \ gridTemplateColumns: "repeat(auto-fill, minmax(46%, 1fr))", }}>
- + - + - {item.title} + + {item.title} + ))} @@ -98,9 +100,7 @@ function ProjectTile({ name, id, invalidateQuery }) { - diff --git a/packages/www/components/Project/createProjectDialog.tsx b/packages/www/components/Project/createProjectDialog.tsx index da42422130..7fb7cfd153 100644 --- a/packages/www/components/Project/createProjectDialog.tsx +++ b/packages/www/components/Project/createProjectDialog.tsx @@ -29,8 +29,8 @@ const CreateProjectDialog = ({ return ( + className="bg-surface" + css={{ maxWidth: 450, px: "$5", pt: "$4", pb: "$4" }}> Create Project diff --git a/packages/www/components/Project/deleteProjectDialog.tsx b/packages/www/components/Project/deleteProjectDialog.tsx index 57f63d030d..815e7c5a0a 100644 --- a/packages/www/components/Project/deleteProjectDialog.tsx +++ b/packages/www/components/Project/deleteProjectDialog.tsx @@ -40,7 +40,9 @@ const DeleteProjectDialog = ({ return ( - + Delete Project diff --git a/packages/www/components/Sidebar/index.tsx b/packages/www/components/Sidebar/index.tsx index b6592edd66..1d495cbb21 100644 --- a/packages/www/components/Sidebar/index.tsx +++ b/packages/www/components/Sidebar/index.tsx @@ -232,7 +232,7 @@ const Sidebar = ({ id }: { id: SidebarId }) => { const response = canSendEmail("resetPassword"); if (!response.canSend) { openSnackbar( - `Please wait ${response.waitTime} seconds before sending another email.` + `Please wait ${response.waitTime} seconds before sending another email.`, ); return; } @@ -586,7 +586,7 @@ const Sidebar = ({ id }: { id: SidebarId }) => { )} - ) + ), )} - + {!newKey && ( <> @@ -98,7 +100,7 @@ const CreateDialog = ({ size="2" disabled={isLoading} type="submit" - className="bg-accent text-foreground" + className="bg-accent text-foreground" variant="primary"> {isLoading && ( - + {!newKey && ( <> @@ -100,7 +102,7 @@ const CreateKeyDialog = ({ size="2" disabled={isLoading} type="submit" - className="bg-accent text-foreground" + className="bg-accent text-foreground" variant="primary"> {isLoading && ( - + Delete {state.selectedRows.length} signing key diff --git a/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx b/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx index d4650483ee..d9e47dfe6d 100644 --- a/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx +++ b/packages/www/components/StreamDetails/MultistreamTargetsTable/Toolbox.tsx @@ -39,7 +39,9 @@ const DisableDialog = ({ const [saving, setSaving] = useState(false); return ( setOpen(!open)}> - + Disable multistream target? @@ -104,7 +106,9 @@ const DeleteDialog = ({ return ( - + Delete multistream target? diff --git a/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx b/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx index 351de5486d..75256f5de6 100644 --- a/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx +++ b/packages/www/components/StreamDetails/StreamChildrenHeadingBox.tsx @@ -79,16 +79,18 @@ const StreamChildrenHeadingBox = ({ - + className="bg-accent mt-2" + placeholder="dropdown-menu-content" + align="end"> + - + Delete {total} session{total > 1 && "s"}? diff --git a/packages/www/components/StreamsTable/CreateStreamDialog.tsx b/packages/www/components/StreamsTable/CreateStreamDialog.tsx index 072fc44bf9..fa14576cd1 100644 --- a/packages/www/components/StreamsTable/CreateStreamDialog.tsx +++ b/packages/www/components/StreamsTable/CreateStreamDialog.tsx @@ -28,12 +28,10 @@ const CreateStreamDialog = ({ const [streamName, setStreamName] = useState(""); return ( - - + + Create a new livestream diff --git a/packages/www/components/StreamsTable/StreamFilter.tsx b/packages/www/components/StreamsTable/StreamFilter.tsx index a6416f63b4..96afd825ff 100644 --- a/packages/www/components/StreamsTable/StreamFilter.tsx +++ b/packages/www/components/StreamsTable/StreamFilter.tsx @@ -286,7 +286,7 @@ const StreamFilter = ({ onDone, activeFilters }) => { : value)} { mt: "$2", }}> - + { boxShadow: "0px 5px 15px -5px hsl(206deg 22% 7% / 15%)", }}> - Filters diff --git a/packages/www/components/Table/index.tsx b/packages/www/components/Table/index.tsx index 20e7f13c10..ecb119e7e9 100644 --- a/packages/www/components/Table/index.tsx +++ b/packages/www/components/Table/index.tsx @@ -372,7 +372,7 @@ export const DataTableComponent = >({ )} {createAction && (