From cf904665b2916e631c29f3187d6afe5169a7db89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Tymczuk?= Date: Tue, 12 Nov 2024 22:57:28 +0100 Subject: [PATCH] feat(dashboard): page meta, gtm, and uptime (#6974) --- apps/dashboard/.env.example | 4 +- apps/dashboard/index.html | 40 +++- apps/dashboard/package.json | 1 + apps/dashboard/public/favicon-gradient.png | Bin 0 -> 1355 bytes apps/dashboard/public/favicon-gradient.svg | 9 + apps/dashboard/public/favicon.ico | Bin 0 -> 4150 bytes apps/dashboard/public/favicon.svg | 13 ++ apps/dashboard/public/manifest.json | 15 ++ .../workflow-editor/configure-workflow.tsx | 218 +++++++++--------- .../workflow-editor/steps/configure-step.tsx | 124 +++++----- .../steps/edit-step-sidebar.tsx | 88 +++---- apps/dashboard/src/pages/test-workflow.tsx | 16 +- apps/dashboard/src/pages/workflows.tsx | 30 +-- apps/dashboard/vite.config.ts | 5 + pnpm-lock.yaml | 92 +++----- 15 files changed, 371 insertions(+), 284 deletions(-) create mode 100644 apps/dashboard/public/favicon-gradient.png create mode 100644 apps/dashboard/public/favicon-gradient.svg create mode 100644 apps/dashboard/public/favicon.ico create mode 100644 apps/dashboard/public/favicon.svg create mode 100644 apps/dashboard/public/manifest.json diff --git a/apps/dashboard/.env.example b/apps/dashboard/.env.example index 1a6a9245426..e9a72bea139 100644 --- a/apps/dashboard/.env.example +++ b/apps/dashboard/.env.example @@ -4,4 +4,6 @@ VITE_HUBSPOT_EMBED= VITE_API_HOSTNAME=http://localhost:3000 VITE_CLERK_PUBLISHABLE_KEY= VITE_NOVU_APP_ID= -VITE_INTERCOM_APP_ID= \ No newline at end of file +VITE_INTERCOM_APP_ID= +VITE_GTM= +VITE_SELF_HOSTED= diff --git a/apps/dashboard/index.html b/apps/dashboard/index.html index ad12aa9051a..40a53d82106 100644 --- a/apps/dashboard/index.html +++ b/apps/dashboard/index.html @@ -2,9 +2,13 @@ - - Vite + React + TS + Novu Cloud Dashboard + + + + + + <% if (env.VITE_GTM) { %> + + <% } %> + <% if (env.VITE_GTM) { %> + + <% } %> <% if (env.VITE_SELF_HOSTED === 'false' ) { %> + + <% } %> +
diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 16c52fa790e..07a3df96498 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -108,6 +108,7 @@ "typescript": "5.6.2", "typescript-eslint": "^8.0.1", "vite": "^5.4.1", + "vite-plugin-ejs": "^1.7.0", "vite-plugin-static-copy": "^1.0.6" }, "peerDependencies": { diff --git a/apps/dashboard/public/favicon-gradient.png b/apps/dashboard/public/favicon-gradient.png new file mode 100644 index 0000000000000000000000000000000000000000..f37eae30db1f98685c521c85aca0b7996d54346b GIT binary patch literal 1355 zcmah{SyU5O7{1Ab9V&=LN+1oZf|LM3;3oMFu5Fr8vPJzZbL{5rREicYH@@V zxd_qv5ZYgPb2d2|A!23{J2h6#YSvcd8avp)R7PG=MPJrdXK!WHXe)D+w4T>p@x~60 zwkpTimZ+`CGPWkIkcZXmCW9bN<~*umw7+zil)DcvTR)Ohh8Br)i-ft&)Ve>=!diIm zB9h8I?rbCqHq&b5RMD&0R&`v9I<9pqvr1Ezr>n^V6XV6i*PU$WZoXCY&W+^8jg)$A zd7eR#ZiZel+Cd0KsO;8FD&WJkPzRrXlK=9*p*(7;n@s>Rwj`U)72X4@!Pfv)9q%v` zG-nGnW%>HXlV-vSd1Mtg5!MsWgM6pB2;|^zyp#Y0ne&*!YXCA)(K}3p)cPG>i6ZE_ zwk&@)jWLC%Xq_XFd-p4&x?v-`oH|Wu{*uMxWjisXq@aovzPA9~Ot0O}uF&yMLqrgo zY~Ou_=YYcNHb9^)tt85*o^{RzC@zs^&17YCx9V6IG=Y7)9AJYG7c|=86+?zAZX>e2W82x~U81dkZ>bkd6>*gd13IjF%N=vb5hoi30hVF_sc2EAd&-(s5CFut_2X7I6i z9#yrjZ3xroJc$I$DTyV4=xx}>Yu2l2&nyo7xwSOjz?>o-HtG%iGy!XZgzIzx1PV(x ziiK+inR>$rF_J{r8wNvdFh7yZu+1T21!VVnn3#|s9~Xl;*|XK~VN=P>s6oiZ*Yprr zTptw_t@tcXtkp}5;$%e?7S`K=hRlj#q`Lk}a3m;=$OrlQ5e^*m4>)u?eCmC(%Ngb9qH&RW-MUzt6r_;*aX;-)=bP(s*7<7Yi;t`JoAY+PuHzX{+nS zHYxW~d&iSb)OGot?jPrST(5j4?G=Ci>?#s|;dbq(FXykje$^-aT6}|yghKake!h8Y zzTfrsfHcBGgeXGF;4ec9cjkxRrH*|2ohQODA?5D9`=bS8<6aLQdi%(J<0VORtQH|T zUw-T + + + + + + + + diff --git a/apps/dashboard/public/favicon.ico b/apps/dashboard/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d6cf25bc47561e68387f3dc7847d999f6de844c9 GIT binary patch literal 4150 zcmeH`F;2uV5JjJH;ReZD(m55Pap?B5i8J?p0rTNfI>Ev0X&)sN#eOyN!v@rrkzz7%tBVYuK zfDtePM&SPvkSZc$5Ftt>X}Ye`r^*tmn?m&^>_hhZIQljXuI+Gbk4sC~r70d#NhRj) l%MXt;EHiGJ@ns%DJ`Qm_j%kpwLvoLl1(_#AiYB}D-ya73R^b2u literal 0 HcmV?d00001 diff --git a/apps/dashboard/public/favicon.svg b/apps/dashboard/public/favicon.svg new file mode 100644 index 00000000000..61d140fc4ea --- /dev/null +++ b/apps/dashboard/public/favicon.svg @@ -0,0 +1,13 @@ + + + + diff --git a/apps/dashboard/public/manifest.json b/apps/dashboard/public/manifest.json new file mode 100644 index 00000000000..995133e59fb --- /dev/null +++ b/apps/dashboard/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "Novu Dashboard", + "name": "Novu Dashboard application", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/apps/dashboard/src/components/workflow-editor/configure-workflow.tsx b/apps/dashboard/src/components/workflow-editor/configure-workflow.tsx index a3b3754464a..860e57cf4cf 100644 --- a/apps/dashboard/src/components/workflow-editor/configure-workflow.tsx +++ b/apps/dashboard/src/components/workflow-editor/configure-workflow.tsx @@ -16,124 +16,130 @@ import { Switch } from '../primitives/switch'; import { useWorkflowEditorContext } from '@/components/workflow-editor/hooks'; import { cn } from '@/utils/ui'; import { SidebarContent, SidebarHeader } from '@/components/side-navigation/Sidebar'; +import { PageMeta } from '../page-meta'; export function ConfigureWorkflow() { const tagsQuery = useTagsQuery(); const { isReadOnly } = useWorkflowEditorContext(); - const { control } = useFormContext>(); + const { control, watch } = useFormContext>(); + const workflowName = watch('name'); + return ( - - -
- - Configure workflow -
-
- - - ( - -
-
- Active Workflow -
- - - - - )} - /> - - - - ( - - Workflow Name - - - - - - - - )} - /> - ( - - Workflow Identifier - - - - + + + +
+ + Configure workflow +
+
+ + + ( + +
+
- - - - - )} - /> - ( - - Description - -