diff --git a/web-app/packages/app/src/router.ts b/web-app/packages/app/src/router.ts index 0adb4523..fb4670ce 100644 --- a/web-app/packages/app/src/router.ts +++ b/web-app/packages/app/src/router.ts @@ -7,7 +7,6 @@ import { FileBrowserView, FileVersionDetailView, ProjectVersionsView, - VersionDetailView, NotFoundView, VerifyEmailView, routeUtils, @@ -146,6 +145,23 @@ export const createRouter = (pinia: Pinia) => { return } }, + /** Redirect of unused /history/:version_id path to /history?version_id */ + { + path: '/projects/:namespace/:projectName/history/:version_id', + name: 'project-versions-detail', + component: NotFoundView, + props: true, + meta: { public: true }, + beforeEnter: (to, from, next) => { + next({ + path: `/projects/${to.params.namespace}/${ + to.params.projectName + }/history`, + query: { version_id: to.params.version_id } + }) + return + } + }, { path: '/projects/:namespace/:projectName', name: 'project', @@ -182,12 +198,6 @@ export const createRouter = (pinia: Pinia) => { component: ProjectVersionsView, props: true }, - { - path: 'history/:version_id', - name: 'project-versions-detail', - component: VersionDetailView, - props: true - }, { path: 'history/:version_id/:path', name: 'file-version-detail', diff --git a/web-app/packages/lib/components.d.ts b/web-app/packages/lib/components.d.ts index 277dad86..45dad27f 100644 --- a/web-app/packages/lib/components.d.ts +++ b/web-app/packages/lib/components.d.ts @@ -7,6 +7,8 @@ export {} declare module 'vue' { export interface GlobalComponents { + PAccordion: typeof import('primevue/accordion')['default'] + PAccordionTab: typeof import('primevue/accordiontab')['default'] PAvatar: typeof import('primevue/avatar')['default'] PBreadcrumb: typeof import('primevue/breadcrumb')['default'] PButton: typeof import('primevue/button')['default'] @@ -14,6 +16,7 @@ declare module 'vue' { PDataTable: typeof import('primevue/datatable')['default'] PDataView: typeof import('primevue/dataview')['default'] PDialog: typeof import('primevue/dialog')['default'] + PDivider: typeof import('primevue/divider')['default'] PDropdown: typeof import('primevue/dropdown')['default'] PImage: typeof import('primevue/image')['default'] PInlineMessage: typeof import('primevue/inlinemessage')['default'] @@ -48,7 +51,6 @@ declare module 'vue' { VImg: typeof import('vuetify/components')['VImg'] VLayout: typeof import('vuetify/components')['VLayout'] VList: typeof import('vuetify/components')['VList'] - VListGroup: typeof import('vuetify/components')['VListGroup'] VListItem: typeof import('vuetify/components')['VListItem'] VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle'] VListItemTitle: typeof import('vuetify/components')['VListItemTitle'] diff --git a/web-app/packages/lib/src/common/components/AppSidebarRight.vue b/web-app/packages/lib/src/common/components/AppSidebarRight.vue index 4436ee22..9443da1d 100644 --- a/web-app/packages/lib/src/common/components/AppSidebarRight.vue +++ b/web-app/packages/lib/src/common/components/AppSidebarRight.vue @@ -59,7 +59,7 @@ const model = computed({ get() { return props.modelValue }, - set(value) { + set() { return emitModelValue('update:modelValue') } }) diff --git a/web-app/packages/lib/src/modules/project/components/DropArea.vue b/web-app/packages/lib/src/modules/project/components/DropArea.vue index dd899ea7..33a56c73 100644 --- a/web-app/packages/lib/src/modules/project/components/DropArea.vue +++ b/web-app/packages/lib/src/modules/project/components/DropArea.vue @@ -63,6 +63,8 @@ import { useInstanceStore } from '@/modules/instance/store' import { useNotificationStore } from '@/modules/notification/store' import { useProjectStore } from '@/modules/project/store' +type ExtendedFile = File & { isFile: boolean } + export default defineComponent({ props: ['location'], data() { @@ -114,9 +116,9 @@ export default defineComponent({ }) } // prepare all entries because they will be not accessible after this callback ends (after 'await') - const entries = Array.from(evt.dataTransfer.items).map( - (i: DataTransferItem) => i.webkitGetAsEntry() - ) + const entries = Array.from( + evt.dataTransfer.items as DataTransferItem[] + ).map((i) => i.webkitGetAsEntry()) if (entries.some((e) => e === null)) { return this.error({ text: 'Drop only files or folders' @@ -129,9 +131,11 @@ export default defineComponent({ this.$refs.selectFilesInput.click() } }, - onFileSelected(evt) { + onFileSelected(evt: Event) { // prepare all entries because they will be not accessible after this callback ends (after 'await') - const entries = Array.from(evt.target.files).map((i: any) => { + const entries = Array.from( + (evt.target as HTMLInputElement).files as unknown as ExtendedFile[] + ).map((i) => { i.isFile = true return i }) diff --git a/web-app/packages/lib/src/modules/project/components/FileChangesetSummaryTable.vue b/web-app/packages/lib/src/modules/project/components/FileChangesetSummaryTable.vue index 34aad7e6..27744186 100644 --- a/web-app/packages/lib/src/modules/project/components/FileChangesetSummaryTable.vue +++ b/web-app/packages/lib/src/modules/project/components/FileChangesetSummaryTable.vue @@ -5,69 +5,76 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial -->