mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Fixed the theme switcher on mobiles not being fully on the viewport
This commit is contained in:
parent
99a50f49af
commit
bb2a270b54
2 changed files with 10 additions and 29 deletions
|
@ -5,8 +5,8 @@ import { NavigationStart, Router } from "@angular/router";
|
||||||
import { TranslateService } from "@ngx-translate/core";
|
import { TranslateService } from "@ngx-translate/core";
|
||||||
import { AuthService } from "./auth/auth.service";
|
import { AuthService } from "./auth/auth.service";
|
||||||
import { ILocalUser } from "./auth/IUserLogin";
|
import { ILocalUser } from "./auth/IUserLogin";
|
||||||
import { IdentityService, NotificationService, CustomPageService } from "./services";
|
import { NotificationService, CustomPageService } from "./services";
|
||||||
import { JobService, SettingsService } from "./services";
|
import { SettingsService } from "./services";
|
||||||
import { MatSnackBar } from '@angular/material';
|
import { MatSnackBar } from '@angular/material';
|
||||||
|
|
||||||
import { ICustomizationSettings, ICustomPage } from "./interfaces";
|
import { ICustomizationSettings, ICustomPage } from "./interfaces";
|
||||||
|
@ -36,20 +36,15 @@ export class AppComponent implements OnInit {
|
||||||
public isAdmin: boolean;
|
public isAdmin: boolean;
|
||||||
public username: string;
|
public username: string;
|
||||||
|
|
||||||
private checkedForUpdate: boolean;
|
|
||||||
private hubConnected: boolean;
|
private hubConnected: boolean;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@HostBinding('class') public componentCssClass;
|
@HostBinding('class') public componentCssClass;
|
||||||
|
|
||||||
constructor(public notificationService: NotificationService,
|
constructor(public notificationService: NotificationService,
|
||||||
public authService: AuthService,
|
public authService: AuthService,
|
||||||
private readonly router: Router,
|
private readonly router: Router,
|
||||||
private readonly settingsService: SettingsService,
|
private readonly settingsService: SettingsService,
|
||||||
private readonly jobService: JobService,
|
|
||||||
public readonly translate: TranslateService,
|
public readonly translate: TranslateService,
|
||||||
private readonly identityService: IdentityService,
|
|
||||||
private readonly customPageService: CustomPageService,
|
private readonly customPageService: CustomPageService,
|
||||||
public overlayContainer: OverlayContainer,
|
public overlayContainer: OverlayContainer,
|
||||||
private storage: StorageService,
|
private storage: StorageService,
|
||||||
|
@ -82,7 +77,6 @@ export class AppComponent implements OnInit {
|
||||||
|
|
||||||
if (this.customizationSettings && this.customizationSettings.applicationName) {
|
if (this.customizationSettings && this.customizationSettings.applicationName) {
|
||||||
this.applicationName = this.customizationSettings.applicationName;
|
this.applicationName = this.customizationSettings.applicationName;
|
||||||
debugger;
|
|
||||||
this.document.getElementsByTagName('title')[0].innerText = this.applicationName;
|
this.document.getElementsByTagName('title')[0].innerText = this.applicationName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,13 +104,13 @@ export class AppComponent implements OnInit {
|
||||||
this.showNav = this.authService.loggedIn();
|
this.showNav = this.authService.loggedIn();
|
||||||
|
|
||||||
// tslint:disable-next-line:no-string-literal
|
// tslint:disable-next-line:no-string-literal
|
||||||
if (this.user !== null && this.user.name && !this.checkedForUpdate && this.isAdmin) {
|
// if (this.user !== null && this.user.name && !this.checkedForUpdate && this.isAdmin) {
|
||||||
this.checkedForUpdate = true;
|
// this.checkedForUpdate = true;
|
||||||
this.jobService.getCachedUpdate().subscribe(x => {
|
// this.jobService.getCachedUpdate().subscribe(x => {
|
||||||
this.updateAvailable = x;
|
// this.updateAvailable = x;
|
||||||
},
|
// },
|
||||||
err => this.checkedForUpdate = true);
|
// err => this.checkedForUpdate = true);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (this.authService.loggedIn() && !this.hubConnected) {
|
if (this.authService.loggedIn() && !this.hubConnected) {
|
||||||
this.signalrNotification.initialize();
|
this.signalrNotification.initialize();
|
||||||
|
@ -132,19 +126,6 @@ export class AppComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public openMobileApp(event: any) {
|
|
||||||
event.preventDefault();
|
|
||||||
if (!this.customizationSettings.applicationUrl) {
|
|
||||||
this.notificationService.warning("Mobile", "Please ask your admin to setup the Application URL!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.identityService.getAccessToken().subscribe(x => {
|
|
||||||
const url = `ombi://${this.customizationSettings.applicationUrl}_${x}`;
|
|
||||||
window.location.assign(url);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public logOut() {
|
public logOut() {
|
||||||
this.authService.logout();
|
this.authService.logout();
|
||||||
this.router.navigate(["login"]);
|
this.router.navigate(["login"]);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<mat-icon aria-label="Side nav toggle icon">menu</mat-icon>
|
<mat-icon aria-label="Side nav toggle icon">menu</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="col-10 offset-1">
|
<div class="col-md-10 offset-md-1 col-10">
|
||||||
<span class="middle justify-content-center align-items-center">
|
<span class="middle justify-content-center align-items-center">
|
||||||
<!-- Search Bar -->
|
<!-- Search Bar -->
|
||||||
<app-nav-search></app-nav-search>
|
<app-nav-search></app-nav-search>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue