diff --git a/packages/nc-gui-v2/components.d.ts b/packages/nc-gui-v2/components.d.ts index 465c71af0f..2c8304ace6 100644 --- a/packages/nc-gui-v2/components.d.ts +++ b/packages/nc-gui-v2/components.d.ts @@ -93,6 +93,7 @@ declare module '@vue/runtime-core' { MdiArrowExpand: typeof import('~icons/mdi/arrow-expand')['default'] MdiArrowLeftBold: typeof import('~icons/mdi/arrow-left-bold')['default'] MdiAt: typeof import('~icons/mdi/at')['default'] + MdiBugOutline: typeof import('~icons/mdi/bug-outline')['default'] MdiCalculator: typeof import('~icons/mdi/calculator')['default'] MdiCalendarMonth: typeof import('~icons/mdi/calendar-month')['default'] MdiCardsHeart: typeof import('~icons/mdi/cards-heart')['default'] @@ -151,6 +152,8 @@ declare module '@vue/runtime-core' { MdiPlusOutline: typeof import('~icons/mdi/plus-outline')['default'] MdiRefresh: typeof import('~icons/mdi/refresh')['default'] MdiReload: typeof import('~icons/mdi/reload')['default'] + MdiRocketLaunchOutline: typeof import('~icons/mdi/rocket-launch-outline')['default'] + MdiScriptTextOutline: typeof import('~icons/mdi/script-text-outline')['default'] MdiSearch: typeof import('~icons/mdi/search')['default'] MdiSlack: typeof import('~icons/mdi/slack')['default'] MdiStar: typeof import('~icons/mdi/star')['default'] diff --git a/packages/nc-gui-v2/components/dashboard/settings/Misc.vue b/packages/nc-gui-v2/components/dashboard/settings/Misc.vue new file mode 100644 index 0000000000..117d48f186 --- /dev/null +++ b/packages/nc-gui-v2/components/dashboard/settings/Misc.vue @@ -0,0 +1,16 @@ + + + + + + + Show M2M Tables + + + + diff --git a/packages/nc-gui-v2/components/dashboard/settings/Modal.vue b/packages/nc-gui-v2/components/dashboard/settings/Modal.vue index b4a5fbbcff..e280c7c8cb 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/Modal.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/Modal.vue @@ -5,6 +5,7 @@ import AuditTab from './AuditTab.vue' import AppStore from './AppStore.vue' import Metadata from './Metadata.vue' import UIAcl from './UIAcl.vue' +import Misc from './Misc.vue' import ApiTokenManagement from '~/components/tabs/auth/ApiTokenManagement.vue' import UserManagement from '~/components/tabs/auth/UserManagement.vue' import StoreFrontOutline from '~icons/mdi/storefront-outline' @@ -86,6 +87,10 @@ const tabsInfo: TabGroup = { title: 'UI Access Control', body: UIAcl, }, + misc: { + title: 'Misc', + body: Misc, + }, }, }, audit: { diff --git a/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue b/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue index 4aaaf11afe..381f1cfaf8 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue @@ -7,6 +7,8 @@ const { $api, $e } = useNuxtApp() const { project } = useProject() +const { includeM2M } = useGlobal() + const roles = $ref(['editor', 'commenter', 'viewer']) let isLoading = $ref(false) @@ -28,9 +30,10 @@ async function loadTableList() { if (!project.value?.id) return isLoading = true - // TODO includeM2M + tables = await $api.project.modelVisibilityList(project.value?.id, { - includeM2M: false, + // FIXME: type + includeM2M: includeM2M.value || '', }) } catch (e) { console.error(e) diff --git a/packages/nc-gui-v2/components/general/ReleaseInfo.vue b/packages/nc-gui-v2/components/general/ReleaseInfo.vue new file mode 100644 index 0000000000..7f42fd24dc --- /dev/null +++ b/packages/nc-gui-v2/components/general/ReleaseInfo.vue @@ -0,0 +1,69 @@ + + + + + + + + {{ $t('activity.upgrade.available') }} + + + + + + + + + {{ latestRelease }} {{ $t('activity.upgrade.releaseNote') }} + + + + + + + {{ $t('activity.upgrade.howTo') }} + + + + + + + {{ $t('general.hideMenu') }} + + + + + + diff --git a/packages/nc-gui-v2/components/general/ShareBaseButton.vue b/packages/nc-gui-v2/components/general/ShareBaseButton.vue new file mode 100644 index 0000000000..b33d45f67c --- /dev/null +++ b/packages/nc-gui-v2/components/general/ShareBaseButton.vue @@ -0,0 +1,33 @@ + + + + + + + + {{ $t('activity.share') }} + + + + + diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DebugMeta.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DebugMeta.vue new file mode 100644 index 0000000000..60ef0f660f --- /dev/null +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DebugMeta.vue @@ -0,0 +1,28 @@ + + + + + + Debug Meta + + + + + + + + + + + + diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteCache.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteCache.vue index 2eeabc259e..0905d952dd 100644 --- a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteCache.vue +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteCache.vue @@ -13,10 +13,10 @@ async function deleteCache() { - + Delete Cache - + diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteTable.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteTable.vue index fc82263308..c94301fe70 100644 --- a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteTable.vue +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/DeleteTable.vue @@ -14,7 +14,7 @@ const sidebarOpen = inject(RightSidebarInj, ref(true)) {{ $t('activity.deleteTable') }} - + diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ExportCache.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ExportCache.vue index 7cbaba15d2..0c0242412b 100644 --- a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ExportCache.vue +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ExportCache.vue @@ -23,11 +23,10 @@ async function exportCache() { - - + Export Cache - + diff --git a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/index.vue b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/index.vue index 30c1acc8c8..9af373d4c3 100644 --- a/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/index.vue +++ b/packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/index.vue @@ -4,6 +4,7 @@ import LockMenu from './LockMenu.vue' import Reload from './Reload.vue' import ExportCache from './ExportCache.vue' import DeleteCache from './DeleteCache.vue' +import DebugMeta from './DebugMeta.vue' const { isUIAllowed } = useUIPermission() @@ -33,8 +34,9 @@ const clickCount = $ref(0) - - + + + diff --git a/packages/nc-gui-v2/composables/useGlobal/state.ts b/packages/nc-gui-v2/composables/useGlobal/state.ts index 5a8481de78..c0f7a799d4 100644 --- a/packages/nc-gui-v2/composables/useGlobal/state.ts +++ b/packages/nc-gui-v2/composables/useGlobal/state.ts @@ -58,6 +58,10 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State { }, filterAutoSave: true, previewAs: null, + includeM2M: false, + currentVersion: null, + latestRelease: null, + hiddenRelease: null, } /** saves a reactive state, any change to these values will write/delete to localStorage */ diff --git a/packages/nc-gui-v2/composables/useGlobal/types.ts b/packages/nc-gui-v2/composables/useGlobal/types.ts index 9ce4f7d924..e598332022 100644 --- a/packages/nc-gui-v2/composables/useGlobal/types.ts +++ b/packages/nc-gui-v2/composables/useGlobal/types.ts @@ -35,6 +35,10 @@ export interface StoredState { feedbackForm: FeedbackForm filterAutoSave: boolean previewAs: string | null + includeM2M: boolean + currentVersion: string | null + latestRelease: string | null + hiddenRelease: string | null } export type State = ToRefs> & { diff --git a/packages/nc-gui-v2/composables/useProject.ts b/packages/nc-gui-v2/composables/useProject.ts index f11e5a1124..8c830507f3 100644 --- a/packages/nc-gui-v2/composables/useProject.ts +++ b/packages/nc-gui-v2/composables/useProject.ts @@ -12,6 +12,7 @@ export function useProject(projectId?: MaybeRef) { const project = useState('project') const tables = useState('tables', () => [] as TableType[]) const route = useRoute() + const { includeM2M } = useGlobal() // todo: refactor path param name and variable name const projectType = $computed(() => route.params.projectType as string) @@ -27,7 +28,10 @@ export function useProject(projectId?: MaybeRef) { async function loadTables() { if (project.value.id) { - const tablesResponse = await $api.dbTable.list(project.value.id) + const tablesResponse = await $api.dbTable.list(project.value.id, { + // FIXME: type + includeM2M: includeM2M.value || '', + }) if (tablesResponse.list) tables.value = tablesResponse.list } } diff --git a/packages/nc-gui-v2/layouts/base.vue b/packages/nc-gui-v2/layouts/base.vue index 6ca23e21d3..1ce866ad42 100644 --- a/packages/nc-gui-v2/layouts/base.vue +++ b/packages/nc-gui-v2/layouts/base.vue @@ -10,10 +10,6 @@ const route = useRoute() const email = computed(() => user.value?.email ?? '---') -const { isUIAllowed } = useUIPermission() - -const showUserModal = $ref(false) - const logout = () => { signOut() navigateTo('/signin') @@ -47,21 +43,9 @@ const logout = () => { - - - - - {{ $t('activity.share') }} - - - - + + + Switch language