π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
feat(nc-gui): add onboarding flow page setup
Ramesh Maned35984e31796
diff --git a/packages/nc-gui/assets/nc-icons-v2/graduation-cap.svg b/packages/nc-gui/assets/nc-icons-v2/graduation-cap.svgnew file mode 100644index 0000000000..91914ddaa2--- /dev/null+++ b/packages/nc-gui/assets/nc-icons-v2/graduation-cap.svg@@ -0,0 +1,7 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">+ <path d="M15 6L8 3L1 6" stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>+ <path d="M15 6L8 9L1 6" stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>+ <path d="M3 7.33398V10.6673C3 11.774 4.66667 12.6673 8 12.6673C11.3333 12.6673 13 11.774 13 10.6673V7.33398" stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>+ <path d="M14.3333 6H9" stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>+ <path d="M15 6V9" stroke="currentColor" stroke-width="1.33" stroke-linecap="round"/>+</svg>\ No newline at end of filediff --git a/packages/nc-gui/components/nc/NuxtLoadingIndicator.vue b/packages/nc-gui/components/nc/NuxtLoadingIndicator.vueindex 047b4e4650..f3a44b284d 100644--- a/packages/nc-gui/components/nc/NuxtLoadingIndicator.vue+++ b/packages/nc-gui/components/nc/NuxtLoadingIndicator.vue@@ -5,6 +5,14 @@ const router = useRouter()const route = router.currentRoute+const { showOnboardingFlow } = useOnboardingFlow()++const stopLoadingIndicator = () => {+ forcedNextTick(() => {+ nuxtLoadingIndicatorRef.value?.finish()+ })+}+/*** Manually call `finish()` on NuxtLoadingIndicator when `[...slugs]` route param is active.*@@ -23,15 +31,19 @@ const route = router.currentRoute* Reference path: packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]]/[...slugs].vue*/watch(- [() => route.value.params.viewTitle, () => route.value.params.slugs, () => route.value.query],- async ([viewTitle, slugs]) => {+ [() => route.value.params.viewTitle, () => route.value.params.slugs, () => route.value.query, () => showOnboardingFlow.value],+ async ([viewTitle, slugs, _query, newShowOnboardingFlow]) => {+ if (newShowOnboardingFlow) {+ stopLoadingIndicator()++ return+ }+if (!viewTitle && ncIsUndefined(slugs) && route.value.name !== 'account-index-setup-nestedPage-app') returnawait until(() => !!nuxtLoadingIndicatorRef.value).toBeTruthy()- forcedNextTick(() => {- nuxtLoadingIndicatorRef.value?.finish()- })+ stopLoadingIndicator()},{immediate: true,diff --git a/packages/nc-gui/utils/cssUtils.ts b/packages/nc-gui/utils/cssUtils.tsnew file mode 100644index 0000000000..b60432c7ec--- /dev/null+++ b/packages/nc-gui/utils/cssUtils.ts@@ -0,0 +1,22 @@+export const onboardingFlowColoursMapping = {+ brand: {+ lightBg: 'bg-nc-bg-brand',+ content: 'text-nc-content-brand',+ },+ orange: {+ lightBg: 'bg-nc-bg-orange-light',+ content: 'text-nc-content-orange-dark',+ },+ green: {+ lightBg: 'bg-nc-bg-green-light',+ content: 'text-nc-content-green-dark',+ },+ purple: {+ lightBg: 'bg-nc-bg-purple-light',+ content: 'text-nc-content-purple-dark',+ },+ pink: {+ lightBg: 'bg-nc-bg-pink-light',+ content: 'text-nc-content-pink-dark',+ },+}diff --git a/packages/nc-gui/windi.config.ts b/packages/nc-gui/windi.config.tsindex cd859c26be..0c661db905 100644--- a/packages/nc-gui/windi.config.ts+++ b/packages/nc-gui/windi.config.ts@@ -32,6 +32,7 @@ export default defineConfig({'../composables/useColumnFilteredOrSorted.ts','../components/smartsheet/grid/canvas/cells/*.ts','../components/smartsheet/grid/canvas/cells/**/*.ts',+ '../utils/cssUtils.ts',]: ['**/*.{vue,html,jsx,tsx,css,scss}',@@ -39,6 +40,7 @@ export default defineConfig({'composables/useColumnFilteredOrSorted.ts','components/smartsheet/grid/canvas/cells/*.ts','components/smartsheet/grid/canvas/cells/**/*.ts',+ 'utils/cssUtils.ts',]),],exclude: ['node_modules', '.git'],