[ACA-4471] - Added show preview action for files in search results (#2169)

* [ACA-4472] - added preview button on info drawer

* [ACA-4472] - added preview button on info drawer

* [ACA-4472] - added preview button on info drawer

* [ACA-4472] - fixed lint

* [ACA-4472] - fixed unit test

* [ACA-4472] - fixed wrong import

* [ACA-4472] - reverted app.config

* [ACA-4472] - added some upgrades for styling

* [ACA-4472] - added some upgrades for styling

* [ACA-4472] - start fixing e2e

* [ACA-4472] - wrong whitespace

* [ACA-4471] - readded view button and fixed bug on closing

* [ACA-4471] - readded action

* [ACA-4238] - fix e2e #2

* [ACA-4471] - readded view button for e2e

* [ACA-4471] - readded view button for e2e
This commit is contained in:
Vito
2021-06-16 15:21:29 +01:00
committed by GitHub
parent 925c2ee933
commit b7ba7b94b2
16 changed files with 180 additions and 14 deletions

View File

@@ -495,3 +495,16 @@ export function canShowLogout(context: AcaRuleContext): boolean {
export function isLibraryManager(context: RuleContext): boolean {
return hasLibrarySelected(context) && context.selection.library.entry && context.selection.library.entry.role === 'SiteManager';
}
/**
* Checks if the preview button for search results can be showed
* JSON ref: `canInfoPreview`
* @param context Rule execution context
*/
export function canInfoPreview(context: RuleContext): boolean {
return navigation.isSearchResults(context) && !isMultiselection(context) && !hasFolderSelected(context) && !navigation.isPreview(context);
}
export function showInfoSelectionButton(context: RuleContext): boolean {
return navigation.isSearchResults(context) && !navigation.isPreview(context);
}