mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
show failed tasks badge in sidebar
This commit is contained in:
parent
66b2013d23
commit
6b4d8b18e0
@ -145,7 +145,7 @@
|
||||
<a class="nav-link" routerLink="tasks" routerLinkActive="active" (click)="closeMenu()">
|
||||
<svg class="sidebaricon" fill="currentColor">
|
||||
<use xlink:href="assets/bootstrap-icons.svg#list-task"/>
|
||||
</svg> <ng-container i18n>File Tasks</ng-container>
|
||||
</svg> <ng-container i18n>File Tasks<ng-container *ngIf="tasksService.failedFileTasks.length > 0"><span class="badge bg-danger ms-2">{{tasksService.failedFileTasks.length}}</span></ng-container></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
@ -22,6 +22,7 @@ import {
|
||||
AppRemoteVersion,
|
||||
} from 'src/app/services/rest/remote-version.service'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { TasksService } from 'src/app/services/tasks.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-app-frame',
|
||||
@ -37,13 +38,15 @@ export class AppFrameComponent {
|
||||
public savedViewService: SavedViewService,
|
||||
private remoteVersionService: RemoteVersionService,
|
||||
private list: DocumentListViewService,
|
||||
public settingsService: SettingsService
|
||||
public settingsService: SettingsService,
|
||||
public tasksService: TasksService
|
||||
) {
|
||||
this.remoteVersionService
|
||||
.checkForUpdates()
|
||||
.subscribe((appRemoteVersion: AppRemoteVersion) => {
|
||||
this.appRemoteVersion = appRemoteVersion
|
||||
})
|
||||
tasksService.reload()
|
||||
}
|
||||
|
||||
versionString = `${environment.appTitle} ${environment.version}`
|
||||
|
@ -98,7 +98,7 @@
|
||||
</ng-template>
|
||||
</li>
|
||||
<li ngbNavItem="failed">
|
||||
<a ngbNavLink i18n>Failed <span class="badge bg-secondary ms-1">{{tasksService.failedFileTasks.length}}</span></a>
|
||||
<a ngbNavLink i18n>Failed <span class="badge bg-danger ms-1">{{tasksService.failedFileTasks.length}}</span></a>
|
||||
<ng-template ngbNavContent>
|
||||
<ng-container [ngTemplateOutlet]="tasksTemplate" [ngTemplateOutletContext]="{tasks:tasksService.failedFileTasks}"></ng-container>
|
||||
</ng-template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user