π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: base users page
mertmitea39b901b913
diff --git a/packages/nc-gui/components/project/AccessSettings.vue b/packages/nc-gui/components/project/AccessSettings.vueindex cdffddf70a..693aa4917c 100644--- a/packages/nc-gui/components/project/AccessSettings.vue+++ b/packages/nc-gui/components/project/AccessSettings.vue@@ -25,7 +25,7 @@ const { orgId, org } = storeToRefs(orgStore)const isAdminPanel = inject(IsAdminPanelInj, ref(false))-const { $api } = useNuxtApp()+const { $api, $eventBus } = useNuxtApp()const { t } = useI18n()@@ -304,6 +304,23 @@ watch(projectPageTab, () => {userSearchText.value = ''})++const evtListener = (event: string, data: any) => {+ const { baseId } = data++ if (baseId !== currentBase.value?.id) return+ // Handle the event+ loadCollaborators()+}++onMounted(() => {+ loadSorts()+ $eventBus.realtimeEventBus.on(evtListener)+})++onBeforeUnmount(() => {+ $eventBus.realtimeEventBus.off(evtListener)+})</script><template>diff --git a/packages/nc-gui/lib/enums.ts b/packages/nc-gui/lib/enums.tsindex 0e029a71db..c35b5a947b 100644--- a/packages/nc-gui/lib/enums.ts+++ b/packages/nc-gui/lib/enums.ts@@ -202,4 +202,5 @@ export enum WorkspaceIconType {export const EventBusEnum = {SmartsheetStore: Symbol('SmartsheetStore'),+ Realtime: Symbol('Realtime'),}diff --git a/packages/nc-gui/nuxt-shim.d.ts b/packages/nc-gui/nuxt-shim.d.tsindex ac288ea034..b4e3a96c6f 100644--- a/packages/nc-gui/nuxt-shim.d.ts+++ b/packages/nc-gui/nuxt-shim.d.ts@@ -42,6 +42,7 @@ declare module '#app' {}$eventBus: {smartsheetStoreEventBus: UseEventBusReturn<string, any>+ realtimeEventBus: UseEventBusReturn<string, any>}}}diff --git a/packages/nc-gui/plugins/event-bus.ts b/packages/nc-gui/plugins/event-bus.tsindex 7282529fc4..a8a6447b96 100644--- a/packages/nc-gui/plugins/event-bus.ts+++ b/packages/nc-gui/plugins/event-bus.ts@@ -1,6 +1,8 @@export default defineNuxtPlugin(function (nuxtApp) {const smartsheetStoreEventBus = useEventBus<SmartsheetStoreEvents>(EventBusEnum.SmartsheetStore)+ const realtimeEventBus = useEventBus<SmartsheetStoreEvents>(EventBusEnum.Realtime)nuxtApp.provide('eventBus', {smartsheetStoreEventBus,+ realtimeEventBus,})})