π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
feat: use readable slug for scripts and dashboards as well
Ramesh Mane3001df65685d
diff --git a/packages/nc-gui/composables/useGlobal/actions.ts b/packages/nc-gui/composables/useGlobal/actions.tsindex a45aa5f821..f73ecf2b63 100644--- a/packages/nc-gui/composables/useGlobal/actions.ts+++ b/packages/nc-gui/composables/useGlobal/actions.ts@@ -141,7 +141,9 @@ export function useGlobalActions(state: State, _getters: Getters): Actions {baseId,query,tableId,+ tableTitle,viewId,+ viewTitle,replace = false,newTab = false,}: {@@ -149,11 +151,20 @@ export function useGlobalActions(state: State, _getters: Getters): Actions {baseId?: stringquery?: anytableId?: string+ tableTitle?: stringviewId?: string+ viewTitle?: stringreplace?: booleannewTab?: boolean}) => {- const tablePath = tableId ? `/${tableId}${viewId ? `/${viewId}` : ''}` : ''+ const tablePath = tableId+ ? `/${tableId}${+ viewId+ ? `/${viewId}${toReadableUrlSlug([tableTitle, viewTitle]) ? `/${toReadableUrlSlug([tableTitle, viewTitle])}` : ''}`+ : ''+ }`+ : ''+const workspaceId = _workspaceId || 'nc'let path: stringdiff --git a/packages/nc-gui/composables/useGlobal/types.ts b/packages/nc-gui/composables/useGlobal/types.tsindex 00b22ffa0f..56a25a6586 100644--- a/packages/nc-gui/composables/useGlobal/types.ts+++ b/packages/nc-gui/composables/useGlobal/types.ts@@ -107,15 +107,22 @@ export interface Actions {loadAppInfo: () => voidsetIsMobileMode: (isMobileMode: boolean) => voidnavigateToProject: (params: { workspaceId?: string; baseId?: string; query?: any }) => void+ /**+ * params `tableTitle, viewTitle, automationTitle,dashboardTitle` will be used for readable url slug+ */ncNavigateTo: (params: {workspaceId?: stringbaseId?: stringquery?: anytableId?: string+ tableTitle?: stringviewId?: string+ viewTitle?: stringautomationId?: string+ automationTitle?: stringreplace?: booleandashboardId?: string+ dashboardTitle?: stringnewTab?: boolean}) => voidgetBaseUrl: (workspaceId: string) => string | undefined