mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 00:06:05 -07:00
Fixed an issue where we messed up the pages and routing.
Also added the requester onto the movie requests #865 #1513
This commit is contained in:
parent
6588fa8ca3
commit
66ad62beb5
3 changed files with 21 additions and 11 deletions
|
@ -35,7 +35,9 @@ export class AppComponent implements OnInit {
|
||||||
this.showNav = this.authService.loggedIn();
|
this.showNav = this.authService.loggedIn();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.jobService.getCachedUpdate().subscribe(x => this.updateAvailable = x);
|
if (this.user !== null && this.user.name) {
|
||||||
|
this.jobService.getCachedUpdate().subscribe(x => this.updateAvailable = x);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public hasRole(role: string): boolean {
|
public hasRole(role: string): boolean {
|
||||||
|
|
|
@ -25,6 +25,18 @@ export class LoginComponent implements OnInit {
|
||||||
constructor(private authService: AuthService, private router: Router, private notify: NotificationService, private status: StatusService,
|
constructor(private authService: AuthService, private router: Router, private notify: NotificationService, private status: StatusService,
|
||||||
private fb: FormBuilder, private settingsService: SettingsService, private images: ImageService, private sanitizer: DomSanitizer,
|
private fb: FormBuilder, private settingsService: SettingsService, private images: ImageService, private sanitizer: DomSanitizer,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute) {
|
||||||
|
this.route.params
|
||||||
|
.subscribe(params => {
|
||||||
|
this.landingFlag = params.landing;
|
||||||
|
if (this.landingFlag === false) {
|
||||||
|
this.settingsService.getLandingPage().subscribe(x => {
|
||||||
|
if (x.enabled && !this.landingFlag) {
|
||||||
|
this.router.navigate(["landingpage"]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.form = this.fb.group({
|
this.form = this.fb.group({
|
||||||
username: ["", [Validators.required]],
|
username: ["", [Validators.required]],
|
||||||
password: ["", [Validators.required]],
|
password: ["", [Validators.required]],
|
||||||
|
@ -36,19 +48,9 @@ export class LoginComponent implements OnInit {
|
||||||
this.router.navigate(["Wizard"]);
|
this.router.navigate(["Wizard"]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.route.params
|
|
||||||
.subscribe(params => {
|
|
||||||
this.landingFlag = params.landing;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit() {
|
public ngOnInit() {
|
||||||
this.settingsService.getLandingPage().subscribe(x => {
|
|
||||||
if (x.enabled && !this.landingFlag) {
|
|
||||||
this.router.navigate(["landingpage"]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.settingsService.getCustomization().subscribe(x => this.customizationSettings = x);
|
this.settingsService.getCustomization().subscribe(x => this.customizationSettings = x);
|
||||||
this.images.getRandomBackground().subscribe(x => {
|
this.images.getRandomBackground().subscribe(x => {
|
||||||
this.background = this.sanitizer.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%),url(" + x.url + ")");
|
this.background = this.sanitizer.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%),url(" + x.url + ")");
|
||||||
|
|
|
@ -28,6 +28,12 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<div>
|
||||||
|
<span>Requested By: </span>
|
||||||
|
<span *ngIf="!isAdmin">{{request.requestedUser.userName}}</span>
|
||||||
|
<span *ngIf="isAdmin && request.requestedUser.alias">{{request.requestedUser.alias}}</span>
|
||||||
|
<span *ngIf="isAdmin && !request.requestedUser.alias">{{request.requestedUser.userName}}</span>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>Status: </span>
|
<span>Status: </span>
|
||||||
<span class="label label-success">{{request.status}}</span>
|
<span class="label label-success">{{request.status}}</span>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue