mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Add linting and indexes for interfaces/services (#1510)
* Add linting and indexes for interfaces/services * Fix linting * Set correct directory for linting in cake
This commit is contained in:
parent
9b33ee7ca9
commit
6ce4f0200d
102 changed files with 1908 additions and 1982 deletions
|
@ -1,28 +1,28 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { NotificationService } from './services/notification.service';
|
||||
import { SettingsService } from './services/settings.service';
|
||||
import { AuthService } from './auth/auth.service';
|
||||
import { ILocalUser } from './auth/IUserLogin';
|
||||
|
||||
import { ICustomizationSettings } from './interfaces/ISettings';
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Router } from "@angular/router";
|
||||
import { AuthService } from "./auth/auth.service";
|
||||
import { ILocalUser } from "./auth/IUserLogin";
|
||||
import { NotificationService } from "./services";
|
||||
import { SettingsService } from "./services";
|
||||
|
||||
import { ICustomizationSettings } from "./interfaces";
|
||||
|
||||
@Component({
|
||||
selector: 'ombi',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
selector: "ombi",
|
||||
templateUrl: "./app.component.html",
|
||||
styleUrls: ["./app.component.scss"],
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
|
||||
public customizationSettings: ICustomizationSettings;
|
||||
public user: ILocalUser;
|
||||
public showNav: boolean;
|
||||
|
||||
constructor(public notificationService: NotificationService, public authService: AuthService, private router: Router, private settingsService: SettingsService) { }
|
||||
|
||||
customizationSettings: ICustomizationSettings;
|
||||
user: ILocalUser;
|
||||
|
||||
ngOnInit(): void {
|
||||
public ngOnInit() {
|
||||
this.user = this.authService.claims();
|
||||
|
||||
|
||||
this.settingsService.getCustomization().subscribe(x => this.customizationSettings = x);
|
||||
|
||||
this.router.events.subscribe(() => {
|
||||
|
@ -31,14 +31,12 @@ export class AppComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
hasRole(role: string): boolean {
|
||||
public hasRole(role: string): boolean {
|
||||
return this.user.roles.some(r => r === role);
|
||||
}
|
||||
|
||||
logOut() {
|
||||
public logOut() {
|
||||
this.authService.logout();
|
||||
this.router.navigate(["login"]);
|
||||
}
|
||||
|
||||
showNav: boolean;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue