-
\ No newline at end of file
+
\ No newline at end of file
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 f22fa915b..570782e8c 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 { PlatformLocation } from "@angular/common";
import { IEmbySettings } from "../../interfaces";
@Component({
+ selector: "wizard-emby",
templateUrl: "./emby.component.html",
})
export class EmbyComponent implements OnInit {
@@ -52,7 +53,8 @@ export class EmbyComponent implements OnInit {
this.notificationService.error("Username or password was incorrect. Could not authenticate with Emby.");
return;
}
- this.router.navigate(["Wizard/CreateAdmin"]);
+
+ this.notificationService.success("Done! Please press next");
});
}
}
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 611c78dbf..4a120f790 100644
--- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html
+++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.html
@@ -1,34 +1,24 @@
-
-
\ No newline at end of file
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 076b93363..1ea7615f3 100644
--- a/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts
+++ b/src/Ombi/ClientApp/src/app/wizard/plex/plex.component.ts
@@ -8,6 +8,7 @@ import { IdentityService, NotificationService } from "../../services";
import { StorageService } from "../../shared/storage/storage-service";
@Component({
+ selector: "wizard-plex",
templateUrl: "./plex.component.html",
})
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 054250ec7..416af7b09 100644
--- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html
+++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.html
@@ -1,18 +1,56 @@
-

-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Done
+ All setup! Press Finish to continue and login to Ombi!
+
+
+
+
+
+
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 332a74525..805264f96 100644
--- a/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts
+++ b/src/Ombi/ClientApp/src/app/wizard/welcome/welcome.component.ts
@@ -1,6 +1,8 @@
import { PlatformLocation } from "@angular/common";
import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router";
+import { ICreateWizardUser } from "../../interfaces";
+import { IdentityService, NotificationService } from "../../services";
@Component({
templateUrl: "./welcome.component.html",
@@ -8,17 +10,32 @@ import { Router } from "@angular/router";
export class WelcomeComponent implements OnInit {
public baseUrl: string;
-
- constructor(private router: Router, private location: PlatformLocation) { }
+ public localUser: ICreateWizardUser;
+
+ constructor(private router: Router, private location: PlatformLocation,
+ private identityService: IdentityService, private notificationService: NotificationService) { }
- public ngOnInit(): void {
+ public ngOnInit(): void {
+ this.localUser = {
+ password:"",
+ username:"",
+ usePlexAdminAccount:false
+ }
const base = this.location.getBaseHrefFromDOM();
if (base.length > 1) {
this.baseUrl = base;
}
}
- public next() {
- this.router.navigate(["Wizard/MediaServer"]);
+ public createUser() {
+ this.identityService.createWizardUser(this.localUser).subscribe(x => {
+ if (x.result) {
+ this.router.navigate(["login"]);
+ } else {
+ if (x.errors.length > 0) {
+ this.notificationService.error(x.errors[0]);
+ }
+ }
+ });
}
}
diff --git a/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts b/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts
index d9c056ba0..7efdbe504 100644
--- a/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts
+++ b/src/Ombi/ClientApp/src/app/wizard/wizard.module.ts
@@ -1,6 +1,6 @@
import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
-import { FormsModule } from "@angular/forms";
+import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { RouterModule, Routes } from "@angular/router";
import {ConfirmationService, ConfirmDialogModule } from "primeng/primeng";
@@ -17,6 +17,8 @@ import { PlexService } from "../services";
import { IdentityService } from "../services";
import { PlexOAuthService } from "../services";
+import { SharedModule } from "../shared/shared.module";
+
const routes: Routes = [
{ path: "", component: WelcomeComponent},
{ path: "MediaServer", component: MediaServerComponent},
@@ -28,7 +30,10 @@ const routes: Routes = [
imports: [
CommonModule,
FormsModule,
+ ReactiveFormsModule,
ConfirmDialogModule,
+ SharedModule,
+ MatStepperModule,
RouterModule.forChild(routes),
],
declarations: [
@@ -46,7 +51,6 @@ const routes: Routes = [
IdentityService,
EmbyService,
ConfirmationService,
- MatStepperModule,
PlexOAuthService,
],
diff --git a/src/Ombi/Controllers/V1/IdentityController.cs b/src/Ombi/Controllers/V1/IdentityController.cs
index 3525faa21..6eb28e008 100644
--- a/src/Ombi/Controllers/V1/IdentityController.cs
+++ b/src/Ombi/Controllers/V1/IdentityController.cs
@@ -204,6 +204,11 @@ 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 (!result.Succeeded)
{
@@ -211,11 +216,6 @@ namespace Ombi.Controllers.V1
retVal.Errors.AddRange(result.Errors.Select(x => x.Description));
}
- // Update the wizard flag
- var settings = await OmbiSettings.GetSettingsAsync();
- settings.Wizard = true;
- await OmbiSettings.SaveSettingsAsync(settings);
-
retVal.Result = result.Succeeded;
return retVal;
}