mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Slim sidebar compatibility
This commit is contained in:
parent
abd34d8d17
commit
8325dc5977
@ -127,7 +127,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" routerLink="tags" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Tags" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.tags">
|
<a class="nav-link" routerLink="tags" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Tags" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled && !tourIsActive" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.tags">
|
||||||
<svg class="sidebaricon" fill="currentColor">
|
<svg class="sidebaricon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#tags"/>
|
<use xlink:href="assets/bootstrap-icons.svg#tags"/>
|
||||||
</svg><span> <ng-container i18n>Tags</ng-container></span>
|
</svg><span> <ng-container i18n>Tags</ng-container></span>
|
||||||
@ -148,7 +148,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" routerLink="tasks" routerLinkActive="active" (click)="closeMenu()" ngbPopover="File Tasks" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.file-tasks">
|
<a class="nav-link" routerLink="tasks" routerLinkActive="active" (click)="closeMenu()" ngbPopover="File Tasks" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled && !tourIsActive" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.file-tasks">
|
||||||
<span *ngIf="tasksService.failedFileTasks.length > 0 && slimSidebarEnabled" class="badge bg-danger position-absolute top-0 end-0">{{tasksService.failedFileTasks.length}}</span>
|
<span *ngIf="tasksService.failedFileTasks.length > 0 && slimSidebarEnabled" class="badge bg-danger position-absolute top-0 end-0">{{tasksService.failedFileTasks.length}}</span>
|
||||||
<svg class="sidebaricon" fill="currentColor">
|
<svg class="sidebaricon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#list-task"/>
|
<use xlink:href="assets/bootstrap-icons.svg#list-task"/>
|
||||||
@ -163,14 +163,14 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" routerLink="settings" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Settings" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.settings">
|
<a class="nav-link" routerLink="settings" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Settings" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled && !tourIsActive" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.settings">
|
||||||
<svg class="sidebaricon" fill="currentColor">
|
<svg class="sidebaricon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#gear"/>
|
<use xlink:href="assets/bootstrap-icons.svg#gear"/>
|
||||||
</svg><span> <ng-container i18n>Settings</ng-container></span>
|
</svg><span> <ng-container i18n>Settings</ng-container></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="admin/" ngbPopover="Admin" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.admin">
|
<a class="nav-link" href="admin/" ngbPopover="Admin" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled && !tourIsActive" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.admin">
|
||||||
<svg class="sidebaricon" fill="currentColor">
|
<svg class="sidebaricon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#toggles"/>
|
<use xlink:href="assets/bootstrap-icons.svg#toggles"/>
|
||||||
</svg><span> <ng-container i18n>Admin</ng-container></span>
|
</svg><span> <ng-container i18n>Admin</ng-container></span>
|
||||||
@ -183,7 +183,7 @@
|
|||||||
</h6>
|
</h6>
|
||||||
<ul class="nav flex-column mb-2">
|
<ul class="nav flex-column mb-2">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://paperless-ngx.readthedocs.io/en/latest/" ngbPopover="Documentation" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.outro">
|
<a class="nav-link" target="_blank" rel="noopener noreferrer" href="https://paperless-ngx.readthedocs.io/en/latest/" ngbPopover="Documentation" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled && !tourIsActive" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim" tourAnchor="tour.outro">
|
||||||
<svg class="sidebaricon" fill="currentColor">
|
<svg class="sidebaricon" fill="currentColor">
|
||||||
<use xlink:href="assets/bootstrap-icons.svg#question-circle"/>
|
<use xlink:href="assets/bootstrap-icons.svg#question-circle"/>
|
||||||
</svg><span> <ng-container i18n>Documentation</ng-container></span>
|
</svg><span> <ng-container i18n>Documentation</ng-container></span>
|
||||||
|
@ -26,6 +26,7 @@ import { TasksService } from 'src/app/services/tasks.service'
|
|||||||
import { ComponentCanDeactivate } from 'src/app/guards/dirty-doc.guard'
|
import { ComponentCanDeactivate } from 'src/app/guards/dirty-doc.guard'
|
||||||
import { SETTINGS_KEYS } from 'src/app/data/paperless-uisettings'
|
import { SETTINGS_KEYS } from 'src/app/data/paperless-uisettings'
|
||||||
import { ToastService } from 'src/app/services/toast.service'
|
import { ToastService } from 'src/app/services/toast.service'
|
||||||
|
import { TourService } from 'ngx-ui-tour-ng-bootstrap'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-app-frame',
|
selector: 'app-app-frame',
|
||||||
@ -43,7 +44,8 @@ export class AppFrameComponent implements OnInit, ComponentCanDeactivate {
|
|||||||
private list: DocumentListViewService,
|
private list: DocumentListViewService,
|
||||||
public settingsService: SettingsService,
|
public settingsService: SettingsService,
|
||||||
public tasksService: TasksService,
|
public tasksService: TasksService,
|
||||||
private readonly toastService: ToastService
|
private readonly toastService: ToastService,
|
||||||
|
private tourService: TourService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -87,6 +89,10 @@ export class AppFrameComponent implements OnInit, ComponentCanDeactivate {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get tourIsActive(): boolean {
|
||||||
|
return this.tourService.getStatus() == 1
|
||||||
|
}
|
||||||
|
|
||||||
closeMenu() {
|
closeMenu() {
|
||||||
this.isMenuCollapsed = true
|
this.isMenuCollapsed = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user