From 95adec5fac2afaed8c52ffabc5249a65b823896e Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Thu, 21 Dec 2023 19:03:48 +0100 Subject: [PATCH 01/14] First prototype of app dropdown --- .../lib/src/common/components/AppDropdown.vue | 87 +++++++++++++++++++ .../lib/src/common/components/AppSection.vue | 2 +- .../src/common/components/AppSidebarRight.vue | 4 +- .../lib/src/common/components/index.ts | 1 + .../lib/src/common/components/types.ts | 9 ++ .../ProjectAccessRequestTableTemplate.vue | 5 +- .../project/views/ProjectViewTemplate.vue | 8 +- 7 files changed, 109 insertions(+), 7 deletions(-) create mode 100644 web-app/packages/lib/src/common/components/AppDropdown.vue create mode 100644 web-app/packages/lib/src/common/components/types.ts diff --git a/web-app/packages/lib/src/common/components/AppDropdown.vue b/web-app/packages/lib/src/common/components/AppDropdown.vue new file mode 100644 index 00000000..f7e950ba --- /dev/null +++ b/web-app/packages/lib/src/common/components/AppDropdown.vue @@ -0,0 +1,87 @@ + + + + + + + diff --git a/web-app/packages/lib/src/common/components/AppSection.vue b/web-app/packages/lib/src/common/components/AppSection.vue index 6d146fec..e2bec11b 100644 --- a/web-app/packages/lib/src/common/components/AppSection.vue +++ b/web-app/packages/lib/src/common/components/AppSection.vue @@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial diff --git a/web-app/packages/lib/src/common/components/AppSidebarRight.vue b/web-app/packages/lib/src/common/components/AppSidebarRight.vue index 9443da1d..a0da8864 100644 --- a/web-app/packages/lib/src/common/components/AppSidebarRight.vue +++ b/web-app/packages/lib/src/common/components/AppSidebarRight.vue @@ -59,8 +59,8 @@ const model = computed({ get() { return props.modelValue }, - set() { - return emitModelValue('update:modelValue') + set(value) { + return emitModelValue('update:modelValue', value) } }) diff --git a/web-app/packages/lib/src/common/components/index.ts b/web-app/packages/lib/src/common/components/index.ts index 9c838114..62a10e87 100644 --- a/web-app/packages/lib/src/common/components/index.ts +++ b/web-app/packages/lib/src/common/components/index.ts @@ -9,6 +9,7 @@ export { default as AppContainer } from './AppContainer.vue' export { default as AppPanelToggleable } from './AppPanelToggleable.vue' export { default as AppsidebarRight } from './AppSidebarRight.vue' export { default as AppMenu } from './AppMenu.vue' +export { default as AppDropdwown } from './AppDropdown.vue' export { default as ActionButton } from './ActionButton.vue' export { default as CustomPage } from './CustomPage.vue' export { default as FullStorageWarning } from './FullStorageWarning.vue' diff --git a/web-app/packages/lib/src/common/components/types.ts b/web-app/packages/lib/src/common/components/types.ts new file mode 100644 index 00000000..2001ddc2 --- /dev/null +++ b/web-app/packages/lib/src/common/components/types.ts @@ -0,0 +1,9 @@ +// Copyright (C) Lutra Consulting Limited +// +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial + +export interface DropdownOption { + value: string + label: string + description?: string +} diff --git a/web-app/packages/lib/src/modules/project/components/ProjectAccessRequestTableTemplate.vue b/web-app/packages/lib/src/modules/project/components/ProjectAccessRequestTableTemplate.vue index 9920eeb1..9111faa4 100644 --- a/web-app/packages/lib/src/modules/project/components/ProjectAccessRequestTableTemplate.vue +++ b/web-app/packages/lib/src/modules/project/components/ProjectAccessRequestTableTemplate.vue @@ -47,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial > Expiring in {{ $filters.remainingtime(item.expire) }}

- @@ -134,6 +133,7 @@ import UploadPanel from '@/modules/project/components/UploadPanel.vue' import { ProjectApi } from '@/modules/project/projectApi' import { useProjectStore } from '@/modules/project/store' import { useUserStore } from '@/modules/user/store' +import AppDropdown from '@/common/components/AppDropdown.vue' interface TabItem { route: string @@ -145,7 +145,8 @@ export default defineComponent({ ProjectShareButton, UploadPanel, AppContainer, - AppSection + AppSection, + AppDropdown }, props: { /** Show namespace (ws) label in breadcrumb of page */ @@ -170,7 +171,8 @@ export default defineComponent({ data() { return { fetchProjectsResponseStatus: null, - tab: null + tab: null, + value: 'read' } }, computed: { From 45720bfffb84c421ecea28678f189431e788ffaf Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Fri, 22 Dec 2023 09:48:06 +0100 Subject: [PATCH 02/14] Refactor @mergin/lib: - rename project access requests table to more sensible name - it is handling global access requests notonly projects - method getProjectAccessRequests is handling also global access requests (namespace) - rename to getAccessRequests Cleanup @mergin/lib: - remove unused BaseItem component --- .../modules/dashboard/views/DashboardView.vue | 6 +- .../src/common/components/base/BaseItem.vue | 105 ------------------ .../lib/src/common/components/base/index.ts | 5 - .../lib/src/common/components/index.ts | 2 - ...equestTable.vue => AccessRequestTable.vue} | 8 +- ...ate.vue => AccessRequestTableTemplate.vue} | 11 +- .../src/modules/project/components/index.ts | 4 +- .../packages/lib/src/modules/project/store.ts | 4 +- .../packages/lib/src/modules/project/types.ts | 3 +- .../project/views/ProjectViewTemplate.vue | 4 +- .../components/ProfileAccessRequestsRow.vue | 6 +- 11 files changed, 21 insertions(+), 137 deletions(-) delete mode 100644 web-app/packages/lib/src/common/components/base/BaseItem.vue delete mode 100644 web-app/packages/lib/src/common/components/base/index.ts rename web-app/packages/lib/src/modules/project/components/{ProjectAccessRequestTable.vue => AccessRequestTable.vue} (81%) rename web-app/packages/lib/src/modules/project/components/{ProjectAccessRequestTableTemplate.vue => AccessRequestTableTemplate.vue} (96%) diff --git a/web-app/packages/app/src/modules/dashboard/views/DashboardView.vue b/web-app/packages/app/src/modules/dashboard/views/DashboardView.vue index d7e5bc84..dbe3fd78 100644 --- a/web-app/packages/app/src/modules/dashboard/views/DashboardView.vue +++ b/web-app/packages/app/src/modules/dashboard/views/DashboardView.vue @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial