Skip to content

Commit b676183

Browse files
authored
Merge pull request #12024 from owncloud/backport-fixes-20241209
fix: backport recent master fixes to stable-11.0
2 parents 4601495 + b8503b8 commit b676183

File tree

67 files changed

+608
-324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+608
-324
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Change search scope without search term
2+
3+
We've fixed the change of search scope on search page when there is no search term entered.
4+
5+
https://github.com/owncloud/web/pull/11997
6+
https://github.com/owncloud/web/issues/11982
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Do not load version when sidebar is closed
2+
3+
We've fixed the the loading of file versions which was triggered even when sidebar was closed. File version will now be loaded only when the sidebar is opened.
4+
5+
https://github.com/owncloud/web/pull/11998
6+
https://github.com/owncloud/web/issues/11979
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bugfix: Missing activities on Shared with me page
2+
3+
We've added the missing activities on the Shared with me page.
4+
5+
https://github.com/owncloud/web/pull/12008
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Missing translations for share type filters
2+
3+
We've fixed a bug, where the translations for the share type filters were missing.
4+
This was the case for the "Shared with me" and "Shared with others" page.
5+
6+
https://github.com/owncloud/web/pull/12013
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: OCM invite flow
2+
3+
We've fixed the OCM invite flow and made it more user-friendly.
4+
5+
https://github.com/owncloud/web/pull/11992
6+
https://github.com/owncloud/web/issues/11983
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: OCM share editing
2+
3+
We've fixed a bug where OCM shares could be edited although the server does not support it.
4+
5+
https://github.com/owncloud/web/pull/12002
6+
https://github.com/owncloud/web/issues/11991
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: OCM share recipient issuer
2+
3+
We've fixed a bug where the issuer for OCM shares was missing in the invite input field.
4+
5+
https://github.com/owncloud/web/pull/12002
6+
https://github.com/owncloud/web/issues/11972
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Permanent link for shares
2+
3+
We've fixed an issue where the permanent for shares could not be copied.
4+
5+
https://github.com/owncloud/web/pull/12022
6+
https://github.com/owncloud/web/issues/12001
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bugfix: Show missing role name in link share panel
2+
3+
We've fixed a bug where the role name was missing in the link share panel.
4+
5+
https://github.com/owncloud/web/pull/12012
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bugfix: Sidebar file info for shares
2+
3+
We've fixed a bug some file info regarding size an shares was missing in the right sidebar when opening an incoming share via an editor.
4+
5+
https://github.com/owncloud/web/pull/12010
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Use only space resource with `driveType` "project" as space in sidebar
2+
3+
We've fixed the issue where any selected resource got passed to the sidebar as a space in Spaces page. Now only space resource with `driveType` "project" will be passed as a space.
4+
5+
https://github.com/owncloud/web/pull/12000
6+
https://github.com/owncloud/web/issues/11978

packages/web-app-external/l10n/translations.json

+1-1
Large diffs are not rendered by default.

