UNPKG

ngx-admin-lte

Version:

AdminLTE theme for angular

57 lines 6.4 kB
import * as tslib_1 from "tslib"; import { Component, Input } from '@angular/core'; import { UserService } from '../../services/user.service'; import { ControlSidebarService } from '../../services/control-sidebar.service'; let AppHeaderComponent = class AppHeaderComponent { constructor(userService, sidebarService) { this.userService = userService; this.sidebarService = sidebarService; this.display_messages = true; this.display_notifications = true; this.display_tasks = true; this.display_user = true; this.display_control = true; this.display_logout = false; this.header_components = []; } logout() { this.userService.logout(); } toggleSidebar() { this.sidebarService.toggle(); } }; AppHeaderComponent.ctorParameters = () => [ { type: UserService }, { type: ControlSidebarService } ]; tslib_1.__decorate([ Input() ], AppHeaderComponent.prototype, "display_messages", void 0); tslib_1.__decorate([ Input() ], AppHeaderComponent.prototype, "display_notifications", void 0); tslib_1.__decorate([ Input() ], AppHeaderComponent.prototype, "display_tasks", void 0); tslib_1.__decorate([ Input() ], AppHeaderComponent.prototype, "display_user", void 0); tslib_1.__decorate([ Input() ], AppHeaderComponent.prototype, "display_control", void 0); tslib_1.__decorate([ Input() ], AppHeaderComponent.prototype, "display_logout", void 0); tslib_1.__decorate([ Input() ], AppHeaderComponent.prototype, "header_components", void 0); AppHeaderComponent = tslib_1.__decorate([ Component({ selector: 'app-header', template: "<!-- Main Header -->\n<header class=\"main-header\">\n\t<!-- Logo -->\n\t<app-logo></app-logo>\n\t<!-- Header Navbar -->\n\t<nav class=\"navbar navbar-static-top\" role=\"navigation\">\n\t\t<!-- Sidebar toggle button-->\n\t\t<a class=\"sidebar-toggle\" data-toggle=\"offcanvas\" role=\"button\">\n\t\t\t<!-- ADMIN LTE 2.4.0 <a class=\"sidebar-toggle\" data-toggle=\"push-menu\" role=\"button\"> -->\n <span class=\"sr-only\">Toggle navigation</span>\n\t\t</a>\n\t\t<!-- Navbar Right Menu -->\n\t\t<div class=\"navbar-custom-menu\">\n\t\t\t<ul class=\"nav navbar-nav\" >\n\t\t\t\t<!-- Messages: style can be found in dropdown.less-->\n\t\t\t\t<li class=\"dropdown messages-menu messagesBox\" *ngIf=\"display_messages\"></li>\n\t\t\t\t<!-- Notifications Menu -->\n\t\t\t\t<li class=\"dropdown notifications-menu notificationsBox\" *ngIf=\"display_notifications\"></li>\n\t\t\t\t<!-- Tasks Menu -->\n\t\t\t\t<li class=\"dropdown tasks-menu tasksBox\" *ngIf=\"display_tasks\"></li>\n\t\t\t\t<!-- User Account Menu -->\n <li class=\"dropdown user user-menu userBox\" *ngIf=\"display_user\"></li>\n <li *ngIf=\"display_logout\">\n\t\t\t\t\t<button class=\"btn btn-primary btn-lg\" (click)=\"logout()\">\n\t\t\t\t\t\t<i class=\"fa fa-power-off\"></i>\n\t\t\t\t\t</button>\n\t\t\t\t</li>\n\t\t\t\t<!-- Control Sidebar Toggle Button -->\n\t\t\t\t<li>\n\t\t\t\t\t<a class=\"toggle-sidebar-right\" role=\"button\" *ngIf=\"display_control\">\n\t\t\t\t\t\t<i class=\"fa fa-gears\" (click)=\"toggleSidebar()\"></i>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t\t<!-- Additionnal components -->\n\t\t\t\t<ng-container *ngFor=\"let widget of header_components\">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<app-component-loader [class_component]=\"widget.class\" [data]=\"widget.data\"></app-component-loader>\n\t\t\t\t\t</li>\n\t\t\t\t</ng-container>\n\t\t\t</ul>\n\t\t</div>\n\t</nav>\n</header>\n", styles: [""] }) ], AppHeaderComponent); export { AppHeaderComponent }; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLWhlYWRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtYWRtaW4tbHRlLyIsInNvdXJjZXMiOlsid2lkZ2V0cy9hcHAtaGVhZGVyL2FwcC1oZWFkZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFF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