Started reworking the settings

pull/3895/head
Jamie Rees 6 years ago
parent 619e22827f
commit 01eb74d90b

@ -28,7 +28,7 @@ namespace Ombi.Store.Context
{
i.StoragePath = string.Empty;
}
optionsBuilder.UseSqlite($"Data Source={Path.Combine(i.StoragePath, "OmbiSettings.db")}");
optionsBuilder.UseSqlite($"Data Source={Path.Combine(i.StoragePath, "OmbiSettings" + ".db")}");
}
public void Seed()

@ -1,6 +1,6 @@

<settings-menu></settings-menu>
<div *ngIf="about">
<div *ngIf="about" class="container">
<fieldset>
<legend>About</legend>
<form>

@ -1,101 +1,64 @@
<settings-menu></settings-menu>
<wiki [url]="'https://github.com/tidusjar/Ombi/wiki/Ombi-Settings'"></wiki>
<fieldset *ngIf="form">
<legend>Ombi Configuration</legend>
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
<fieldset *ngIf="form" class="container">
<legend>Ombi Configuration</legend>
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
<!--<div class="form-group">
<label for="portNumber" class="control-label">Port</label>
<div>
<input type="text" class="form-control form-control-custom " id="portNumber" name="Port" placeholder="Port Number" formControlName="port" pTooltip="You will have to restart after changing the port.">
</div>
</div>-->
<div class="col-12">
<!--<div *ngIf="form.invalid && form.dirty" class="alert alert-danger">
<div>The External URL is incorrect</div>
</div>
<div class="form-group">
<label for="externalUrl" class="control-label">External Url</label>
<div>
<input type="text" class="form-control form-control-custom " id="externalUrl" name="externalUrl" placeholder="http://ombi.io/" formControlName="externalUrl" tooltipPosition="top" pTooltip="This will be the link that will be in any emails/notifications sent to the users.">
</div>
</div>-->
<div class="col-md-6">
<div class="form-group">
<label for="baseUrl" class="control-label">Base Url</label>
<div>
<input type="text" class="form-control form-control-custom" id="baseUrl" name="baseUrl"
formControlName="baseUrl">
</div>
</div>
<div class="form-group">
<label for="ApiKey" class="control-label">Api Key</label>
<div class="input-group">
<input type="text" class="form-control form-control-custom" id="ApiKey" name="ApiKey"
formControlName="apiKey" readonly="readonly" #apiKey>
<div class="input-group-addon">
<div (click)="refreshApiKey()" id="refreshKey" class="fa fa-refresh" title="Reset API Key"
pTooltip="This will invalidate the old API key"></div>
</div>
<div class="input-group-addon">
<div ngxClipboard [ngxClipboard]="apiKey" class="fa fa-clipboard" (cbOnSuccess)="successfullyCopied()"></div>
</div>
</div>
</div>
<br />
<mat-form-field>
<input matInput placeholder="Base Url" formControlName="baseUrl">
</mat-form-field>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="doNotSendNotificationsForAutoApprove" name="doNotSendNotificationsForAutoApprove"
formControlName="doNotSendNotificationsForAutoApprove">
<label for="doNotSendNotificationsForAutoApprove">Do not send Notifications if a User has the Auto
Approve permission</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="hideRequestsUsers" name="hideRequestsUsers" formControlName="hideRequestsUsers">
<label for="hideRequestsUsers">Hide requests from other users</label>
</div>
</div>
<div class="form-group">
<label for="ApiKey" class="control-label">Api Key</label>
<div class="input-group">
<input type="text" class="form-control form-control-custom" id="ApiKey" name="ApiKey" formControlName="apiKey"
readonly="readonly" #apiKey>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="ignoreCertificateErrors" name="ignoreCertificateErrors" formControlName="ignoreCertificateErrors">
<label for="ignoreCertificateErrors" tooltipPosition="top" pTooltip="Enable if you are having connectivity problems over SSL">Ignore
any certificate errors</label>
</div>
</div>
<div class="input-group-addon">
<div (click)="refreshApiKey()" id="refreshKey" class="fa fa-refresh" title="Reset API Key" pTooltip="This will invalidate the old API key"></div>
</div>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="CollectAnalyticData" name="CollectAnalyticData" formControlName="collectAnalyticData">
<label for="CollectAnalyticData" tooltipPosition="top" pTooltip="This will allow us to have a better understanding of the userbase so we know what we should be supporting">Allow
us to collect anonymous analytical data e.g. browser used</label>
</div>
</div>
<div class="form-group" *ngIf="langauges">
<label for="select" class="control-label">Language</label>
<div id="profiles">
<select formControlName="defaultLanguageCode" class="form-control form-control-custom" id="select">
<option *ngFor="let lang of langauges" value="{{lang.code}}">{{lang.nativeName}}</option>
</select>
</div>
</div>
<div class="form-group">
<div>
<button [disabled]="form.invalid" type="submit" id="save" class="btn btn-primary-outline">Submit</button>
</div>
</div>
<div class="input-group-addon">
<div ngxClipboard [ngxClipboard]="apiKey" class="fa fa-clipboard" (cbOnSuccess)="successfullyCopied()"></div>
</div>
</div>
</div>
<br />
<div>
<mat-checkbox formControlName="doNotSendNotificationsForAutoApprove">
Do not send Notifications if a User has the Auto Approve permission</mat-checkbox>
</div><div>
<mat-checkbox formControlName="hideRequestsUsers">
Hide requests from other users
</mat-checkbox>
</div><div>
<mat-checkbox formControlName="ignoreCertificateErrors" matTooltip="Enable if you are having connectivity problems over SSL">
Ignore any certificate errors
</mat-checkbox>
</div><div>
<mat-checkbox formControlName="collectAnalyticData" matTooltip="This will allow us to have a better understanding of the userbase so we know what we should be supporting">
Allow us to collect anonymous analytical data e.g. browser used
</mat-checkbox>
</div><div>
<mat-form-field *ngIf="langauges">
<mat-select placeholder="Language" formControlName="defaultLanguageCode">
<mat-option>--</mat-option>
<mat-option *ngFor="let lang of langauges" [value]="lang.code">
{{lang.nativeName}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="form-group">
<div>
<button mat-raised-button [disabled]="form.invalid" type="submit" id="save" color="accent">Submit</button>
</div>
</form>
</fieldset>
</div>
</div>
</form>
</fieldset>

@ -48,6 +48,8 @@ import { WikiComponent } from "./wiki.component";
import { SettingsMenuComponent } from "./settingsmenu.component";
import { AutoCompleteModule, CalendarModule, DialogModule, InputSwitchModule, InputTextModule, MenuModule, RadioButtonModule, TooltipModule } from "primeng/primeng";
import { MatMenuModule} from "@angular/material";
import { SharedModule } from "../shared/shared.module";
const routes: Routes = [
{ path: "Ombi", component: OmbiComponent, canActivate: [AuthGuard] },
@ -99,6 +101,8 @@ const routes: Routes = [
PipeModule,
RadioButtonModule,
DialogModule,
SharedModule,
MatMenuModule
],
declarations: [
SettingsMenuComponent,

@ -1,97 +1,60 @@
<ul class="nav nav-tabs">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Ombi']">Ombi</a></li>
<li class="dropdown" [routerLinkActive]="['active']">
<a href="ignore($event)" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-cogs" aria-hidden="true"></i> Configuration <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Customization']">Customization</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/LandingPage']">Landing Page</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Issues']">Issues</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/UserManagement']">User Importer</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Authentication']">Authentication</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Vote']">Vote</a></li>
</ul>
</li>
<li class="dropdown" [routerLinkActive]="['active']">
<a href="ignore($event)" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-server" aria-hidden="true"></i> Media Server <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Plex']">Plex</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Emby']">Emby</a></li>
</ul>
</li>
<li class="dropdown" [routerLinkActive]="['active']">
<a href="ignore($event)" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-television" aria-hidden="true"></i> TV <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Sonarr']">Sonarr</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/DogNzb']">DogNzb</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/SickRage']">SickRage</a></li>
</ul>
</li>
<li class="dropdown" [routerLinkActive]="['active']">
<a href="ignore($event)" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-film" aria-hidden="true"></i> Movies <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/CouchPotato']">CouchPotato</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/DogNzb']">DogNzb</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Radarr']">Radarr</a></li>
<!--<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Watcher']">Watcher</a></li>-->
</ul>
</li>
<li class="dropdown" [routerLinkActive]="['active']">
<a href="ignore($event)" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-music" aria-hidden="true"></i> Music <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Lidarr']">Lidarr</a></li>
</ul>
</li>
<li class="dropdown" [routerLinkActive]="['active']">
<a href="ignore($event)" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o" aria-hidden="true"></i> Notifications <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Mobile']">Mobile</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Email']">Email</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/MassEmail']">Mass Email</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Newsletter']">Newsletter</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Discord']">Discord</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Slack']">Slack</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Pushbullet']">Pushbullet</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Pushover']">Pushover</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Mattermost']">Mattermost</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Telegram']">Telegram</a></li>
</ul>
</li>
<li class="dropdown" [routerLinkActive]="['active']">
<a href="ignore($event)" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-tachometer" aria-hidden="true"></i> System <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/About']">About</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/FailedRequests']">Failed Requests</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Update']">Update</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Jobs']">Jobs</a></li>
<!-- <li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/Logs']">Logs (Not available)</a></li>
<li [routerLinkActive]="['active']"><a [routerLink]="['/Settings/ScheduledJobs']">Scheduled Jobs (Not available)</a></li> -->
</ul>
</li>
</ul>
<hr/>
<button mat-button [routerLink]="['/Settings/Ombi']">Ombi</button>
<button mat-button [matMenuTriggerFor]="configurationmenu"><i class="fa fa-cogs" aria-hidden="true"></i> Configuration</button>
<mat-menu #configurationmenu="matMenu">
<button mat-menu-item [routerLink]="['/Settings/Customization']">Customization</button>
<button mat-menu-item [routerLink]="['/Settings/LandingPage']">Landing Page</button>
<button mat-menu-item [routerLink]="['/Settings/Issues']">Issues</button>
<button mat-menu-item [routerLink]="['/Settings/Usermanagement']">User Management</button>
<button mat-menu-item [routerLink]="['/Settings/Authentication']">Authentication</button>
<button mat-menu-item [routerLink]="['/Settings/Vote']">Vote</button>
</mat-menu>
<button mat-button [matMenuTriggerFor]="mediaservermenu"><i class="fa fa-server" aria-hidden="true"></i> Media Server</button>
<mat-menu #mediaservermenu="matMenu">
<button mat-menu-item [routerLink]="['/Settings/Plex']">Plex</button>
<button mat-menu-item [routerLink]="['/Settings/Emby']">Emby</button>
</mat-menu>
<button mat-button [matMenuTriggerFor]="tvmenu"><i class="fa fa-television" aria-hidden="true"></i> TV</button>
<mat-menu #tvmenu="matMenu">
<button mat-menu-item [routerLink]="['/Settings/Sonarr']">Sonarr</button>
<button mat-menu-item [routerLink]="['/Settings/DogNzb']">DogNzb</button>
<button mat-menu-item [routerLink]="['/Settings/SickRage']">SickRage</button>
</mat-menu>
<button mat-button [matMenuTriggerFor]="movieMenu"><i class="fa fa-film" aria-hidden="true"></i> Movies</button>
<mat-menu #movieMenu="matMenu">
<button mat-menu-item [routerLink]="['/Settings/CouchPotato']">CouchPotato</button>
<button mat-menu-item [routerLink]="['/Settings/DogNzb']">DogNzb</button>
<button mat-menu-item [routerLink]="['/Settings/Radarr']">Radarr</button>
</mat-menu>
<button mat-button [matMenuTriggerFor]="musicMenu"><i class="fa fa-music" aria-hidden="true"></i> Music</button>
<mat-menu #musicMenu="matMenu">
<button mat-menu-item [routerLink]="['/Settings/Lidarr']">Lidarr</button>
</mat-menu>
<button mat-button [matMenuTriggerFor]="notificationMenu"><i class="fa fa-bell-o" aria-hidden="true"></i> Notifications</button>
<mat-menu #notificationMenu="matMenu">
<button mat-menu-item [routerLink]="['/Settings/Mobile']">Mobile</button>
<button mat-menu-item [routerLink]="['/Settings/Email']">Email</button>
<button mat-menu-item [routerLink]="['/Settings/MassEmail']">MassEmail</button>
<button mat-menu-item [routerLink]="['/Settings/Newsletter']">Newsletter</button>
<button mat-menu-item [routerLink]="['/Settings/Discord']">Discord</button>
<button mat-menu-item [routerLink]="['/Settings/Slack']">Slack</button>
<button mat-menu-item [routerLink]="['/Settings/Pushbullet']">Pushbullet</button>
<button mat-menu-item [routerLink]="['/Settings/Pushover']">Pushover</button>
<button mat-menu-item [routerLink]="['/Settings/Mattermost']">Mattermost</button>
<button mat-menu-item [routerLink]="['/Settings/Telegram']">Telegram</button>
</mat-menu>
<button mat-button [matMenuTriggerFor]="systemMenu"><i class="fa fa-tachometer" aria-hidden="true"></i> System</button>
<mat-menu #systemMenu="matMenu">
<button mat-menu-item [routerLink]="['/Settings/About']">About</button>
<button mat-menu-item [routerLink]="['/Settings/FailedRequests']">Failed Requests</button>
<button mat-menu-item [routerLink]="['/Settings/Update']">Update</button>
<button mat-menu-item [routerLink]="['/Settings/Jobs']">Background Jobs</button>
</mat-menu>
<hr/>

