π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix(nc-gui): dont show onboarding flow for public route
Ramesh Mane47e49166afbf
diff --git a/packages/nc-gui/composables/useOnboardingFlow.ts b/packages/nc-gui/composables/useOnboardingFlow.tsindex 07bf6e3a38..a57f957880 100644--- a/packages/nc-gui/composables/useOnboardingFlow.ts+++ b/packages/nc-gui/composables/useOnboardingFlow.ts@@ -116,7 +116,8 @@ export const useOnboardingFlow = createSharedComposable(() => {!isSharedBase.value &&!isSharedErd.value &&!isSharedViewRoute(route.value) &&- !isSharedFormViewRoute(route.value)+ !isSharedFormViewRoute(route.value) &&+ !isPublicRoute(route.value))})diff --git a/packages/nc-gui/utils/routeUtils.ts b/packages/nc-gui/utils/routeUtils.tsindex 08d16d5e4e..686b1e7a0f 100644--- a/packages/nc-gui/utils/routeUtils.ts+++ b/packages/nc-gui/utils/routeUtils.ts@@ -8,13 +8,7 @@ import { type RouteLocationNormalizedLoadedGeneric } from 'vue-router'export const isSharedViewRoute = (route: RouteLocationNormalizedLoadedGeneric) => {if (!route) return false- const routeName = (route.name as string) || ''-- // check route is not base page by route name- return (- !routeName.startsWith('index-typeOrId-baseId-') &&- !['index', 'index-typeOrId', 'index-typeOrId-feed', 'index-typeOrId-integrations'].includes(routeName)- )+ return route.meta.layout === 'shared-view'}/**@@ -30,3 +24,14 @@ export const isSharedFormViewRoute = (route: RouteLocationNormalizedLoadedGeneri// check route is shared form view routereturn routeName.startsWith('index-typeOrId-form-viewId')}++/**+ * Check if the route is a public route+ * @param route - The route to check+ * @returns true if the route is a public route, false otherwise+ */+export const isPublicRoute = (route: RouteLocationNormalizedLoadedGeneric) => {+ if (!route) return false++ return route.meta?.public+}