-
diff --git a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts
index bfbabd0a3..c091d3861 100644
--- a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts
+++ b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement-user.component.ts
@@ -1,9 +1,10 @@
-import { Location } from "@angular/common";
-import { AfterViewInit, Component, OnInit } from "@angular/core";
-import { ActivatedRoute, Router } from "@angular/router";
+import { ActivatedRoute, Router } from "@angular/router";
+import { Component, OnInit } from "@angular/core";
+import { ICheckbox, ICustomizationSettings, INotificationAgent, INotificationPreferences, IRadarrProfile, IRadarrRootFolder, ISonarrProfile, ISonarrRootFolder, IUser, UserType } from "../interfaces";
+import { IdentityService, MessageService, RadarrService, SettingsService, SonarrService } from "../services";
-import { ICheckbox, INotificationAgent, INotificationPreferences, IRadarrProfile, IRadarrRootFolder, ISonarrProfile, ISonarrRootFolder, IUser, UserType } from "../interfaces";
-import { IdentityService, RadarrService, SonarrService, MessageService } from "../services";
+import { Clipboard } from '@angular/cdk/clipboard';
+import { Location } from "@angular/common";
@Component({
templateUrl: "./usermanagement-user.component.html",
@@ -27,12 +28,17 @@ export class UserManagementUserComponent implements OnInit {
public countries: string[];
+ private customization: ICustomizationSettings;
+ private accessToken: string;
+
constructor(private identityService: IdentityService,
private notificationService: MessageService,
+ private readonly settingsService: SettingsService,
private router: Router,
private route: ActivatedRoute,
private sonarrService: SonarrService,
private radarrService: RadarrService,
+ private clipboard: Clipboard,
private location: Location) {
this.route.params.subscribe((params: any) => {
@@ -60,6 +66,9 @@ export class UserManagementUserComponent implements OnInit {
this.radarrService.getQualityProfilesFromSettings().subscribe(x => this.radarrQualities = x);
this.radarrService.getRootFoldersFromSettings().subscribe(x => this.radarrRootFolders = x);
+ this.settingsService.getCustomization().subscribe(x => this.customization = x);
+ this.identityService.getAccessToken().subscribe(x => this.accessToken = x);
+
if(!this.edit) {
this.user = {
alias: "",
@@ -178,7 +187,12 @@ export class UserManagementUserComponent implements OnInit {
}
});
}
-
+
+ public async appLink() {
+ this.clipboard.copy(`ombi://${this.customization.applicationUrl}|${this.accessToken}`);
+ this.notificationService.send("Copied!");
+ }
+
public back() {
this.location.back();
}
diff --git a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.module.ts b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.module.ts
index 885e6e2e4..a55702101 100644
--- a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.module.ts
+++ b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.module.ts
@@ -1,23 +1,19 @@
-import { CommonModule } from "@angular/common";
-import { NgModule } from "@angular/core";
-import { FormsModule, ReactiveFormsModule } from "@angular/forms";
-import { RouterModule, Routes } from "@angular/router";
-import { ConfirmDialogModule } from "primeng/confirmdialog";
-import { MultiSelectModule } from "primeng/multiselect";
-import { SidebarModule } from "primeng/sidebar";
-import { TooltipModule } from "primeng/tooltip";
-
-import { UserManagementUserComponent } from "./usermanagement-user.component";
-import { UserManagementComponent } from "./usermanagement.component";
-
-import { PipeModule } from "../pipes/pipe.module";
+import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { IdentityService, PlexService, RadarrService, SonarrService } from "../services";
+import { RouterModule, Routes } from "@angular/router";
import { AuthGuard } from "../auth/auth.guard";
-
+import { CommonModule } from "@angular/common";
+import { ConfirmDialogModule } from "primeng/confirmdialog";
+import { MultiSelectModule } from "primeng/multiselect";
+import { NgModule } from "@angular/core";
import { OrderModule } from "ngx-order-pipe";
-
+import { PipeModule } from "../pipes/pipe.module";
import { SharedModule } from "../shared/shared.module";
+import { SidebarModule } from "primeng/sidebar";
+import { TooltipModule } from "primeng/tooltip";
+import { UserManagementComponent } from "./usermanagement.component";
+import { UserManagementUserComponent } from "./usermanagement-user.component";
const routes: Routes = [
{ path: "", component: UserManagementComponent, canActivate: [AuthGuard] },