@ -1,15 +1,17 @@
<div class="col-md-12">
<div *ngIf="!text" class="col-md-1 col-md-push-11">
<a href="{{url}}" target="_blank" class="btn btn-sm btn-info-outline">
<span >Wiki</span>
</a>
<div *ngIf="!text" class="col-md-1 offset-md-11">
<a href="{{url}}" target="_blank">
<button mat-raised-button color="accent">
<span>Wiki</span>
</button>
</a>
</div>
<div *ngIf="text" class="col-md-1 col-md-push-9">
<a href="{{url}}" target="_blank" class="btn btn-sm btn-info-outline">
<div *ngIf="text" class="col-md-1 offset-md-9">
<a href="{{url}}" target="_blank">
<button mat-raised-button color="accent">
<span>{{text}}</span>
</button>
</a>
</div>
</div>

@ -10,7 +10,7 @@ import { IssuesReportComponent } from "./issues-report.component";
import { InputSwitchModule, SidebarModule } from "primeng/primeng";
import {
MatButtonModule, MatNativeDateModule, MatIconModule, MatSidenavModule, MatListModule, MatToolbarModule, MatTooltipModule} from '@angular/material';
MatButtonModule, MatNativeDateModule, MatIconModule, MatSidenavModule, MatListModule, MatToolbarModule, MatTooltipModule, MatSelectModule} from '@angular/material';
import { MatCardModule, MatInputModule, MatTabsModule, MatAutocompleteModule, MatCheckboxModule, MatExpansionModule, MatDialogModule, MatProgressSpinnerModule,
MatChipsModule } from "@angular/material";
import { EpisodeRequestComponent } from "./episode-request/episode-request.component";
@ -44,6 +44,7 @@ import { EpisodeRequestComponent } from "./episode-request/episode-request.compo
MatExpansionModule,
MatDialogModule,
MatTooltipModule,
MatSelectModule,
],
entryComponents: [
EpisodeRequestComponent
@ -67,6 +68,7 @@ import { EpisodeRequestComponent } from "./episode-request/episode-request.compo
MatNativeDateModule,
MatIconModule,
MatSidenavModule,
MatSelectModule,
MatListModule,
MatToolbarModule,
MatTooltipModule,

Loading…
Cancel
Save