118223: Add 'loading' overlay while bitstream is moving

This commit is contained in:
Andreas Awouters
2024-10-23 13:56:18 +02:00
parent 6644714bb7
commit 1a816228e8
7 changed files with 72 additions and 10 deletions

View File

@@ -59,6 +59,11 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
*/
itemUpdateSubscription: Subscription;
/**
* An observable which emits a boolean which represents whether the service is currently handling a 'move' request
*/
isProcessingMoveRequest: Observable<boolean>;
constructor(
public itemService: ItemDataService,
public objectUpdatesService: ObjectUpdatesService,
@@ -84,6 +89,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
*/
postItemInit(): void {
const bundlesOptions = this.itemBitstreamsService.getInitialBundlesPaginationOptions();
this.isProcessingMoveRequest = this.itemBitstreamsService.getPerformingMoveRequest$();
this.bundles$ = this.itemService.getBundles(this.item.id, new PaginatedSearchOptions({pagination: bundlesOptions})).pipe(
getFirstSucceededRemoteData(),