mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
!wip
This commit is contained in:
parent
b93dea489d
commit
09f365c039
14 changed files with 41 additions and 29 deletions
|
@ -168,7 +168,7 @@
|
|||
|
||||
|
||||
<div [ngClass]="user.name && roleClass()">
|
||||
<app-my-nav [showNav]="showNav" [applicationName]="applicationName" [username]="user.name" (logoutClick)="logOut();"
|
||||
<app-my-nav [showNav]="showNav" [isAdmin]="isAdmin" [applicationName]="applicationName" [username]="user.name" (logoutClick)="logOut();"
|
||||
(themeChange)="onSetTheme($event)"></app-my-nav>
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ export class AppComponent implements OnInit {
|
|||
public userAccessToken: string;
|
||||
public voteEnabled = false;
|
||||
public applicationName: string = "Ombi"
|
||||
public isAdmin: boolean;
|
||||
|
||||
private checkedForUpdate: boolean;
|
||||
|
||||
|
@ -61,6 +62,7 @@ export class AppComponent implements OnInit {
|
|||
const theme = localStorage.getItem("theme");
|
||||
this.onSetTheme(theme);
|
||||
this.user = this.authService.claims();
|
||||
this.isAdmin = this.authService.hasRole("admin");
|
||||
|
||||
this.settingsService.getCustomization().subscribe(x => {
|
||||
this.customizationSettings = x;
|
||||
|
|
|
@ -6,9 +6,7 @@ $card-background: #2b2b2b;
|
|||
}
|
||||
|
||||
.dark-card {
|
||||
background-color: $card-background;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
height: 435px;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,4 +31,5 @@ export interface INavBar {
|
|||
icon: string;
|
||||
name: string;
|
||||
link: string;
|
||||
requiresAdmin: boolean;
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
<mat-card-content>
|
||||
<p-carousel [value]="cast" [numVisible]="5" easing="easeOutStrong">
|
||||
<ng-template let-item pTemplate="item">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="row justify-content-md-center mat-card mat-card-flat">
|
||||
<div class="col-12">
|
||||
<img class="cast-profile-img" *ngIf="item.profile_path" src="https://image.tmdb.org/t/p/w300/{{item.profile_path}}">
|
||||
<img class="cast-profile-img" *ngIf="item.character?.image?.medium" [src]="item.character.image.medium">
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
@import "~@angular/material/theming";
|
||||
@import "~styles/variables.scss";
|
||||
.actor-background {
|
||||
.dark & {
|
||||
background: $backgroundTint-dark;
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ import { Component, Input } from "@angular/core";
|
|||
@Component({
|
||||
selector: "cast-carousel",
|
||||
templateUrl: "./cast-carousel.component.html",
|
||||
styleUrls: ["./cast-carousel.component.scss"]
|
||||
})
|
||||
export class CastCarouselComponent {
|
||||
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
<a *ngIf="homepage" class="media-icons" href="{{homepage}}" target="_blank">
|
||||
<i matTooltip="Homepage" class="fa fa-home fa-2x grow"></i>
|
||||
<i matTooltip="Homepage" class="fa fa-home fa-2x grow-social"></i>
|
||||
</a>
|
||||
|
||||
<a *ngIf="theMoviedbId" href="https://www.themoviedb.org/movie/theMoviedbId" class="media-icons"
|
||||
target="_blank">
|
||||
<i matTooltip="The Movie DB" class="fa fa-film fa-2x grow"></i>
|
||||
<i matTooltip="The Movie DB" class="fa fa-film fa-2x grow-social"></i>
|
||||
</a>
|
||||
<a *ngIf="tvdbId" href="https://www.thetvdb.org/tv/{{tvdbId}}" class="media-icons" target="_blank">
|
||||
<i matTooltip="The TV DB" class="fa fa-tv fa-2x grow"></i>
|
||||
<i matTooltip="The TV DB" class="fa fa-tv fa-2x grow-social"></i>
|
||||
</a>
|
||||
|
||||
<a *ngIf="hasTrailer" class="media-icons" (click)="openDialog()"><i
|
||||
matTooltip="Trailer" class="fa fa-youtube-play fa-2x grow"></i></a>
|
||||
matTooltip="Trailer" class="fa fa-youtube-play fa-2x grow-social"></i></a>
|
||||
|
||||
<a *ngIf="imdbId" class="media-icons" href="https://imdb.com/title/{{imdbId}}"
|
||||
target="_blank">
|
||||
<i matTooltip="Imdb" class="fa fa-imdb fa-2x grow"></i>
|
||||
<i matTooltip="Imdb" class="fa fa-imdb fa-2x grow-social"></i>
|
||||
</a>
|
||||
<a *ngIf="twitter" class="media-icons"
|
||||
href="https://twitter.com/{{twitter}}" target="_blank">
|
||||
<i matTooltip="Twitter" class="fa fa-twitter fa-2x grow"></i>
|
||||
<i matTooltip="Twitter" class="fa fa-twitter fa-2x grow-social"></i>
|
||||
</a>
|
||||
<a *ngIf="facebook" class="media-icons"
|
||||
href="https://facebook.com/{{facebook}}" target="_blank">
|
||||
<i matTooltip="Facebook" class="fa fa-facebook fa-2x grow"></i>
|
||||
<i matTooltip="Facebook" class="fa fa-facebook fa-2x grow-social"></i>
|
||||
</a> <a *ngIf="instagram" class="media-icons"
|
||||
href="https://instagram.com/{{instagram}}" target="_blank">
|
||||
<i matTooltip="Instagram" class="fa fa-instagram fa-2x grow"></i>
|
||||
<i matTooltip="Instagram" class="fa fa-instagram fa-2x grow-social"></i>
|
||||
</a>
|
||||
|
||||
<span class="left-seperator" *ngIf="available">
|
||||
<a *ngIf="plexUrl" class="media-icons" href="{{plexUrl}}" target="_blank">
|
||||
<i matTooltip=" {{'Search.ViewOnPlex' | translate}}"
|
||||
class="fa fa-play-circle fa-2x grow"></i>
|
||||
class="fa fa-play-circle fa-2x grow-social"></i>
|
||||
</a>
|
||||
|
||||
<a *ngIf="embyUrl" class="media-icons" href="{{embyUrl}}" target="_blank">
|
||||
<i matTooltip=" {{'Search.ViewOnEmby' | translate}}"
|
||||
class="fa fa-play-circle fa-2x grow"></i>
|
||||
class="fa fa-play-circle fa-2x grow-social"></i>
|
||||
</a>
|
||||
|
||||
</span>
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
.grow-social {
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
.grow-social:hover {
|
||||
transform: scale(1.1);
|
||||
color: black;
|
||||
}
|
|
@ -3,6 +3,7 @@ import { Component, Inject, Input, Output, EventEmitter } from "@angular/core";
|
|||
@Component({
|
||||
selector: "social-icons",
|
||||
templateUrl: "./social-icons.component.html",
|
||||
styleUrls: ["./social-icons.component.scss"]
|
||||
})
|
||||
export class SocialIconsComponent {
|
||||
|
||||
|
|
|
@ -174,14 +174,6 @@
|
|||
width: 173px;
|
||||
}
|
||||
|
||||
.grow {
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
.grow:hover {
|
||||
transform: scale(1.1);
|
||||
color: black;
|
||||
}
|
||||
|
||||
.media-icons {
|
||||
color: mat-color($ombi-app-primary) !important;
|
||||
padding: 1%;
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
[mode]="(isHandset$ | async) ? 'over' : 'side'" [opened]="!(isHandset$ | async)">
|
||||
<mat-toolbar>{{applicationName}}</mat-toolbar>
|
||||
<mat-nav-list>
|
||||
<a *ngFor="let nav of navItems" mat-list-item [routerLink]="nav.link"
|
||||
<span *ngFor="let nav of navItems">
|
||||
<a *ngIf="nav.requiresAdmin && isAdmin || !nav.requiresAdmin" mat-list-item [routerLink]="nav.link"
|
||||
[routerLinkActive]="getTheme()" >
|
||||
<mat-icon aria-label="Side nav toggle icon">{{nav.icon}}</mat-icon>
|
||||
{{nav.name | translate}}
|
||||
</a>
|
||||
</a> </span>
|
||||
|
||||
<a class="bottom-nav-link" mat-list-item [routerLinkActive]="theme === 'dark' ? 'active-list-item-dark' : 'active-list-item'" aria-label="Toggle sidenav" (click)="logOut();">
|
||||
<mat-icon aria-label="Side nav toggle icon">exit_to_app</mat-icon>
|
||||
|
|
|
@ -19,6 +19,7 @@ export class MyNavComponent implements OnInit {
|
|||
@Input() public showNav: boolean;
|
||||
@Input() public applicationName: string;
|
||||
@Input() public username: string;
|
||||
@Input() public isAdmin: string;
|
||||
@Output() public logoutClick = new EventEmitter();
|
||||
@Output() public themeChange = new EventEmitter<string>();
|
||||
public theme: string;
|
||||
|
@ -31,10 +32,10 @@ export class MyNavComponent implements OnInit {
|
|||
}
|
||||
|
||||
public navItems: INavBar[] = [
|
||||
{ name: "NavigationBar.Discover", icon: "find_replace", link: "/discover" },
|
||||
{ name: "NavigationBar.Requests", icon: "list", link: "/requests-list" },
|
||||
{ name: "NavigationBar.UserManagement", icon: "account_circle", link: "/usermanagement" },
|
||||
{ name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About" },
|
||||
{ name: "NavigationBar.Discover", icon: "find_replace", link: "/discover", requiresAdmin: false },
|
||||
{ name: "NavigationBar.Requests", icon: "list", link: "/requests-list", requiresAdmin: false },
|
||||
{ name: "NavigationBar.UserManagement", icon: "account_circle", link: "/usermanagement", requiresAdmin: true },
|
||||
{ name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About", requiresAdmin: true },
|
||||
]
|
||||
|
||||
public logOut() {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
.ui-carousel-viewport {
|
||||
border:0 !important;
|
||||
background-color:$background !important;
|
||||
background-color:transparent !important;
|
||||
}
|
||||
|
||||
.ui-carousel .ui-carousel-header {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue