Skip to content

Commit

Permalink
Rename resourceId query option to shareId
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Apr 28, 2022
1 parent c656c60 commit 84f2b11
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
15 changes: 3 additions & 12 deletions packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,7 @@ export default {
await this.$client.files.createFolder(path)
resource = await this.$client.files.fileInfo(path, DavProperties.Default)
} else if (this.isSpacesShareLocation) {
path = buildWebDavSpacesPath(
[SHARE_JAIL_ID, this.$route.query.resourceId].join('!'),
path
)
path = buildWebDavSpacesPath([SHARE_JAIL_ID, this.$route.query.shareId].join('!'), path)
await this.$client.files.createFolder(path)
resource = await this.$client.files.fileInfo(path, DavProperties.Default)
} else {
Expand Down Expand Up @@ -501,10 +498,7 @@ export default {
await this.$client.files.putFileContents(path, '')
resource = await this.$client.files.fileInfo(path, DavProperties.Default)
} else if (this.isSpacesShareLocation) {
path = buildWebDavSpacesPath(
[SHARE_JAIL_ID, this.$route.query.resourceId].join('!'),
path
)
path = buildWebDavSpacesPath([SHARE_JAIL_ID, this.$route.query.shareId].join('!'), path)
await this.$client.files.putFileContents(path, '')
resource = await this.$client.files.fileInfo(path, DavProperties.Default)
} else {
Expand Down Expand Up @@ -580,10 +574,7 @@ export default {
path = buildWebDavSpacesPath(this.$route.params.storageId, path)
resource = await this.$client.files.fileInfo(path, DavProperties.Default)
} else if (this.isSpacesShareLocation) {
path = buildWebDavSpacesPath(
[SHARE_JAIL_ID, this.$route.query.resourceId].join('!'),
path
)
path = buildWebDavSpacesPath([SHARE_JAIL_ID, this.$route.query.shareId].join('!'), path)
resource = await this.$client.files.fileInfo(path, DavProperties.Default)
} else {
resource = await this.$client.publicFiles.getFileInfo(
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/router/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
meta: {
patchCleanPath: true,
title: $gettext('Files shared with me'),
contextQueryItems: ['resourceId']
contextQueryItems: ['shareId']
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions packages/web-app-files/src/views/shares/SharedResource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default defineComponent({
MixinFilesListFilter
],
setup() {
const shareId = useRouteQuery('resourceId')
const shareId = useRouteQuery('shareId')
const shareName = useRouteParam('shareName')
const relativePath = useRouteParam('item', '')
return {
Expand All @@ -142,7 +142,7 @@ export default defineComponent({
shareName: unref(shareName)
},
query: {
resourceId: unref(shareId)
shareId: unref(shareId)
}
}),
shareId,
Expand Down
4 changes: 1 addition & 3 deletions packages/web-app-files/src/views/shares/SharedWithMe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ export default defineComponent({
const resourceTargetParamMapping = computed(() =>
unref(hasSpaces) ? { name: 'shareName', path: 'item' } : null
)
const resourceTargetQueryMapping = computed(() =>
unref(hasSpaces) ? { id: 'resourceId' } : null
)
const resourceTargetQueryMapping = computed(() => (unref(hasSpaces) ? { id: 'shareId' } : null))
const viewMode = computed(() =>
parseInt(String(unref(useRouteQuery('view-mode', ShareStatus.accepted.toString()))))
Expand Down

0 comments on commit 84f2b11

Please sign in to comment.