diff --git a/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.html b/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.html new file mode 100644 index 000000000..f6072be5f --- /dev/null +++ b/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.html @@ -0,0 +1,56 @@ +
+
+
+ {{data.title}} +
+
+ +
+
+

{{data.title}}

+
+ +
+
+
+ Availability: Unavailable +
+
+ Studio: Studio1 +
+
+ Request Status: Studio1 +
+
+ Director: Studio1 +
+
+ In Cinemas: Studio1 +
+
+ Writer: Studio1 +
+
+ +
+
+ {{data.overview}} +
+
+ + +
+ +
+
+
+
+
+ +
+
+ +
\ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.scss b/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.scss new file mode 100644 index 000000000..261093db2 --- /dev/null +++ b/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.scss @@ -0,0 +1,31 @@ +$ombi-primary:#3f3f3f; +$ombi-primary-700:#313131; +$ombi-accent-700:#166d50; +.poster { + max-width: 100%; + border-radius: 2%; +} + +.details { + background: $ombi-primary-700; + padding: 2%; + border-radius: 10px; +} + +.details strong { + font-weight: bold; +} + +h3 strong { + font-weight: bold; +} + +.request-btn { + background-color: $ombi-accent-700; + color: white; +} + +.action-buttons-right { + width: 100%; + text-align: right; +} \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.ts b/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.ts new file mode 100644 index 000000000..ebe19f87f --- /dev/null +++ b/src/Ombi/ClientApp/src/app/discover/card/discover-card-details.component.ts @@ -0,0 +1,18 @@ +import { Component, Inject } from "@angular/core"; +import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material"; +import { IDiscoverCardResult } from "../interfaces"; + +@Component({ + selector: "discover-card-details", + templateUrl: "./discover-card-details.component.html", + styleUrls: ["./discover-card-details.component.scss"], +}) +export class DiscoverCardDetailsComponent { + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: IDiscoverCardResult) { } + + onNoClick(): void { + this.dialogRef.close(); + } +} diff --git a/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.html b/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.html index 4d33acb77..efb6571dc 100644 --- a/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.html +++ b/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.html @@ -5,13 +5,12 @@ -
{{result.title}}
-
{{result.title}}
+
{{result.title}}
{{result.title | truncate:13}}
- {{result.overview | truncate: 25}} + {{result.overview | truncate: 50}}
- diff --git a/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.scss b/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.scss index 5c46170ee..105be5db7 100644 --- a/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.scss +++ b/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.scss @@ -1,6 +1,6 @@ $ombi-primary:#3f3f3f; #cardImage { - max-height: 153px; + max-height: 163px; border-radius: 5px 5px 0px 0px; } @@ -8,12 +8,14 @@ $ombi-primary:#3f3f3f; background-color: $ombi-primary; border-radius: 8px; color: white; + height: 360px; } .card-spacing { margin-top: 10%; } + .rating { position: absolute; font-weight: bold; @@ -38,4 +40,10 @@ $border-width: 2px; .grow:hover { transform: scale(1.1); +} + +::ng-deep mat-dialog-container.mat-dialog-container { + background-color: $ombi-primary; + color: white; + border-radius: 2% } \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.ts b/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.ts index 99aca27ff..4c958e77e 100644 --- a/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.ts +++ b/src/Ombi/ClientApp/src/app/discover/card/discover-card.component.ts @@ -2,6 +2,8 @@ import { Component, OnInit, Input } from "@angular/core"; import { IDiscoverCardResult } from "../interfaces"; import { RequestType, ISearchTvResult, ISearchMovieResult } from "../../interfaces"; import { SearchService } from "../../services"; +import { MatDialog } from "@angular/material"; +import { DiscoverCardDetailsComponent } from "./discover-card-details.component"; @Component({ selector: "discover-card", @@ -13,7 +15,7 @@ export class DiscoverCardComponent implements OnInit { @Input() public result: IDiscoverCardResult; public RequestType = RequestType; - constructor(private searchService: SearchService) { } + constructor(private searchService: SearchService, private dialog: MatDialog) { } public ngOnInit() { if (this.result.type == RequestType.tvShow) { @@ -23,6 +25,14 @@ export class DiscoverCardComponent implements OnInit { this.getExtraMovieInfo(); } } + + public openDetails(details: IDiscoverCardResult) { + const ref = this.dialog.open(DiscoverCardDetailsComponent, { width:"700px", data: details }) + + ref.afterClosed().subscribe(result => { + console.log('The dialog was closed'); + }); + } public getExtraTvInfo() { this.searchService.getShowInformation(this.result.id) diff --git a/src/Ombi/ClientApp/src/app/discover/discover.component.html b/src/Ombi/ClientApp/src/app/discover/discover.component.html index d026d3991..72b5879c1 100644 --- a/src/Ombi/ClientApp/src/app/discover/discover.component.html +++ b/src/Ombi/ClientApp/src/app/discover/discover.component.html @@ -1,6 +1,6 @@
-
+
diff --git a/src/Ombi/ClientApp/src/app/discover/discover.component.scss b/src/Ombi/ClientApp/src/app/discover/discover.component.scss index a1ae23db7..4fc5ac7d6 100644 --- a/src/Ombi/ClientApp/src/app/discover/discover.component.scss +++ b/src/Ombi/ClientApp/src/app/discover/discover.component.scss @@ -6,4 +6,9 @@ .small-middle-container{ margin: auto; width: 95%; +} + +.small-padding { + padding-left: 5px; + padding-right: 5px; } \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/discover/discover.module.ts b/src/Ombi/ClientApp/src/app/discover/discover.module.ts index 7e9cb9494..6a1818fb5 100644 --- a/src/Ombi/ClientApp/src/app/discover/discover.module.ts +++ b/src/Ombi/ClientApp/src/app/discover/discover.module.ts @@ -8,6 +8,8 @@ import { DiscoverComponent } from "./discover.component"; import { DiscoverCardComponent } from "./card/discover-card.component"; import { AuthGuard } from "../auth/auth.guard"; import { PipeModule } from "../pipes/pipe.module"; +import { DiscoverCardDetailsComponent } from "./card/discover-card-details.component"; +import { MatDialog } from "@angular/material"; const routes: Routes = [ { path: "", component: DiscoverComponent, canActivate: [AuthGuard] }, @@ -20,13 +22,18 @@ const routes: Routes = [ ], declarations: [ DiscoverComponent, - DiscoverCardComponent + DiscoverCardComponent, + DiscoverCardDetailsComponent, + ], + entryComponents: [ + DiscoverCardDetailsComponent ], exports: [ RouterModule, ], providers: [ - SearchService + SearchService, + MatDialog, ], }) diff --git a/src/Ombi/ClientApp/src/app/shared/shared.module.ts b/src/Ombi/ClientApp/src/app/shared/shared.module.ts index 32abf33ae..34678f4b7 100644 --- a/src/Ombi/ClientApp/src/app/shared/shared.module.ts +++ b/src/Ombi/ClientApp/src/app/shared/shared.module.ts @@ -11,7 +11,7 @@ import { InputSwitchModule, SidebarModule } from "primeng/primeng"; import { MatButtonModule, MatNativeDateModule, MatIconModule, MatSidenavModule, MatListModule, MatToolbarModule, MatTooltipModule} from '@angular/material'; - import { MatCardModule, MatInputModule, MatTabsModule, MatAutocompleteModule, MatCheckboxModule, MatExpansionModule } from "@angular/material"; + import { MatCardModule, MatInputModule, MatTabsModule, MatAutocompleteModule, MatCheckboxModule, MatExpansionModule, MatDialogModule } from "@angular/material"; @NgModule({ declarations: [ @@ -36,6 +36,7 @@ import { MatToolbarModule, MatCheckboxModule, MatExpansionModule, + MatDialogModule, ], exports: [ TranslateModule, @@ -58,6 +59,7 @@ import { MatAutocompleteModule, MatCheckboxModule, MatExpansionModule, + MatDialogModule, ], }) export class SharedModule {}