This commit is contained in:
Jamie.Rees 2016-12-29 08:20:27 +00:00
parent 841c9cdf54
commit b3c7d83529
4 changed files with 8 additions and 20 deletions

View file

@ -168,6 +168,9 @@ namespace Ombi.Services.Jobs
var dbMainAcc = dbUsers.FirstOrDefault(x => x.Username.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture)); var dbMainAcc = dbUsers.FirstOrDefault(x => x.Username.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture));
var localMainAcc = localUsers.FirstOrDefault(x => x.UserName.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture)); var localMainAcc = localUsers.FirstOrDefault(x => x.UserName.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture));
// TODO if admin acc does exist, check if we need to update it
// Create the local admin account if it doesn't already exist // Create the local admin account if it doesn't already exist
if (dbMainAcc == null && localMainAcc == null) if (dbMainAcc == null && localMainAcc == null)
{ {

View file

@ -672,7 +672,7 @@ namespace Ombi.UI.Modules.Admin
NotificationType = NotificationType.Test, NotificationType = NotificationType.Test,
DateTime = DateTime.Now DateTime = DateTime.Now
}; };
var currentSettings = await PushbulletService.GetSettingsAsync(); var currentSettings = await PushoverService.GetSettingsAsync();
try try
{ {
NotificationService.Subscribe(new PushoverNotification(PushoverApi, PushoverService)); NotificationService.Subscribe(new PushoverNotification(PushoverApi, PushoverService));

View file

@ -1,4 +1,5 @@
@using Ombi.UI.Helpers @using Ombi.UI.Helpers
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Ombi.Core.SettingModels.PushoverNotificationSettings>
@Html.Partial("Shared/Partial/_Sidebar") @Html.Partial("Shared/Partial/_Sidebar")
<div class="col-sm-8 col-sm-push-1"> <div class="col-sm-8 col-sm-push-1">
@ -6,20 +7,8 @@
<fieldset> <fieldset>
<legend>Pushover Notifications</legend> <legend>Pushover Notifications</legend>
<div class="form-group">
<div class="checkbox">
@if (Model.Enabled) @Html.Checkbox(Model.Enabled, "Enabled", "Enabled")
{
<input type="checkbox" id="Enabled" name="Enabled" checked="checked"><label for="Enabled">Enabled</label>
}
else
{
<input type="checkbox" id="Enabled" name="Enabled"><label for="Enabled">Enabled</label>
}
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="AccessToken" class="control-label">API Key</label> <label for="AccessToken" class="control-label">API Key</label>

View file

@ -52,10 +52,6 @@
<li id="customDonate" style="display: none"><a id="customDonateHref" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: yellow;"></i> <span id="donationText">@UI.Custom_Donation_Default</span></a></li> <li id="customDonate" style="display: none"><a id="customDonateHref" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: yellow;"></i> <span id="donationText">@UI.Custom_Donation_Default</span></a></li>
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
@if (!Html.IsLoggedIn(Context))
{
<li><a href="@url/login?redirect=@Context.Request.Path"><i class="fa fa-user"></i> @UI.Layout_Admin</a></li>
}
@if (Html.IsAdmin()) @if (Html.IsAdmin())
{ {
<li><a>@UI.Layout_Welcome @Context.CurrentUser.UserName</a></li> <li><a>@UI.Layout_Welcome @Context.CurrentUser.UserName</a></li>
@ -91,7 +87,7 @@
</li> </li>
} }
else if (Html.IsLoggedIn(Context)) // Logged in but not admin else if (Html.IsLoggedIn(Context)) // Logged in but not admin but not a real user
{ {
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> @UI.Layout_Welcome @Context.Request.Session[SessionKeys.UsernameKey] <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> @UI.Layout_Welcome @Context.Request.Session[SessionKeys.UsernameKey] <span class="caret"></span></a>