mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-22 14:13:36 -07:00
added to the UI
This commit is contained in:
parent
bf6ac5860d
commit
0b7fe0395b
10 changed files with 2345 additions and 3566 deletions
|
@ -81,8 +81,6 @@
|
||||||
"@storybook/addon-links": "^6.5.9",
|
"@storybook/addon-links": "^6.5.9",
|
||||||
"@storybook/angular": "^6.5.9",
|
"@storybook/angular": "^6.5.9",
|
||||||
"@storybook/builder-webpack5": "^6.5.9",
|
"@storybook/builder-webpack5": "^6.5.9",
|
||||||
"@storybook/cli": "^6.5.9",
|
|
||||||
"@storybook/jest": "^0.0.10",
|
|
||||||
"@storybook/manager-webpack5": "^6.5.9",
|
"@storybook/manager-webpack5": "^6.5.9",
|
||||||
"@storybook/testing-library": "^0.0.13",
|
"@storybook/testing-library": "^0.0.13",
|
||||||
"@storybook/preset-scss": "^1.0.3",
|
"@storybook/preset-scss": "^1.0.3",
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
<div class="detailed-container">
|
<div class="detailed-container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-5">
|
<div class="col-5 posterColumn">
|
||||||
<ombi-image [src]="request.posterPath" [type]="request.requestType" class="poster" alt="{{request.title}}">
|
<ombi-image [src]="request.posterPath" [type]="request.requestType" class="poster" alt="{{request.title}}">
|
||||||
</ombi-image>
|
</ombi-image>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,21 +57,16 @@
|
||||||
<div class="col-12 title">
|
<div class="col-12 title">
|
||||||
<h3>{{request.title}}</h3>
|
<h3>{{request.title}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 overview">
|
<div class="col-12">
|
||||||
<p>{{request.overview}}</p>
|
<p>Requested By: {{request.username}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<span>Requested By: {{request.userName}}</span>
|
<p>On: {{request.requestDate | amFromUtc | amLocal | amUserLocale | amDateFormat: 'l LT'}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<span>On: {{request.requestDate | amFromUtc | amLocal | amUserLocale | amDateFormat: 'l LT'}}</span>
|
<p>Status: <span class="badge badge-{{getClass(request)}}">{{getStatus(request) | translate}}</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-4">
|
|
||||||
<button>Request</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
|
@ -1,7 +1,30 @@
|
||||||
|
@import "~styles/variables.scss";
|
||||||
|
|
||||||
.detailed-container {
|
.detailed-container {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
|
height: auto;
|
||||||
|
margin: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid $ombi-background-primary-accent;
|
||||||
|
|
||||||
|
background-color: $ombi-background-accent;
|
||||||
|
|
||||||
|
.top-spacing {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overview {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 4;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posterColumn {
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
::ng-deep .poster {
|
::ng-deep .poster {
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
import { OmbiCommonModules } from "../modules";
|
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from "@angular/core";
|
||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from "@angular/core";
|
|
||||||
import { IRecentlyRequested, RequestType } from "../../interfaces";
|
import { IRecentlyRequested, RequestType } from "../../interfaces";
|
||||||
import { ImageComponent } from "../image/image.component";
|
|
||||||
import { ImageService } from "app/services";
|
import { ImageService } from "app/services";
|
||||||
import { Subject, takeUntil } from "rxjs";
|
import { Subject, takeUntil } from "rxjs";
|
||||||
import { PipeModule } from "app/pipes/pipe.module";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
standalone: true,
|
standalone: false,
|
||||||
selector: 'ombi-detailed-card',
|
selector: 'ombi-detailed-card',
|
||||||
imports: [...OmbiCommonModules, ImageComponent, PipeModule],
|
|
||||||
providers: [ImageService],
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
templateUrl: './detailed-card.component.html',
|
templateUrl: './detailed-card.component.html',
|
||||||
styleUrls: ['./detailed-card.component.scss']
|
styleUrls: ['./detailed-card.component.scss']
|
||||||
|
@ -34,11 +29,31 @@ import { PipeModule } from "app/pipes/pipe.module";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public submitRequest(is4k: boolean) {
|
public submitRequest(is4k: boolean) {
|
||||||
this.onRequest.emit(is4k);
|
this.onRequest.emit(is4k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getStatus(request: IRecentlyRequested) {
|
||||||
|
if (request.available) {
|
||||||
|
return "Common.Available";
|
||||||
|
}
|
||||||
|
if (request.approved) {
|
||||||
|
return "Common.Approved";
|
||||||
|
} else {
|
||||||
|
return "Common.Pending";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public getClass(request: IRecentlyRequested) {
|
||||||
|
if (request.available) {
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
|
if (request.approved) {
|
||||||
|
return "primary";
|
||||||
|
} else {
|
||||||
|
return "info";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.$imageSub.next();
|
this.$imageSub.next();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { HttpClientModule } from "@angular/common/http";
|
|
||||||
import { MomentModule } from "ngx-moment";
|
import { MomentModule } from "ngx-moment";
|
||||||
|
|
||||||
export const OmbiCommonModules = [ CommonModule, HttpClientModule, MomentModule ];
|
export const OmbiCommonModules = [ CommonModule, MomentModule ];
|
|
@ -11,6 +11,7 @@ import { RecentlyRequestedListComponent } from "./recently-requested-list/recent
|
||||||
import { MatDialog } from "@angular/material/dialog";
|
import { MatDialog } from "@angular/material/dialog";
|
||||||
import { RequestServiceV2 } from "../../services/requestV2.service";
|
import { RequestServiceV2 } from "../../services/requestV2.service";
|
||||||
import { Routes } from "@angular/router";
|
import { Routes } from "@angular/router";
|
||||||
|
import { DetailedCardComponent } from "app/components";
|
||||||
|
|
||||||
export const components: any[] = [
|
export const components: any[] = [
|
||||||
DiscoverComponent,
|
DiscoverComponent,
|
||||||
|
@ -20,6 +21,7 @@ export const components: any[] = [
|
||||||
DiscoverSearchResultsComponent,
|
DiscoverSearchResultsComponent,
|
||||||
CarouselListComponent,
|
CarouselListComponent,
|
||||||
RecentlyRequestedListComponent,
|
RecentlyRequestedListComponent,
|
||||||
|
DetailedCardComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const providers: any[] = [
|
export const providers: any[] = [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<p-carousel #carousel [numVisible]="7" [numScroll]="0" [page]="0" [value]="requests" [responsiveOptions]="responsiveOptions">
|
<p-carousel #carousel [numVisible]="4" [numScroll]="7" [page]="0" [value]="requests" [responsiveOptions]="responsiveOptions">
|
||||||
<ng-template let-result pTemplate="item">
|
<ng-template let-result pTemplate="item">
|
||||||
{{result.title}}
|
<ombi-detailed-card [request]="result"></ombi-detailed-card>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-carousel>
|
</p-carousel>
|
|
@ -8,7 +8,7 @@ import { PipeModule } from "../pipes/pipe.module";
|
||||||
import { RouterModule } from "@angular/router";
|
import { RouterModule } from "@angular/router";
|
||||||
import { SharedModule } from "../shared/shared.module";
|
import { SharedModule } from "../shared/shared.module";
|
||||||
import { SkeletonModule } from 'primeng/skeleton';
|
import { SkeletonModule } from 'primeng/skeleton';
|
||||||
import { DetailedCardComponent, ImageComponent } from 'app/components';
|
import { ImageComponent } from 'app/components';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -20,7 +20,6 @@ import { DetailedCardComponent, ImageComponent } from 'app/components';
|
||||||
InfiniteScrollModule,
|
InfiniteScrollModule,
|
||||||
SkeletonModule,
|
SkeletonModule,
|
||||||
ImageComponent,
|
ImageComponent,
|
||||||
DetailedCardComponent,
|
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...fromComponents.components
|
...fromComponents.components
|
||||||
|
|
|
@ -4,7 +4,7 @@ export interface IRecentlyRequested {
|
||||||
requestId: number;
|
requestId: number;
|
||||||
requestType: RequestType;
|
requestType: RequestType;
|
||||||
userId: string;
|
userId: string;
|
||||||
userName: string;
|
username: string;
|
||||||
available: boolean;
|
available: boolean;
|
||||||
tvPartiallyAvailable: boolean;
|
tvPartiallyAvailable: boolean;
|
||||||
requestDate: Date;
|
requestDate: Date;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue