Merge pull request #11967 from opf/bug/45910-tooltip-on-nc-showing-that-files-are-linked-scrollbar-on-single-file-folders

[#45910] fixed tooltip for not linked files
fix/45586/totp-clock-error-discoverability
Eric Schubert 2 years ago committed by GitHub
commit bbd3f18dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
  2. 3
      frontend/src/global_styles/content/work_packages/shared/_file_picker.sass

@ -149,7 +149,7 @@ export class FilePickerModalComponent extends FilePickerBaseModalComponent {
this.isAlreadyLinked(file),
index === 0,
this.enterDirectoryCallback(file),
isDirectory(file) ? this.text.tooltip.alreadyLinkedDirectory : this.text.tooltip.alreadyLinkedFile,
this.tooltip(file),
{
selected: this.selection.has(file.id as string),
changeSelection: () => { this.changeSelection(file); },
@ -163,4 +163,12 @@ export class FilePickerModalComponent extends FilePickerBaseModalComponent {
return !!found;
}
private tooltip(file:IStorageFile):string|undefined {
if (!this.isAlreadyLinked(file)) {
return undefined;
}
return isDirectory(file) ? this.text.tooltip.alreadyLinkedDirectory : this.text.tooltip.alreadyLinkedFile;
}
}

@ -29,6 +29,9 @@
.op-file-picker
&--scrollable-content
overflow-y: auto
// If there a list in the content that provides tooltips on there items,
// we need enough space to display those tooltips
min-height: $spot-spacing-5
@media #{$spot-mq-mobile}
&.spot-modal

Loading…
Cancel
Save