pull/3895/head
tidusjar 5 years ago
parent b14ac0074d
commit 1757b1c88d

@ -29,37 +29,37 @@ export class AppComponent implements OnInit {
private checkedForUpdate: boolean;
constructor(public notificationService: NotificationService,
public authService: AuthService,
private readonly router: Router,
private readonly settingsService: SettingsService,
private readonly jobService: JobService,
public readonly translate: TranslateService,
private readonly identityService: IdentityService,
private readonly platformLocation: PlatformLocation) {
const base = this.platformLocation.getBaseHrefFromDOM();
if (base.length > 1) {
__webpack_public_path__ = base + "/dist/";
}
public authService: AuthService,
private readonly router: Router,
private readonly settingsService: SettingsService,
private readonly jobService: JobService,
public readonly translate: TranslateService,
private readonly identityService: IdentityService,
private readonly platformLocation: PlatformLocation) {
const base = this.platformLocation.getBaseHrefFromDOM();
if (base.length > 1) {
__webpack_public_path__ = base + "/dist/";
}
this.translate.addLangs(["en", "de", "fr", "da", "es", "it", "nl", "sv", "no", "pl", "pt"]);
// this language will be used as a fallback when a translation isn't found in the current language
this.translate.setDefaultLang("en");
this.translate.addLangs(["en", "de", "fr", "da", "es", "it", "nl", "sv", "no", "pl", "pt"]);
// this language will be used as a fallback when a translation isn't found in the current language
this.translate.setDefaultLang("en");
// See if we can match the supported langs with the current browser lang
const browserLang: string = translate.getBrowserLang();
this.translate.use(browserLang.match(/en|fr|da|de|es|it|nl|sv|no|pl|pt/) ? browserLang : "en");
}
// See if we can match the supported langs with the current browser lang
const browserLang: string = translate.getBrowserLang();
this.translate.use(browserLang.match(/en|fr|da|de|es|it|nl|sv|no|pl|pt/) ? browserLang : "en");
}
public ngOnInit() {
this.user = this.authService.claims();
this.settingsService.getCustomization().subscribe(x => {
this.customizationSettings = x;
if(this.customizationSettings.useCustomPage) {
if (this.customizationSettings.useCustomPage) {
this.settingsService.getCustomPage().subscribe(c => {
this.customPageSettings = c;
if(!this.customPageSettings.title) {
if (!this.customPageSettings.title) {
this.customPageSettings.title = "Custom Page";
this.customPageSettings.fontAwesomeIcon = "fa-check";
}
@ -67,7 +67,7 @@ export class AppComponent implements OnInit {
}
});
this.settingsService.issueEnabled().subscribe(x => this.issuesEnabled = x);
this.settingsService.voteEnabled().subscribe(x => this.voteEnabled =x);
this.settingsService.voteEnabled().subscribe(x => this.voteEnabled = x);
this.router.events.subscribe((event: NavigationStart) => {
this.currentUrl = event.url;
@ -81,7 +81,7 @@ export class AppComponent implements OnInit {
this.jobService.getCachedUpdate().subscribe(x => {
this.updateAvailable = x;
},
err => this.checkedForUpdate = true );
err => this.checkedForUpdate = true);
}
}
});

@ -1,5 +1,5 @@
<div *ngIf="discoverResults" class="row">
<div class="col-lg-2 col-md-4 col-6" *ngFor="let result of discoverResults">
<discover-card [result]="result"></discover-card>
<div *ngIf="discoverResults" class="row" >
<div class="col-lg-2 col-md-4 col-6" *ngFor="let result of discoverResults" [@slideIn]>
<discover-card [result]="result"></discover-card>
</div>
</div>

@ -2,9 +2,18 @@ import { Component, OnInit } from "@angular/core";
import { SearchService } from "../services";
import { ISearchMovieResult, ISearchTvResult, RequestType } from "../interfaces";
import { IDiscoverCardResult } from "./interfaces";
import { trigger, transition, style, animate } from "@angular/animations";
@Component({
templateUrl: "./discover.component.html",
animations: [
trigger('slideIn', [
transition(':enter', [
style({transform: 'translateX(100%)'}),
animate('200ms ease-in', style({transform: 'translateY(0%)'}))
])
])
],
})
export class DiscoverComponent implements OnInit {

@ -52,6 +52,5 @@
</div>
<ng-template #template>
<router-outlet>
</router-outlet>
<router-outlet> </router-outlet>
</ng-template>

@ -3,11 +3,10 @@ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
@Component({
selector: 'app-my-nav',
templateUrl: './my-nav.component.html',
styleUrls: ['./my-nav.component.css']
styleUrls: ['./my-nav.component.css'],
})
export class MyNavComponent {

@ -1,5 +1,5 @@
<mat-form-field class="quater-width">
<input [(ngModel)]="searchText" (keyup)="search($event)" matInput [matAutocomplete]="auto">
<input [(ngModel)]="searchText" placeholder="Search" (keyup)="search($event)" matInput [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
<mat-option *ngFor="let result of searchResult" [value]="result">
<img src="https://image.tmdb.org/t/p/w92/{{result.poster_path}}" class="autocomplete-img" aria-hidden/>

Loading…
Cancel
Save