diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2023-09-21 12:15:37 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2023-09-21 15:20:17 +0200 |
commit | 216804f83d5af391a8a4cc56de89280e3fcdd3bf (patch) | |
tree | 909109808f002c3ce269d0a598efa0f830633711 /apps/files_sharing/src | |
parent | a5a8655bebb8652206ea5aa886699f706739e1fe (diff) | |
download | nextcloud-server-216804f83d5af391a8a4cc56de89280e3fcdd3bf.tar.gz nextcloud-server-216804f83d5af391a8a4cc56de89280e3fcdd3bf.zip |
fix(files): title and inline actions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/actions/sharingStatusAction.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/files_sharing/src/actions/sharingStatusAction.ts b/apps/files_sharing/src/actions/sharingStatusAction.ts index 054d6617ac9..01052676aa4 100644 --- a/apps/files_sharing/src/actions/sharingStatusAction.ts +++ b/apps/files_sharing/src/actions/sharingStatusAction.ts @@ -47,17 +47,28 @@ export const action = new FileAction({ displayName(nodes: Node[]) { const node = nodes[0] const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat() as number[] - if (shareTypes.length > 0) { + const ownerId = node?.attributes?.['owner-id'] + + if (shareTypes.length > 0 + || (ownerId && ownerId !== getCurrentUser()?.uid)) { return t('files_sharing', 'Shared') } + return '' + }, + + title(nodes: Node[]) { + const node = nodes[0] const ownerId = node?.attributes?.['owner-id'] + const ownerDisplayName = node?.attributes?.['owner-display-name'] + if (ownerId && ownerId !== getCurrentUser()?.uid) { - return t('files_sharing', 'Shared') + return t('files_sharing', 'Shared by {ownerDisplayName}', { ownerDisplayName }) } return '' }, + iconSvgInline(nodes: Node[]) { const node = nodes[0] const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat() as number[] |