packages/web-app-external/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default defineWebApplication({
5858
const provider = mimeType.app_providers.find((provider) => provider.name === appName)
5959
return {
6060
extension: mimeType.ext,
61-
label: $gettext('Open in %{app}', { app: provider.name }),
61+
label: () => $gettext('Open in %{app}', { app: provider.name }),
6262
icon: provider.icon,
6363
name: provider.name,
6464
mimeType: mimeType.mime_type,

packages/web-app-files/l10n/translations.json

+1-1
Large diffs are not rendered by default.

packages/web-app-files/src/components/SideBar/ActivitiesPanel.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default defineComponent({
7070
const loadActivitiesTask = useTask(function* (signal) {
7171
activities.value = yield* call(
7272
clientService.graphAuthenticated.activities.listActivities(
73-
`itemid:${unref(resource).id} AND limit:${activitiesLimit} AND sort:desc`,
73+
`itemid:${unref(resource).fileId} AND limit:${activitiesLimit} AND sort:desc`,
7474
{ signal }
7575
)
7676
)

packages/web-app-files/src/components/SideBar/Shares/Collaborators/EditDropdown.vue

+8-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</li>
2828
</oc-list>
2929
<oc-list
30-
v-if="canEditOrDelete"
30+
v-if="canRemove"
3131
class="collaborator-edit-dropdown-options-list collaborator-edit-dropdown-options-list-remove"
3232
>
3333
<li
@@ -91,7 +91,11 @@ export default defineComponent({
9191
return ['user', 'group'].includes(value) || !value
9292
}
9393
},
94-
canEditOrDelete: {
94+
canEdit: {
95+
type: Boolean,
96+
required: true
97+
},
98+
canRemove: {
9599
type: Boolean,
96100
required: true
97101
},
@@ -198,7 +202,7 @@ export default defineComponent({
198202
})
199203
}
200204
201-
if (this.canEditOrDelete && this.isExpirationSupported) {
205+
if (this.canEdit && this.isExpirationSupported) {
202206
result.push({
203207
title: this.isExpirationDateSet
204208
? this.$gettext('Edit expiration date')
@@ -254,7 +258,7 @@ export default defineComponent({
254258
},
255259
256260
isRemoveExpirationPossible() {
257-
return this.canEditOrDelete && this.isExpirationSupported && this.isExpirationDateSet
261+
return this.canEdit && this.isExpirationSupported && this.isExpirationDateSet
258262
}
259263
},
260264
methods: {

packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/AutocompleteItem.vue

+15-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
class="files-collaborators-autocomplete-additionalInfo"
3535
v-text="`${additionalInfo}`"
3636
/>
37+
<div
38+
v-if="externalIssuer"
39+
class="files-collaborators-autocomplete-externalIssuer"
40+
v-text="`${externalIssuer}`"
41+
/>
3742
</div>
3843
</div>
3944
</template>
@@ -56,7 +61,14 @@ export default {
5661
return props.item.mail || props.item.onPremisesSamAccountName
5762
})
5863
59-
return { additionalInfo }
64+
const externalIssuer = computed(() => {
65+
if (props.item.shareType === ShareTypes.remote.value) {
66+
return props.item.identities?.[0]?.issuer
67+
}
68+
return ''
69+
})
70+
71+
return { additionalInfo, externalIssuer }
6072
},
6173
computed: {
6274
shareType() {
@@ -87,7 +99,8 @@ export default {
8799
</script>
88100

89101
<style lang="scss">
90-
.files-collaborators-autocomplete-additionalInfo {
102+
.files-collaborators-autocomplete-additionalInfo,
103+
.files-collaborators-autocomplete-externalIssuer {
91104
font-size: var(--oc-font-size-small);
92105
}
93106
</style>

packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,14 @@ export default defineComponent({
295295
})
296296
})
297297
298-
onMounted(async () => {
298+
const setInitialSelectedRole = () => {
299299
selectedRole.value = unref(isExternalShareRoleType)
300300
? unref(availableExternalRoles)[0]
301301
: unref(availableInternalRoles)[0]
302+
}
302303
304+
onMounted(async () => {
305+
setInitialSelectedRole()
303306
await nextTick()
304307
markInstance.value = new Mark('.mark-element')
305308
})
@@ -479,6 +482,7 @@ export default defineComponent({
479482
}
480483
}
481484
focusShareInput()
485+
setInitialSelectedRole()
482486
}
483487
484488
const focusShareInput = () => {

packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/RecipientContainer.vue

+17-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<script lang="ts">
2121
import { avatarUrl } from '../../../../../helpers/user'
2222
import { CollaboratorAutoCompleteItem, ShareTypes } from '@ownclouders/web-client'
23-
import { defineComponent, PropType } from 'vue'
23+
import { computed, defineComponent, PropType } from 'vue'
2424
import { Recipient } from '@ownclouders/design-system/helpers'
2525
import { useCapabilityStore, useConfigStore } from '@ownclouders/web-pkg'
2626
import { storeToRefs } from 'pinia'
@@ -37,22 +37,35 @@ export default defineComponent({
3737
default: null
3838
}
3939
},
40-
setup() {
40+
setup(props) {
4141
const capabilityStore = useCapabilityStore()
4242
const capabilityRefs = storeToRefs(capabilityStore)
4343
4444
const configStore = useConfigStore()
4545
const { serverUrl } = storeToRefs(configStore)
4646
47+
const externalIssuer = computed(() => {
48+
if (props.recipient.shareType === ShareTypes.remote.value) {
49+
return props.recipient.identities?.[0]?.issuer
50+
}
51+
return ''
52+
})
53+
4754
return {
4855
serverUrl,
49-
userProfilePicture: capabilityRefs.sharingUserProfilePicture
56+
userProfilePicture: capabilityRefs.sharingUserProfilePicture,
57+
externalIssuer
5058
}
5159
},
5260
data(): { formattedRecipient: Recipient } {
61+
let name = this.recipient.displayName
62+
if (this.externalIssuer) {
63+
name += ` (${this.externalIssuer})`
64+
}
65+
5366
return {
5467
formattedRecipient: {
55-
name: this.recipient.displayName,
68+
name,
5669
icon: this.getRecipientIcon(),
5770
hasAvatar: this.recipient.shareType === ShareTypes.user.value,
5871
isLoadingAvatar: true

packages/web-app-files/src/components/SideBar/Shares/Collaborators/ListItem.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@
103103
data-testid="collaborator-edit"
104104
:expiration-date="share.expirationDateTime ? share.expirationDateTime : null"
105105
:share-category="shareCategory"
106-
:can-edit-or-delete="modifiable"
106+
:can-edit="modifiable"
107+
:can-remove="removable"
107108
:is-share-denied="isShareDenied"
108109
:is-locked="isLocked"
109110
:deniable="deniable"
@@ -165,6 +166,10 @@ export default defineComponent({
165166
type: Boolean,
166167
default: false
167168
},
169+
removable: {
170+
type: Boolean,
171+
default: false
172+
},
168173
sharedParentRoute: {
169174
type: Object as PropType<RouteLocationNamedRaw>,
170175
default: null

packages/web-app-files/src/components/SideBar/Shares/Collaborators/RoleDropdown.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<oc-contextual-helper
2323
v-if="isDisabledRole"
2424
class="oc-ml-xs files-permission-actions-list"
25-
:list="existingSharePermissions.map((permission) => ({ text: permission }))"
25+
:text="customPermissionsText"
2626
:title="$gettext('Custom permissions')"
2727
/>
2828
</div>
@@ -141,6 +141,11 @@ export default defineComponent({
141141
142142
return ''
143143
})
144+
const customPermissionsText = computed(() =>
145+
$gettext(
146+
'Dear user, please replace this legacy role with one of the currently available roles'
147+
)
148+
)
144149
145150
const availableInternalRoles = inject<Ref<ShareRole[]>>('availableInternalShareRoles')
146151
const availableExternalRoles = inject<Ref<ShareRole[]>>('availableExternalShareRoles')
@@ -200,6 +205,7 @@ export default defineComponent({
200205
ability,
201206
user,
202207
dropButtonTooltip,
208+
customPermissionsText,
203209
resource: inject<Resource>('resource'),
204210
selectedRole,
205211
availableRoles,

packages/web-app-files/src/components/SideBar/Shares/FileShares.vue

+12
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
:resource-name="resource.name"
4444
:deniable="isShareDeniable(collaborator)"
4545
:modifiable="isShareModifiable(collaborator)"
46+
:removable="isShareRemovable(collaborator)"
4647
:is-share-denied="isShareDenied(collaborator)"
4748
:shared-parent-route="getSharedParentRoute(collaborator)"
4849
:is-locked="resource.locked"
@@ -438,6 +439,17 @@ export default defineComponent({
438439
},
439440
440441
isShareModifiable(collaborator: CollaboratorShare) {
442+
if (collaborator.indirect || collaborator.shareType === ShareTypes.remote.value) {
443+
return false
444+
}
445+
446+
if (isProjectSpaceResource(this.space) || isShareSpaceResource(this.space)) {
447+
return this.space.canShare({ user: this.user })
448+
}
449+
450+
return true
451+
},
452+
isShareRemovable(collaborator: CollaboratorShare) {
441453
if (collaborator.indirect) {
442454
return false
443455
}

packages/web-app-files/src/components/SideBar/Shares/SpaceMembers.vue

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<collaborator-list-item
6666
:share="collaborator"
6767
:modifiable="isModifiable(collaborator)"
68+
:removable="isModifiable(collaborator)"
6869
:is-space-share="true"
6970
@on-delete="deleteMemberConfirm(collaborator)"
7071
/>

packages/web-app-files/src/services/folder/loaderSharedViaLink.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ export class FolderLoaderSharedViaLink implements FolderLoader {
3434

3535
const resources = value
3636
.filter((s) => s.permissions.some(({ link }) => !!link))
37-
.map((driveItem) => buildOutgoingShareResource({ driveItem, user: userStore.user }))
37+
.map((driveItem) =>
38+
buildOutgoingShareResource({
39+
driveItem,
40+
user: userStore.user,
41+
serverUrl: configStore.serverUrl
42+
})
43+
)
3844

3945
resourcesStore.initResourceList({ currentFolder: null, resources })
4046
})

packages/web-app-files/src/services/folder/loaderSharedWithMe.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ export class FolderLoaderSharedWithMe implements FolderLoader {
3333
)
3434

3535
const resources = value.map((driveItem) =>
36-
buildIncomingShareResource({ driveItem, graphRoles: sharesStore.graphRoles })
36+
buildIncomingShareResource({
37+
driveItem,
38+
graphRoles: sharesStore.graphRoles,
39+
serverUrl: configStore.serverUrl
40+
})
3741
)
3842

3943
resourcesStore.initResourceList({ currentFolder: null, resources })

packages/web-app-files/src/services/folder/loaderSharedWithOthers.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ export class FolderLoaderSharedWithOthers implements FolderLoader {
3434

3535
const resources = value
3636
.filter((s) => s.permissions.some(({ link }) => !link))
37-
.map((driveItem) => buildOutgoingShareResource({ driveItem, user: userStore.user }))
37+
.map((driveItem) =>
38+
buildOutgoingShareResource({
39+
driveItem,
40+
user: userStore.user,
41+
serverUrl: configStore.serverUrl
42+
})
43+
)
3844

3945
resourcesStore.initResourceList({ currentFolder: null, resources })
4046
})

0 commit comments

Comments
 (0)