Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions src/collection-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,22 +886,45 @@ export class CollectionBrowser
`;
}

/**
* Message to show in the manage view modal, depending on context.
*/
private get manageViewModalMsg(): string {
const pluralize = this.dataSource.checkedTileModels.length > 1;

switch (this.profileElement) {
case 'uploads':
return pluralize
? msg(
'Note: It may take a few minutes for these items to stop appearing in your uploads list.',
)
: msg(
'Note: It may take a few minutes for this item to stop appearing in your uploads list.',
);
case 'web_archives':
return pluralize
? msg(
'Note: It may take a few minutes for these items to stop appearing in your web archives list.',
)
: msg(
'Note: It may take a few minutes for this item to stop appearing in your web archives list.',
);
default:
return '';
}
}

/**
* Template for the manage bar UI that appears atop the search results when we are
* showing the management view. This generally replaces the sort bar when present.
*/
private get manageBarTemplate(): TemplateResult {
const manageViewModalMsg =
this.profileElement === 'uploads'
? 'Note: it may take a few minutes for these items to stop appearing in your uploads list.'
: nothing;

return html`
<manage-bar
.label=${this.manageViewLabel}
.modalManager=${this.modalManager}
.selectedItems=${this.dataSource.checkedTileModels}
.manageViewModalMsg=${manageViewModalMsg}
.manageViewModalMsg=${this.manageViewModalMsg}
showSelectAll
showUnselectAll
?showItemManageButton=${this.pageContext === 'search'}
Expand Down
Loading