Enhancement: relocate and smaller upload widget, dont limit upload list (#9244)

This commit is contained in:
shamoon
2025-02-27 13:13:36 -08:00
committed by GitHub
parent 0eb765c3e8
commit 865e9fe233
8 changed files with 73 additions and 115 deletions

View File

@@ -4,7 +4,6 @@ import { RouterModule } from '@angular/router'
import {
NgbAlert,
NgbAlertModule,
NgbCollapseModule,
NgbProgressbarModule,
} from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
@@ -21,8 +20,6 @@ import {
} from 'src/app/services/websocket-status.service'
import { WidgetFrameComponent } from '../widget-frame/widget-frame.component'
const MAX_ALERTS = 5
@Component({
selector: 'pngx-upload-file-widget',
templateUrl: './upload-file-widget.component.html',
@@ -34,15 +31,12 @@ const MAX_ALERTS = 5
NgTemplateOutlet,
RouterModule,
NgbAlertModule,
NgbCollapseModule,
NgbProgressbarModule,
NgxBootstrapIconsModule,
TourNgBootstrapModule,
],
})
export class UploadFileWidgetComponent extends ComponentWithPermissions {
alertsExpanded = false
@ViewChildren(NgbAlert) alerts: QueryList<NgbAlert>
constructor(
@@ -54,7 +48,7 @@ export class UploadFileWidgetComponent extends ComponentWithPermissions {
}
getStatus() {
return this.websocketStatusService.getConsumerStatus().slice(0, MAX_ALERTS)
return this.websocketStatusService.getConsumerStatus()
}
getStatusSummary() {
@@ -77,13 +71,6 @@ export class UploadFileWidgetComponent extends ComponentWithPermissions {
)
}
getStatusHidden() {
if (this.websocketStatusService.getConsumerStatus().length < MAX_ALERTS)
return []
else
return this.websocketStatusService.getConsumerStatus().slice(MAX_ALERTS)
}
getStatusUploading() {
return this.websocketStatusService.getConsumerStatus(
FileStatusPhase.UPLOADING