From e28f3b876b199d86bd3c71c6cb08908180bfac2f Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 30 Jan 2021 22:42:39 +0000 Subject: [PATCH 01/15] Added the new font awesome icons --- src/Ombi/ClientApp/angular.json | 5 ++- src/Ombi/ClientApp/package.json | 2 +- src/Ombi/ClientApp/src/app/app.component.html | 2 +- .../app/custompage/custompage.component.html | 4 +-- .../card/discover-card-details.component.html | 34 +++++++++---------- .../card/discover-card.component.html | 2 +- .../grid/discover-grid.component.html | 20 +++++------ .../search-results.component.html | 2 +- .../app/issues/issueDetails.component.html | 2 +- .../landingpage/landingpage.component.html | 10 +++--- .../src/app/login/login.component.html | 2 +- .../artist/artist-details.component.html | 24 ++++++------- .../movie/movie-details.component.html | 26 +++++++------- .../social-icons/social-icons.component.html | 18 +++++----- .../components/tv/tv-details.component.html | 10 +++--- .../src/app/my-nav/my-nav.component.html | 2 +- .../src/app/my-nav/my-nav.component.ts | 2 +- .../app/requests/movierequests.component.html | 28 +++++++-------- .../music/musicrequests.component.html | 30 ++++++++-------- .../src/app/requests/request.component.html | 6 ++-- .../tvrequest-children.component.html | 16 ++++----- .../app/requests/tvrequests.component.html | 8 ++--- .../src/app/search/moviesearch.component.html | 32 ++++++++--------- .../app/search/moviesearchgrid.component.html | 20 +++++------ .../search/music/albumsearch.component.html | 16 ++++----- .../search/music/artistsearch.component.html | 8 ++--- .../search/music/musicsearch.component.html | 6 ++-- .../src/app/search/search.component.html | 6 ++-- .../src/app/search/tvsearch.component.html | 18 +++++----- .../couchpotato/couchpotato.component.html | 2 +- .../failedrequests.component.html | 2 +- .../app/settings/lidarr/lidarr.component.html | 6 ++-- .../notifications/webhook.component.html | 2 +- .../src/app/settings/ombi/ombi.component.html | 2 +- .../src/app/settings/plex/plex.component.html | 4 +-- .../app/settings/radarr/radarr.component.html | 4 +-- .../app/settings/settingsmenu.component.html | 14 ++++---- .../app/settings/sonarr/sonarr.component.html | 8 ++--- .../src/app/vote/vote.component.html | 12 +++---- .../src/app/wizard/plex/plex.component.html | 2 +- src/Ombi/ClientApp/yarn.lock | 9 ++--- 41 files changed, 216 insertions(+), 212 deletions(-) diff --git a/src/Ombi/ClientApp/angular.json b/src/Ombi/ClientApp/angular.json index cd17cccc0..2e3ff44e5 100644 --- a/src/Ombi/ClientApp/angular.json +++ b/src/Ombi/ClientApp/angular.json @@ -29,7 +29,10 @@ "src/styles/_imports.scss", "node_modules/bootstrap/scss/bootstrap.scss", "node_modules/primeng/resources/themes/md-dark-deeppurple/theme.css", - "node_modules/font-awesome/scss/font-awesome.scss", + "node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss", + "node_modules/@fortawesome/fontawesome-free/scss/regular.scss", + "node_modules/@fortawesome/fontawesome-free/scss/solid.scss", + "node_modules/@fortawesome/fontawesome-free/scss/brands.scss", "node_modules/primeng/resources/primeng.min.css", "node_modules/primeicons/primeicons.css", "node_modules/please-wait/src/please-wait.scss", diff --git a/src/Ombi/ClientApp/package.json b/src/Ombi/ClientApp/package.json index 777dcfe8c..6c1713eff 100644 --- a/src/Ombi/ClientApp/package.json +++ b/src/Ombi/ClientApp/package.json @@ -24,6 +24,7 @@ "@angularclass/hmr": "^2.1.3", "@aspnet/signalr": "^1.1.0", "@auth0/angular-jwt": "^2.1.0", + "@fortawesome/fontawesome-free": "^5.15.2", "@fullcalendar/core": "^4.2.0", "@fullcalendar/daygrid": "^4.4.0", "@fullcalendar/interaction": "^4.2.0", @@ -39,7 +40,6 @@ "chart.js": "2.9.4", "core-js": "^2.5.4", "eventemitter2": "^5.0.1", - "font-awesome": "^4.7.0", "fullcalendar": "^4.0.0-alpha.4", "jquery": "3.3.1", "lodash": "^4.17.20", diff --git a/src/Ombi/ClientApp/src/app/app.component.html b/src/Ombi/ClientApp/src/app/app.component.html index f5f2d82eb..a8e527a6b 100644 --- a/src/Ombi/ClientApp/src/app/app.component.html +++ b/src/Ombi/ClientApp/src/app/app.component.html @@ -45,7 +45,7 @@ diff --git a/src/Ombi/ClientApp/src/app/custompage/custompage.component.html b/src/Ombi/ClientApp/src/app/custompage/custompage.component.html index d35c94141..ae2d00eb7 100644 --- a/src/Ombi/ClientApp/src/app/custompage/custompage.component.html +++ b/src/Ombi/ClientApp/src/app/custompage/custompage.component.html @@ -5,7 +5,7 @@
@@ -14,7 +14,7 @@
diff --git a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.html b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.html index d7bac2d96..3ac12d570 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.html +++ b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card-details.component.html @@ -16,35 +16,35 @@ + class="fas fa-play-circle fa-2x grow"> + class="fas fa-play-circle fa-2x grow"> + class="fas fa-play-circle fa-2x grow"> + class="fas fa-play-circle fa-2x grow"> + class="fas fa-play-circle fa-2x grow"> + class="fas fa-play-circle fa-2x grow"> - +
@@ -123,14 +123,14 @@ - @@ -140,27 +140,27 @@ + {{'Common.Available' | translate }} + {{'Common.PartiallyAvailable' | translate }} {{'Search.ViewOnPlex' | + href="{{tv.plexUrl}}" target="_blank"> {{'Search.ViewOnPlex' | translate}} {{'Search.ViewOnEmby' | + target="_blank"> {{'Search.ViewOnEmby' | translate}} {{'Search.ViewOnJellyfin' | + target="_blank"> {{'Search.ViewOnJellyfin' | translate}}
diff --git a/src/Ombi/ClientApp/src/app/discover/components/grid/discover-grid.component.html b/src/Ombi/ClientApp/src/app/discover/components/grid/discover-grid.component.html index e413cc372..959538444 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/grid/discover-grid.component.html +++ b/src/Ombi/ClientApp/src/app/discover/components/grid/discover-grid.component.html @@ -118,14 +118,14 @@ *ngIf="movie.requested || movie.approved; then requestedBtn else notRequestedBtn"> @@ -135,7 +135,7 @@ diff --git a/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html b/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html index 965017163..5a8ad4b42 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html +++ b/src/Ombi/ClientApp/src/app/discover/components/search-results/search-results.component.html @@ -9,7 +9,7 @@
-

{{'Discovery.NoSearch' | translate}}

+

{{'Discovery.NoSearch' | translate}}

\ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/issues/issueDetails.component.html b/src/Ombi/ClientApp/src/app/issues/issueDetails.component.html index 44be113c6..c2de76c2b 100644 --- a/src/Ombi/ClientApp/src/app/issues/issueDetails.component.html +++ b/src/Ombi/ClientApp/src/app/issues/issueDetails.component.html @@ -61,7 +61,7 @@
-
+

{{comment.comment}}

diff --git a/src/Ombi/ClientApp/src/app/landingpage/landingpage.component.html b/src/Ombi/ClientApp/src/app/landingpage/landingpage.component.html index 298ce4c11..7f5d13c3c 100644 --- a/src/Ombi/ClientApp/src/app/landingpage/landingpage.component.html +++ b/src/Ombi/ClientApp/src/app/landingpage/landingpage.component.html @@ -13,21 +13,21 @@
-

 Notice

+

 Notice


- +
-

{{ 'LandingPage.OnlineHeading' | translate }}

+

{{ 'LandingPage.OnlineHeading' | translate }}

-

{{ 'LandingPage.PartiallyOnlineHeading' | translate }}

+

{{ 'LandingPage.PartiallyOnlineHeading' | translate }}

There is {{mediaServerStatus.serversUnavailable}} server offline out of {{mediaServerStatus.totalServers}}.

@@ -35,7 +35,7 @@
-

{{ 'LandingPage.OfflineHeading' | translate }}

+

{{ 'LandingPage.OfflineHeading' | translate }}

diff --git a/src/Ombi/ClientApp/src/app/login/login.component.html b/src/Ombi/ClientApp/src/app/login/login.component.html index d48b58e31..ced032260 100644 --- a/src/Ombi/ClientApp/src/app/login/login.component.html +++ b/src/Ombi/ClientApp/src/app/login/login.component.html @@ -40,7 +40,7 @@
diff --git a/src/Ombi/ClientApp/src/app/media-details/components/artist/artist-details.component.html b/src/Ombi/ClientApp/src/app/media-details/components/artist/artist-details.component.html index 46c5b97c9..1a7db7f91 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/artist/artist-details.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/artist/artist-details.component.html @@ -23,12 +23,12 @@
+ {{ 'MediaDetails.RequestAllAlbums' | translate }} + {{ 'MediaDetails.RequestSelectedAlbums' | translate }} + {{ 'MediaDetails.ClearSelection' | translate }} @@ -39,39 +39,39 @@ --> diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html index 6e809c90d..0aff4e4f6 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html @@ -41,15 +41,15 @@ {{'Search.ViewOnPlex' | translate}} - + {{'Search.ViewOnEmby' | translate}} - + {{'Search.ViewOnJellyfin' | translate}} - +
diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html index 0cde69b8b..565af2127 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html @@ -1,32 +1,32 @@ diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html index 368341b3d..cb23212d2 100644 --- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html +++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.html @@ -29,7 +29,7 @@ {{nav.icon}} -  {{nav.name | translate}} diff --git a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts index 9a5ec794c..d7216d114 100644 --- a/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts +++ b/src/Ombi/ClientApp/src/app/my-nav/my-nav.component.ts @@ -87,7 +87,7 @@ export class MyNavComponent implements OnInit { // { name: "NavigationBar.Calendar", icon: "calendar_today", link: "/calendar", requiresAdmin: false, enabled: true }, { name: "NavigationBar.Donate", icon: "attach_money", link: "https://www.paypal.me/PlexRequestsNet", externalLink: true, requiresAdmin: true, enabled: true, toolTip: true, style: "color:red;", toolTipMessage: 'NavigationBar.DonateTooltip', faIcon: null }, { name: "NavigationBar.Donate", icon: "attach_money", link: customizationSettings.customDonationUrl, externalLink: true, requiresAdmin: false, enabled: customizationSettings.enableCustomDonations, toolTip: true, toolTipMessage: customizationSettings.customDonationMessage, faIcon: null }, - { name: "NavigationBar.FeatureSuggestion", icon: null, link: "https://features.ombi.io/", externalLink: true, requiresAdmin: true, enabled: true, toolTip: true, toolTipMessage: 'NavigationBar.FeatureSuggestionTooltip', faIcon: "fa-lightbulb-o" }, + { name: "NavigationBar.FeatureSuggestion", icon: null, link: "https://features.ombi.io/", externalLink: true, requiresAdmin: true, enabled: true, toolTip: true, toolTipMessage: 'NavigationBar.FeatureSuggestionTooltip', faIcon: "fa-lightbulb" }, { name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About", requiresAdmin: true, enabled: true, faIcon: null }, { name: "NavigationBar.UserPreferences", icon: "person", link: "/user-preferences", requiresAdmin: false, enabled: true, faIcon: null }, ]; diff --git a/src/Ombi/ClientApp/src/app/requests/movierequests.component.html b/src/Ombi/ClientApp/src/app/requests/movierequests.component.html index 3f8485fce..ad82ffbb9 100644 --- a/src/Ombi/ClientApp/src/app/requests/movierequests.component.html +++ b/src/Ombi/ClientApp/src/app/requests/movierequests.component.html @@ -4,13 +4,13 @@ (keyup)="search($event)">
{{ 'Requests.Denied' | translate }} - +
@@ -124,11 +124,11 @@ - + - +
@@ -137,14 +137,14 @@
@@ -186,11 +186,11 @@
@@ -200,14 +200,14 @@
+ {{ 'Filter.ClearFilter' | translate }} diff --git a/src/Ombi/ClientApp/src/app/requests/music/musicrequests.component.html b/src/Ombi/ClientApp/src/app/requests/music/musicrequests.component.html index 3565898ed..9f5e08fdd 100644 --- a/src/Ombi/ClientApp/src/app/requests/music/musicrequests.component.html +++ b/src/Ombi/ClientApp/src/app/requests/music/musicrequests.component.html @@ -4,13 +4,13 @@ (keyup)="search($event)"> @@ -32,9 +32,9 @@ - -
- +

OR

diff --git a/src/Ombi/ClientApp/yarn.lock b/src/Ombi/ClientApp/yarn.lock index a834d8bdf..d976c8be5 100644 --- a/src/Ombi/ClientApp/yarn.lock +++ b/src/Ombi/ClientApp/yarn.lock @@ -1126,6 +1126,11 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@fortawesome/fontawesome-free@^5.15.2": + version "5.15.2" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.2.tgz#218cd7276ab4f9ab57cc3d2efa2697e6a579f25d" + integrity sha512-7l/AX41m609L/EXI9EKH3Vs3v0iA8tKlIOGtw+kgcoanI7p+e4I4GYLqW3UXWiTnjSFymKSmTTPKYrivzbxxqA== + "@fullcalendar/core@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@fullcalendar/core/-/core-4.4.0.tgz#79dbc0cca836ce628a07e739a456da11ff141373" @@ -3841,10 +3846,6 @@ follow-redirects@^1.0.0: dependencies: debug "=3.1.0" -font-awesome@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" - for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" From cd99a876c979d7772b38eca3beddf1c1cb2efc59 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 30 Jan 2021 23:22:40 +0000 Subject: [PATCH 02/15] Moved the videos into a carousel and outside of the accordion on the movies page --- src/Ombi/Attributes/WizardActionFilter.cs | 26 ++++++++++++++ .../movie/movie-details.component.html | 31 ++++++++-------- .../media-details.component.scss | 4 +++ .../src/styles/primeng-overrides.scss | 6 ++-- src/Ombi/Controllers/V2/WizardController.cs | 35 +++++++++++++++++++ src/Ombi/Startup.cs | 2 ++ 6 files changed, 87 insertions(+), 17 deletions(-) create mode 100644 src/Ombi/Attributes/WizardActionFilter.cs create mode 100644 src/Ombi/Controllers/V2/WizardController.cs diff --git a/src/Ombi/Attributes/WizardActionFilter.cs b/src/Ombi/Attributes/WizardActionFilter.cs new file mode 100644 index 000000000..644256d08 --- /dev/null +++ b/src/Ombi/Attributes/WizardActionFilter.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; +using Ombi.Core.Settings; +using Ombi.Settings.Settings.Models; +using System.Threading.Tasks; + +namespace Ombi.Attributes +{ + public class WizardActionFilter : IAsyncActionFilter + { + public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) + { + var settingsService = context.HttpContext.RequestServices.GetRequiredService>(); + + var settings = await settingsService.GetSettingsAsync(); + + if (!settings.Wizard) + { + await next(); + return; + } + context.Result = new UnauthorizedResult(); + } + } +} diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html index 0aff4e4f6..f23735c46 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html @@ -125,6 +125,23 @@ + + +
+
+ + + + + +
+
+
@@ -172,20 +189,6 @@
- - - - {{'MediaDetails.VideosTitle' | translate}} - - - -
- -
- -
-
-
diff --git a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss index e8ed3e2e1..1923f9c09 100644 --- a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss @@ -255,3 +255,7 @@ border: 1px solid #00a4dc; color: #00a4dc; } + +::ng-deep .p-carousel-indicators { + display: none !important; + } diff --git a/src/Ombi/ClientApp/src/styles/primeng-overrides.scss b/src/Ombi/ClientApp/src/styles/primeng-overrides.scss index 4ccb0765e..e8c023644 100644 --- a/src/Ombi/ClientApp/src/styles/primeng-overrides.scss +++ b/src/Ombi/ClientApp/src/styles/primeng-overrides.scss @@ -9,10 +9,10 @@ .ui-carousel-viewport { border:0 !important; - background-color:transparent !important; + background-color:transparent !important; } .ui-carousel .ui-carousel-header { background-color:transparent !important; - border: 0 !important; -} \ No newline at end of file + border: 0 !important; +} diff --git a/src/Ombi/Controllers/V2/WizardController.cs b/src/Ombi/Controllers/V2/WizardController.cs new file mode 100644 index 000000000..e7fa82fec --- /dev/null +++ b/src/Ombi/Controllers/V2/WizardController.cs @@ -0,0 +1,35 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; +using Ombi.Attributes; +using Ombi.Core.Settings; +using Ombi.Settings.Settings.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Ombi.Controllers.V2 +{ + [ServiceFilter(typeof(WizardActionFilter))] + [AllowAnonymous] + public class WizardController : V2Controller + { + + private ISettingsService _ombiSettings { get; } + + + [HttpGet] + public IActionResult Ok() + { + return Ok(); + } + + + + + } + + +} diff --git a/src/Ombi/Startup.cs b/src/Ombi/Startup.cs index fecaaccb3..56e28ce14 100644 --- a/src/Ombi/Startup.cs +++ b/src/Ombi/Startup.cs @@ -30,6 +30,7 @@ using Newtonsoft.Json; using ILogger = Serilog.ILogger; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Ombi.HealthChecks; +using Ombi.Attributes; namespace Ombi { @@ -97,6 +98,7 @@ namespace Ombi services.RegisterApplicationDependencies(); // Ioc and EF services.AddSwagger(); services.AddAppSettingsValues(Configuration); + services.AddScoped(); services.AddCors(o => o.AddPolicy("MyPolicy", builder => { From 069b8b5632a6b1334ccb547c8cbff761f85e6cf3 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 30 Jan 2021 23:41:23 +0000 Subject: [PATCH 03/15] Added the new Config API with the frontend services --- .../src/app/wizard/models/OmbiConfigModel.ts | 5 +++ .../src/app/wizard/services/wizard.service.ts | 18 ++++++++ .../ClientApp/src/app/wizard/wizard.module.ts | 2 + src/Ombi/Controllers/V2/WizardController.cs | 43 +++++++++++++------ src/Ombi/Models/V2/OmbiConfigModel.cs | 14 ++++++ 5 files changed, 70 insertions(+), 12 deletions(-) create mode 100644 src/Ombi/ClientApp/src/app/wizard/models/OmbiConfigModel.ts create mode 100644 src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts create mode 100644 src/Ombi/Models/V2/OmbiConfigModel.cs diff --git a/src/Ombi/ClientApp/src/app/wizard/models/OmbiConfigModel.ts b/src/Ombi/ClientApp/src/app/wizard/models/OmbiConfigModel.ts new file mode 100644 index 000000000..29e6e68a9 --- /dev/null +++ b/src/Ombi/ClientApp/src/app/wizard/models/OmbiConfigModel.ts @@ -0,0 +1,5 @@ +export interface IOmbiConfigModel { + applicationName: string; + applicationUrl: string; + logo: string; +} \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts b/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts new file mode 100644 index 000000000..0990ca384 --- /dev/null +++ b/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts @@ -0,0 +1,18 @@ +import { PlatformLocation, APP_BASE_HREF } from "@angular/common"; +import { HttpClient } from "@angular/common/http"; +import { Injectable, Inject } from "@angular/core"; +import { ICustomizationSettings } from "../../interfaces"; +import { ServiceHelpers } from "../../services"; +import { IOmbiConfigModel } from "../models/OmbiConfigModel"; + + +@Injectable() +export class WizardService extends ServiceHelpers { + constructor(public http: HttpClient, @Inject(APP_BASE_HREF) href:string) { + super(http, "/api/v2/wizard/", href); + } + + public async downvoteAlbum(config: IOmbiConfigModel): Promise { + return await this.http.post(`${this.url}config`, config, {headers: this.headers}).toPromise(); + } +} diff --git a/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts b/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts index 1e34a1de9..e088fa6b3 100644 --- a/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts +++ b/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts @@ -17,6 +17,7 @@ import { JellyfinService } from "../services"; import { PlexService } from "../services"; import { IdentityService } from "../services"; import { PlexOAuthService } from "../services"; +import { WizardService } from "./services/wizard.service"; import { SharedModule } from "../shared/shared.module"; @@ -54,6 +55,7 @@ const routes: Routes = [ EmbyService, JellyfinService, PlexOAuthService, + WizardService, ], }) diff --git a/src/Ombi/Controllers/V2/WizardController.cs b/src/Ombi/Controllers/V2/WizardController.cs index e7fa82fec..bb3bed5b6 100644 --- a/src/Ombi/Controllers/V2/WizardController.cs +++ b/src/Ombi/Controllers/V2/WizardController.cs @@ -1,13 +1,10 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.DependencyInjection; using Ombi.Attributes; using Ombi.Core.Settings; +using Ombi.Helpers; +using Ombi.Models.V2; using Ombi.Settings.Settings.Models; -using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace Ombi.Controllers.V2 @@ -16,20 +13,42 @@ namespace Ombi.Controllers.V2 [AllowAnonymous] public class WizardController : V2Controller { + private ISettingsService _customizationSettings { get; } - private ISettingsService _ombiSettings { get; } - - - [HttpGet] - public IActionResult Ok() + public WizardController(ISettingsService customizationSettings) { - return Ok(); + _customizationSettings = customizationSettings; } + [HttpPost("config")] + [ApiExplorerSettings(IgnoreApi =true)] + public async Task OmbiConfig([FromBody] OmbiConfigModel config) + { + if (config == null) + { + return BadRequest(); + } + var settings = await _customizationSettings.GetSettingsAsync(); + if (config.ApplicationName.HasValue()) + { + settings.ApplicationName = config.ApplicationName; + } - } + if(config.ApplicationUrl.HasValue()) + { + settings.ApplicationUrl = config.ApplicationUrl; + } + if(config.Logo.HasValue()) + { + settings.Logo = config.Logo; + } + await _customizationSettings.SaveSettingsAsync(settings); + + return new OkObjectResult(settings); + } + } } diff --git a/src/Ombi/Models/V2/OmbiConfigModel.cs b/src/Ombi/Models/V2/OmbiConfigModel.cs new file mode 100644 index 000000000..caecdfa2b --- /dev/null +++ b/src/Ombi/Models/V2/OmbiConfigModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Ombi.Models.V2 +{ + public class OmbiConfigModel + { + public string ApplicationName { get; set; } + public string ApplicationUrl { get; set; } + public string Logo { get; set; } + } +} From 440c3635d10e3649ec703d57ee0ba2e719304140 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 30 Jan 2021 23:41:58 +0000 Subject: [PATCH 04/15] Fixed methodname --- src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts b/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts index 0990ca384..d39bda9ed 100644 --- a/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts +++ b/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts @@ -12,7 +12,7 @@ export class WizardService extends ServiceHelpers { super(http, "/api/v2/wizard/", href); } - public async downvoteAlbum(config: IOmbiConfigModel): Promise { + public async addOmbiConfig(config: IOmbiConfigModel): Promise { return await this.http.post(`${this.url}config`, config, {headers: this.headers}).toPromise(); } } From 28d126ac14388f23925c4fd94b5757b70bf165ed Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 31 Jan 2021 01:37:36 +0100 Subject: [PATCH 05/15] WIP wizard --- .../media-details.component.scss | 2 +- .../app/wizard/welcome/welcome.component.html | 24 ++++++++-- .../app/wizard/welcome/welcome.component.scss | 47 +++++++++++++++++++ .../app/wizard/welcome/welcome.component.ts | 2 + src/Ombi/ClientApp/src/styles/Styles.scss | 32 +++++++++++++ 5 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss diff --git a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss index e8ed3e2e1..f9573f8c3 100644 --- a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss @@ -235,7 +235,7 @@ text-align:right; display:flex; justify-content: flex-end; - padding-right:2em; + padding-right:2.5% } .viewon-btn { diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html index dfec7f8d9..75ddda7e9 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html @@ -1,12 +1,27 @@ -
+
+
Welcome -

Welcome to Ombi, this wizard will quickly take you through the inital setup!

-
- +
+ +
+
+

Welcome to Ombi, this wizard will quickly take you through the inital setup!

+
+

If you encounter any problems you can find help on the following platforms:

+ +
+
+
+
+
@@ -64,4 +79,5 @@
+
diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss new file mode 100644 index 000000000..e89b9697b --- /dev/null +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss @@ -0,0 +1,47 @@ +@import "~styles/variables.scss"; +.welcome-container{ + display:flex; + height:100%; + width:100%; +} + +.welcome-container .logo{ + display:flex; + font-family: Montserrat,sans-serif; + text-transform: uppercase; + color: #62d2fa; + align-items: center; + justify-content: center; + font-weight: 700; + font-size: 5em; + padding: 40px 20px; + min-height: 300px; +} + +.welcome-container .left-container{ + width:20%; + //border: 1px solid $ombi-background-primary; +} + +.welcome-container .right-container{ + width:70%; + display:flex; + align-items: center; + justify-content: center; +} + +.welcome-buttons{ + float:right; +} + +.fab { + font-family: 'Font Awesome 5 Brands'; + font-size: 28px !important; + padding: 5px; + margin-bottom: 5px; + border: 1px solid; +} + +.fa-discord:before { + content: "\f392"; +} diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts index a46b04bd4..76bad5fb4 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts @@ -3,8 +3,10 @@ import { Router } from "@angular/router"; import { ICreateWizardUser } from "../../interfaces"; import { IdentityService, NotificationService } from "../../services"; + @Component({ templateUrl: "./welcome.component.html", + styleUrls: ["./welcome.component.scss"], }) export class WelcomeComponent implements OnInit { diff --git a/src/Ombi/ClientApp/src/styles/Styles.scss b/src/Ombi/ClientApp/src/styles/Styles.scss index 7fd667cf2..48f300690 100644 --- a/src/Ombi/ClientApp/src/styles/Styles.scss +++ b/src/Ombi/ClientApp/src/styles/Styles.scss @@ -100,3 +100,35 @@ background: $ombi-background-accent; } } + + .mat-tooltip{ + background: $ombi-background-accent; + } + + //Wizard CSS + .mat-stepper-horizontal, .mat-stepper-vertical{ + background: $ombi-background-accent; + } + + .wizard-background{ + background-color: $ombi-background-primary; + width:100%; + height:100vh; + display:flex; + align-items:center; + justify-content: center; + } + + .wizard-inner{ + color:#FFF; + min-height: 450px; + } + + .wizard-inner .mat-stepper-horizontal { + min-height: 450px; + } + + .mat-step-header .mat-step-icon{ + background-color:$ombi-active; + color: $ombi-active-text; + } From bd20cef16d79e8935b0f03c832f5b008ee61a2df Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 31 Jan 2021 12:20:26 +0100 Subject: [PATCH 06/15] WIP2 Wizard --- .../src/app/wizard/emby/emby.component.html | 58 +++++----- .../src/app/wizard/emby/emby.component.ts | 1 + .../wizard/jellyfin/jellyfin.component.html | 58 +++++----- .../app/wizard/jellyfin/jellyfin.component.ts | 1 + .../src/app/wizard/plex/plex.component.html | 53 +++++---- .../src/app/wizard/plex/plex.component.ts | 1 + .../app/wizard/welcome/welcome.component.html | 82 +++++++------- .../app/wizard/welcome/welcome.component.scss | 101 ++++++++++++++++-- src/Ombi/ClientApp/src/styles/Styles.scss | 4 + 9 files changed, 232 insertions(+), 127 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html b/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html index 9c92f8a86..a84f576c4 100644 --- a/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html @@ -1,31 +1,39 @@ - -
-
-
-
- - - -
+
+
+ +
+
+
+
+
+
+
+ + + +
-
+
- - - -
-
- Enable SSL -
-
- - - - -
-
- Save
+ + + +
+
+ Enable SSL +
+
+ + + + +
+
+ Save
+
+
+
diff --git a/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.ts b/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.ts index f528d8be3..fb0c167a6 100644 --- a/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.ts @@ -8,6 +8,7 @@ import { IEmbySettings } from "../../interfaces"; @Component({ selector: "wizard-emby", templateUrl: "./emby.component.html", + styleUrls: ["../welcome/welcome.component.scss"], }) export class EmbyComponent implements OnInit { diff --git a/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html b/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html index f88342c1d..0d4494031 100644 --- a/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html @@ -1,31 +1,39 @@ - -
-
-
-
- - - -
+
+
+ +
+
+
+
+
+
+
+ + + +
-
+
- - - -
-
- Enable SSL -
-
- - - - -
-
- Save
+ + + +
+
+ Enable SSL +
+
+ + + + +
+
+ Save
+
+
+
diff --git a/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.ts b/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.ts index e6b96d0f7..f3779b6be 100644 --- a/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.ts @@ -8,6 +8,7 @@ import { IJellyfinSettings } from "../../interfaces"; @Component({ selector: "wizard-jellyfin", templateUrl: "./jellyfin.component.html", + styleUrls: ["../welcome/welcome.component.scss"] }) export class JellyfinComponent implements OnInit { diff --git a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html index fd30c08ff..744c3ed15 100644 --- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html @@ -1,24 +1,35 @@ -
-
- - - -
-
- - - -
-
-Please note we do not store this information, we only store your Plex Authorization Token that will allow Ombi to view your media and users -
-
- +
+
+
-
-

OR

-
-
- +
+
+
+
+ + + +
+
+ + + +
+
+ Please note we do not store this information, we only store your Plex Authorization Token that will allow Ombi to view your media and users +
+
+
+ +
+
+

OR

+
+
+ +
+
+
+
diff --git a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts index e469ddc00..03c8cfa9a 100644 --- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts @@ -9,6 +9,7 @@ import { StorageService } from "../../shared/storage/storage-service"; @Component({ selector: "wizard-plex", templateUrl: "./plex.component.html", + styleUrls: ["../welcome/welcome.component.scss"], }) export class PlexComponent implements OnInit, OnDestroy { diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html index 75ddda7e9..b3c016d95 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html @@ -11,11 +11,16 @@
-

Welcome to Ombi, this wizard will quickly take you through the inital setup!

-
+

Welcome to Ombi!

+

This wizard will quickly take you through the inital setup!

If you encounter any problems you can find help on the following platforms:

+
@@ -27,48 +32,35 @@ -
- Plex - -
- - -
-
-
- - -
- Emby - -
- - -
-
-
- - -
- Jellyfin - -
- - -
-
-
- - -
- Create a local admin - -
- - -
-
-
+
+ Media Server + + + + + +
+ + +
+ Create a local admin + +
+ + +
+
+
+ +
+ Ombi config + +
+ + +
+
+
Done diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss index e89b9697b..18395a696 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss @@ -18,13 +18,19 @@ min-height: 300px; } -.welcome-container .left-container{ - width:20%; - //border: 1px solid $ombi-background-primary; +.left-container{ + width:30%; } -.welcome-container .right-container{ +.right-container{ width:70%; +} + +.right-container-content{ + width:100%; +} + +.welcome-container .right-container{ display:flex; align-items: center; justify-content: center; @@ -34,14 +40,87 @@ float:right; } -.fab { +.fab:before { font-family: 'Font Awesome 5 Brands'; - font-size: 28px !important; - padding: 5px; - margin-bottom: 5px; - border: 1px solid; } -.fa-discord:before { - content: "\f392"; +.social-media .fab{ + font-family: Roboto, "Helvetica Neue", sans-serif; +} + +.fas:before { + font-family:"Font Awesome 5 Free"; + font-weight:800; } + +.social-media .fas{ + font-family: Roboto, "Helvetica Neue", sans-serif; + font-weight:400; +} + +.social-media a{ + color: #FFF; +} + +.social-media{ + display:grid; +} + +.fa-ul { + list-style-type: none; + margin-left: 2.5em; + padding-left: 0; +} + +.fa-li { + left: -2em; + position: absolute; + text-align: center; + width: 2em; + line-height: inherit; +} + +.social-media ul li{ + font-size:16px; + padding:5px; +} + + +.left-container.mediaserver img{ + object-fit: contain; + width: 100%; +} + +.left-container.mediaserver{ + display:flex; + justify-content: center; + height:300px; + padding:20px; +} + +.right-container.mediaserver{ + display:flex; + justify-content: center; + align-items:center; +} + +.right-container-content .mediaserver{ + display:block; +} + +.mediaserver-container{ + display:flex; + height:100%; + width:100%; +} + +.plex-buttons{ + display:flex; + justify-content: center; + align-items: center; +} + +p.space-or{ + padding:20px; + margin-top:20px; +} \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/styles/Styles.scss b/src/Ombi/ClientApp/src/styles/Styles.scss index 48f300690..711a8878a 100644 --- a/src/Ombi/ClientApp/src/styles/Styles.scss +++ b/src/Ombi/ClientApp/src/styles/Styles.scss @@ -132,3 +132,7 @@ background-color:$ombi-active; color: $ombi-active-text; } + + .mat-tab-group.mat-primary .mat-ink-bar, .mat-tab-nav-bar.mat-primary .mat-ink-bar{ + background-color: $ombi-active; + } From 173b49fb615f1e09dcadd0a0aa467ee0b017fc22 Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 31 Jan 2021 12:22:10 +0100 Subject: [PATCH 07/15] Small fix for Plex logo --- src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html index 744c3ed15..684742a89 100644 --- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html @@ -1,6 +1,6 @@ 
- +
From bf5a17ad05077c575abdd725fdae9c1d7bdaf64a Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 31 Jan 2021 12:25:36 +0100 Subject: [PATCH 08/15] Hate those small fixes... Keep changing stuff --- .../ClientApp/src/app/wizard/welcome/welcome.component.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss index 18395a696..6c30fdd9a 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.scss @@ -23,7 +23,8 @@ } .right-container{ - width:70%; + width:60%; + float:right; } .right-container-content{ @@ -112,6 +113,7 @@ display:flex; height:100%; width:100%; + justify-content: space-between; } .plex-buttons{ From e5ee0211394ddf4ca440f6ed35fed1a0ea2f14da Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 31 Jan 2021 17:47:09 +0100 Subject: [PATCH 09/15] WIP3 wizard --- .../createadmin/createadmin.component.html | 30 +++++++---- .../createadmin/createadmin.component.ts | 1 + .../src/app/wizard/emby/emby.component.html | 3 +- .../wizard/jellyfin/jellyfin.component.html | 3 +- .../ombiconfig/ombiconfig.component.html | 27 ++++++++++ .../wizard/ombiconfig/ombiconfig.component.ts | 11 ++++ .../src/app/wizard/plex/plex.component.html | 5 +- .../app/wizard/welcome/welcome.component.html | 14 ++--- .../app/wizard/welcome/welcome.component.scss | 54 +++++++++++++++++-- .../ClientApp/src/app/wizard/wizard.module.ts | 3 ++ 10 files changed, 126 insertions(+), 25 deletions(-) create mode 100644 src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html create mode 100644 src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts diff --git a/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.html b/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.html index ea3ec21c4..50371c346 100644 --- a/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.html @@ -1,12 +1,22 @@ - -This account will be used to configure your settings and also manage all of the requests. -
- - - -
- - - +
+
+ +
+
+
+

Protect your Ombi

+ Create an Admin account to make sure you are always able to access your Ombi. +
+ + + +
+ + + +
+ You'll need to configure e-mail to recover any lost password! +
+
diff --git a/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.ts b/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.ts index e691ca627..ec87a5668 100644 --- a/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/createadmin/createadmin.component.ts @@ -4,6 +4,7 @@ import { ICreateWizardUser } from "../../interfaces"; @Component({ selector: "wizard-local-admin", templateUrl: "./createadmin.component.html", + styleUrls: ["../welcome/welcome.component.scss"] }) export class CreateAdminComponent { diff --git a/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html b/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html index a84f576c4..53f4bd161 100644 --- a/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/emby/emby.component.html @@ -4,6 +4,7 @@
+

Emby Configuration

@@ -29,7 +30,7 @@
- Save
+
diff --git a/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html b/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html index 0d4494031..653e54876 100644 --- a/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/jellyfin/jellyfin.component.html @@ -4,6 +4,7 @@
+

Jellyfin Configuration

@@ -29,7 +30,7 @@
- Save
+
diff --git a/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html new file mode 100644 index 000000000..fc51eae7c --- /dev/null +++ b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html @@ -0,0 +1,27 @@ +
+
+ +
+
+
+

Customize your Ombi

+
+ + + +
+
+ + + +
+
+ + Custom Logo + + +
+
+
+
+ diff --git a/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts new file mode 100644 index 000000000..9f1ac22f5 --- /dev/null +++ b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from "@angular/core"; + +@Component({ + selector: "wizard-ombi", + templateUrl: "./ombiconfig.component.html", + styleUrls: ["../welcome/welcome.component.scss"] +}) +export class OmbiConfigComponent { + + constructor() { } +} diff --git a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html index 684742a89..4c3ee268a 100644 --- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html @@ -4,6 +4,7 @@
+

Plex Configuration

@@ -20,13 +21,13 @@
- +

OR

- +
diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html index b3c016d95..ea15e16b7 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html @@ -13,7 +13,7 @@

Welcome to Ombi!

This wizard will quickly take you through the inital setup!

-

If you encounter any problems you can find help on the following platforms:

+

If you encounter any problems, please reach out on the following platforms:


- You'll need to configure e-mail to recover any lost password! + You'll need to configure e-mail to reset your password!
diff --git a/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html index fc51eae7c..33d15bb58 100644 --- a/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.html @@ -4,21 +4,22 @@
-

Customize your Ombi

+

Customize your Ombi

+

Customize your {{config.applicationName}}

- +
- + -
+
Custom Logo - +
diff --git a/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts index 9f1ac22f5..0b7e3863b 100644 --- a/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/ombiconfig/ombiconfig.component.ts @@ -1,4 +1,6 @@ import { Component, Input } from "@angular/core"; +import { IOmbiConfigModel } from "../models/OmbiConfigModel"; +import { WizardService } from "../services/wizard.service"; @Component({ selector: "wizard-ombi", @@ -7,5 +9,5 @@ }) export class OmbiConfigComponent { - constructor() { } + @Input() public config: IOmbiConfigModel; } diff --git a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html index 4c3ee268a..611dc4500 100644 --- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html @@ -1,4 +1,4 @@ -
+
@@ -8,12 +8,12 @@
- +
- +
@@ -21,13 +21,15 @@
- +

OR

- +
diff --git a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts index 03c8cfa9a..bc80c65cb 100644 --- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts @@ -16,6 +16,8 @@ export class PlexComponent implements OnInit, OnDestroy { public login: string; public password: string; public pinTimer: any; + public completed: boolean; + public oauthLoading: boolean; private clientId: string; @@ -43,7 +45,7 @@ export class PlexComponent implements OnInit, OnDestroy { usePlexAdminAccount: true, }).subscribe(y => { if (y.result) { - this.router.navigate(["login"]); + this.notificationService.success("Created your Plex User!"); } else { this.notificationService.error("Could not get the Plex Admin Information"); if (y.errors.length > 0) { @@ -57,6 +59,7 @@ export class PlexComponent implements OnInit, OnDestroy { } public oauth() { + this.oauthLoading = true; const oAuthWindow = window.open(window.location.toString(), "_blank", `toolbar=0, location=0, status=0, @@ -69,20 +72,24 @@ export class PlexComponent implements OnInit, OnDestroy { this.authService.login({ usePlexOAuth: true, password: "", rememberMe: true, username: "", plexTvPin: pin }).subscribe(x => { oAuthWindow!.location.replace(x.url); - this.pinTimer = setInterval(() => { // this.notify.info("Authenticating", "Loading... Please Wait"); this.getPinResult(x.pinId); - }, 10000); + }, 3000); }); }); } public getPinResult(pinId: number) { this.plexOauth.oAuth(pinId).subscribe(x => { + if (!x.accessToken) { + if(!x.success) { + this.oauthLoading = false; + clearInterval(this.pinTimer); + this.notificationService.error(`Error From Plex: ${x.error}`) + } return; - // RETURN } this.identityService.createWizardUser({ @@ -93,10 +100,14 @@ export class PlexComponent implements OnInit, OnDestroy { if (u.result) { this.authService.oAuth(pinId).subscribe(c => { this.store.save("id_token", c.access_token); - this.router.navigate(["login"]); + this.completed = true; + this.notificationService.success("Created your Plex User!"); + this.oauthLoading = false; + clearInterval(this.pinTimer); }); } else { + this.oauthLoading = false; if (u.errors.length > 0) { console.log(u.errors[0]); } diff --git a/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts b/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts index d39bda9ed..0f6511265 100644 --- a/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts +++ b/src/Ombi/ClientApp/src/app/wizard/services/wizard.service.ts @@ -1,6 +1,7 @@ import { PlatformLocation, APP_BASE_HREF } from "@angular/common"; import { HttpClient } from "@angular/common/http"; import { Injectable, Inject } from "@angular/core"; +import { Observable } from "rxjs"; import { ICustomizationSettings } from "../../interfaces"; import { ServiceHelpers } from "../../services"; import { IOmbiConfigModel } from "../models/OmbiConfigModel"; @@ -12,7 +13,7 @@ export class WizardService extends ServiceHelpers { super(http, "/api/v2/wizard/", href); } - public async addOmbiConfig(config: IOmbiConfigModel): Promise { - return await this.http.post(`${this.url}config`, config, {headers: this.headers}).toPromise(); + public addOmbiConfig(config: IOmbiConfigModel): Observable { + return this.http.post(`${this.url}config`, config, {headers: this.headers}); } } diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html index 0268d7e7e..6f46803c4 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html @@ -44,7 +44,7 @@ -
+ Create a local admin
@@ -56,7 +56,7 @@ Ombi config - +
@@ -84,4 +84,4 @@
-
+
\ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts index 76bad5fb4..849977b55 100644 --- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts +++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts @@ -1,37 +1,53 @@ -import { Component, OnInit } from "@angular/core"; +import { AfterViewInit, Component, OnInit, ViewChild } from "@angular/core"; import { Router } from "@angular/router"; import { ICreateWizardUser } from "../../interfaces"; import { IdentityService, NotificationService } from "../../services"; - +import { IOmbiConfigModel } from "../models/OmbiConfigModel"; +import { WizardService } from "../services/wizard.service"; +import { MatHorizontalStepper } from'@angular/material/stepper'; +import { StepperSelectionEvent } from "@angular/cdk/stepper"; @Component({ templateUrl: "./welcome.component.html", styleUrls: ["./welcome.component.scss"], }) export class WelcomeComponent implements OnInit { - + + @ViewChild('stepper', {static: false}) public stepper: MatHorizontalStepper; public localUser: ICreateWizardUser; - - constructor(private router: Router, - private identityService: IdentityService, private notificationService: NotificationService) { } + public config: IOmbiConfigModel; - public ngOnInit(): void { + constructor(private router: Router, private identityService: IdentityService, + private notificationService: NotificationService, private WizardService: WizardService) { } + + public ngOnInit(): void { this.localUser = { password:"", username:"", usePlexAdminAccount:false } + this.config = { + applicationName: null, + applicationUrl: null, + logo: null + }; } public createUser() { - this.identityService.createWizardUser(this.localUser).subscribe(x => { - if (x.result) { + this.WizardService.addOmbiConfig(this.config).subscribe(config => { + if(config != null) { + this.identityService.createWizardUser(this.localUser).subscribe(x => { + if (x.result) { + // save the config this.router.navigate(["login"]); } else { if (x.errors.length > 0) { this.notificationService.error(x.errors[0]); + this.stepper.previous(); } } }); } + }, configErr => this.notificationService.error(configErr)); + } } diff --git a/src/Ombi/Controllers/V1/IdentityController.cs b/src/Ombi/Controllers/V1/IdentityController.cs index 63f8211ca..342e4620d 100644 --- a/src/Ombi/Controllers/V1/IdentityController.cs +++ b/src/Ombi/Controllers/V1/IdentityController.cs @@ -139,7 +139,7 @@ namespace Ombi.Controllers.V1 public async Task CreateWizardUser([FromBody] CreateUserWizardModel user) { var users = UserManager.Users; - if (users.Any(x => x.NormalizedUserName != "API")) + if (users.Any(x => x.UserType == UserType.LocalUser)) { // No one should be calling this. Only the wizard return new SaveWizardResult { Result = false, Errors = new List { "Looks like there is an existing user!" } }; @@ -169,7 +169,7 @@ namespace Ombi.Controllers.V1 ImportPlexAdmin = true }); - return await SaveWizardUser(user, adminUser); + return await SaveWizardUser(user, adminUser, false); } var userToCreate = new OmbiUser @@ -179,10 +179,10 @@ namespace Ombi.Controllers.V1 StreamingCountry = "US" }; - return await SaveWizardUser(user, userToCreate); + return await SaveWizardUser(user, userToCreate, true); } - private async Task SaveWizardUser(CreateUserWizardModel user, OmbiUser userToCreate) + private async Task SaveWizardUser(CreateUserWizardModel user, OmbiUser userToCreate, bool completeWizard) { IdentityResult result; var retVal = new SaveWizardResult(); @@ -210,10 +210,13 @@ namespace Ombi.Controllers.V1 _log.LogInformation("Added the Admin role"); } - // Update the wizard flag - var settings = await OmbiSettings.GetSettingsAsync(); - settings.Wizard = true; - await OmbiSettings.SaveSettingsAsync(settings); + if (completeWizard) + { + // Update the wizard flag + var settings = await OmbiSettings.GetSettingsAsync(); + settings.Wizard = true; + await OmbiSettings.SaveSettingsAsync(settings); + } } if (!result.Succeeded) { From c33a80fda4187e8c108a2573b2ec097d3a36e5f5 Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 31 Jan 2021 21:16:17 +0100 Subject: [PATCH 12/15] Fixes for the details page --- .../movie/movie-details.component.html | 128 ++++++++++-------- .../social-icons/social-icons.component.html | 2 +- .../social-icons/social-icons.component.scss | 4 + .../top-banner/top-banner.component.html | 3 +- .../media-details.component.scss | 33 +++-- src/Ombi/ClientApp/src/styles/Styles.scss | 5 + 6 files changed, 104 insertions(+), 71 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html index f23735c46..ecd15dc45 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.html @@ -32,68 +32,71 @@
-
- - +
+
+ +
-
- - - {{'Search.ViewOnPlex' | translate}} - - - - {{'Search.ViewOnEmby' | translate}} - - - - {{'Search.ViewOnJellyfin' | translate}} - - - - - - - - + + + + + + + + + + + - - - - - - - - - + + + + - - - - - +
@@ -134,11 +137,16 @@
- - - - - + + Trailers + + + + + + + +
diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html index 565af2127..847f51491 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.html @@ -25,7 +25,7 @@ - diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss index 6e611a04f..1da3e6841 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/social-icons/social-icons.component.scss @@ -4,3 +4,7 @@ a.media-icons:hover{ color:$ombi-active; } +button.admin-cog{ + margin-left:40px; + color:$ombi-active; +} \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.html b/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.html index 5ab0ad228..570db9b9c 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.html @@ -1,7 +1,8 @@
-
+
+
diff --git a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss index 8a3e5a7ed..6e752ce80 100644 --- a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss @@ -14,12 +14,6 @@ } } -@media (max-width: 767px) { - #summary-wrapper { - height: 350px !important; - } -} - #summary-wrapper .full-screenshot, .summary-wrapper .full-screenshot, #watching-wrapper .full-screenshot, @@ -43,7 +37,7 @@ background-size: cover; background-position: 50% 10%; transition: all .5s; - height: 300px; + height: 600px; color: #fff; position: relative; } @@ -85,7 +79,7 @@ #summary-wrapper .summary .container, .summary-wrapper .summary .container { position: absolute; - bottom: 0; + bottom: 300px; left: 0; right: 0; } @@ -176,7 +170,8 @@ } .media-row { - padding-top: 2%; + padding-top: 56px; + padding-left: 26px; } .cast-profile-img { @@ -259,3 +254,23 @@ ::ng-deep .p-carousel-indicators { display: none !important; } + + +#info-wrapper{ + margin-top:-200px; +} +.full-screenshot.enabled.overlay{ + background-image: linear-gradient(to bottom, transparent, 50%, $ombi-background-primary); +} + +.row.justify-content-center.justify-content-sm-start.header-container{ + flex-wrap: nowrap; +} + +.details-button-container{ + width:100%; +} + +.info-wrapper .row{ + flex-wrap:wrap; +} \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/styles/Styles.scss b/src/Ombi/ClientApp/src/styles/Styles.scss index 711a8878a..f34d199a0 100644 --- a/src/Ombi/ClientApp/src/styles/Styles.scss +++ b/src/Ombi/ClientApp/src/styles/Styles.scss @@ -37,6 +37,7 @@ .mat-flat-button.mat-accent, .mat-raised-button.mat-accent, .mat-fab.mat-accent, .mat-mini-fab.mat-accent{ color: $ombi-active-text; + background-color: $ombi-active; } .mat-menu-panel{ @@ -136,3 +137,7 @@ .mat-tab-group.mat-primary .mat-ink-bar, .mat-tab-nav-bar.mat-primary .mat-ink-bar{ background-color: $ombi-active; } + + .mat-flat-button, .mat-raised-button, .mat-fab, .mat-mini-fab{ + background-color: $ombi-active; + } From 78968b5e19f5738e76f1e76af8b386002e5a85ae Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 31 Jan 2021 21:52:23 +0100 Subject: [PATCH 13/15] Fix for availability on the discover page (mobile display). --- .../card/discover-card.component.html | 2 +- .../card/discover-card.component.scss | 40 +++++++++++++++---- .../discover/discover.component.scss | 5 +++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.html b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.html index a782729a0..97d3d9f60 100644 --- a/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.html +++ b/src/Ombi/ClientApp/src/app/discover/components/card/discover-card.component.html @@ -6,7 +6,7 @@ {{RequestType[result.type] | humanize}}
- {{getAvailbilityStatus()}} + {{getAvailbilityStatus()}}
Date: Sun, 31 Jan 2021 22:10:54 +0100 Subject: [PATCH 14/15] Fix for the title on 4k resolution --- .../components/shared/top-banner/top-banner.component.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss b/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss index 9fd7c3acd..48270be8f 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss @@ -8,6 +8,12 @@ margin-left:0px; }} +@media (min-width:2400px){ + .title-top-banner{ + padding-left:390px; + margin-left:0px; +}} + @media (max-width:571px){ .title-top-banner{ text-align:center; From 230576a6584e8e26626f709418d1d5c958aaf2d4 Mon Sep 17 00:00:00 2001 From: twanariens Date: Mon, 1 Feb 2021 11:06:01 +0100 Subject: [PATCH 15/15] Small fix on the title (mobile display) --- .../components/shared/top-banner/top-banner.component.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss b/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss index 48270be8f..972d78d69 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/top-banner/top-banner.component.scss @@ -17,4 +17,5 @@ @media (max-width:571px){ .title-top-banner{ text-align:center; + top:50px; }} \ No newline at end of file