mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(core): correctly show displayname when picking a file
Ensure that the display name is shown instead of the filename (important for public shares). Fixed in the library but the legacy wrapper still uses it. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
609c25acfc
commit
3dea8f7fec
1 changed files with 3 additions and 3 deletions
|
|
@ -278,13 +278,13 @@ const Dialogs = {
|
|||
} else {
|
||||
builder.setButtonFactory((nodes, path) => {
|
||||
const buttons = []
|
||||
const node = nodes?.[0]?.attributes?.displayName || nodes?.[0]?.basename
|
||||
const target = node || basename(path)
|
||||
const [node] = nodes
|
||||
const target = node?.displayname || node?.basename || basename(path)
|
||||
|
||||
if (type === FilePickerType.Choose) {
|
||||
buttons.push({
|
||||
callback: legacyCallback(callback, FilePickerType.Choose),
|
||||
label: node && !this.multiSelect ? t('core', 'Choose {file}', { file: node }) : t('core', 'Choose'),
|
||||
label: node && !this.multiSelect ? t('core', 'Choose {file}', { file: target }) : t('core', 'Choose'),
|
||||
type: 'primary',
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue