mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Some styling
This commit is contained in:
parent
725678779a
commit
37aa6b938d
9 changed files with 102 additions and 37 deletions
|
@ -1,11 +1,20 @@
|
|||
@media (min-width: 768px ) {
|
||||
.row {
|
||||
position: relative;
|
||||
}
|
||||
.row {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.bottom-align-text {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.bottom-align-text {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.multiSelect {
|
||||
background-color: #4e5d6c;
|
||||
}
|
||||
|
||||
.form-control-custom {
|
||||
background-color: #4e5d6c !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
|
|
@ -117,6 +117,12 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
var plex = new PlexApi();
|
||||
var model = plex.GetToken(user.username, user.password);
|
||||
|
||||
if (model.user == null)
|
||||
{
|
||||
return Response.AsJson(new { Result = false, Message = "Incorrect username or password!" });
|
||||
}
|
||||
|
||||
var oldSettings = AuthService.GetSettings();
|
||||
if (oldSettings != null)
|
||||
{
|
||||
|
@ -132,15 +138,22 @@ namespace PlexRequests.UI.Modules
|
|||
AuthService.SaveSettings(newModel);
|
||||
}
|
||||
|
||||
return Response.AsJson(new {Result = true, AuthToken = model.user.authentication_token});
|
||||
return Response.AsJson(new { Result = true, AuthToken = model.user.authentication_token });
|
||||
}
|
||||
|
||||
|
||||
private Response GetUsers()
|
||||
{
|
||||
var token = AuthService.GetSettings().PlexAuthToken;
|
||||
if (token == null)
|
||||
{
|
||||
return Response.AsJson(string.Empty);
|
||||
}
|
||||
var api = new PlexApi();
|
||||
var users = api.GetUsers(token);
|
||||
if (users == null)
|
||||
{ return Response.AsJson(string.Empty); }
|
||||
|
||||
var usernames = users.User.Select(x => x.Username);
|
||||
return Response.AsJson(usernames); //TODO usernames are not populated.
|
||||
}
|
||||
|
@ -162,6 +175,6 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
return Context.GetRedirect("~/admin/couchpotato");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -130,7 +130,7 @@ namespace PlexRequests.UI
|
|||
// Step 5. Activate the configuration
|
||||
LogManager.Configuration = config;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception )
|
||||
{
|
||||
|
||||
throw;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@Html.Partial("/Admin/_Sidebar")
|
||||
|
||||
<div class="col-sm-8">
|
||||
<form class="form-horizontal" method="POST" action="/admin/SaveAuthentication" id="mainForm">
|
||||
<form class="form-horizontal" method="POST" action="/admin/authentication" id="mainForm">
|
||||
<fieldset>
|
||||
<legend>Authentication Settings</legend>
|
||||
|
||||
|
@ -40,17 +40,17 @@
|
|||
<div class="form-group">
|
||||
<label for="authToken" class="col-lg-2 control-label">Plex Authorization Token</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="authToken" name="PlexAuthToken" placeholder="Plex Auth Token" value="@Model.PlexAuthToken">
|
||||
<input type="text" class="form-control-custom form-control " id="authToken" name="PlexAuthToken" placeholder="Plex Auth Token" value="@Model.PlexAuthToken">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username" class="col-lg-2 control-label">Username and Password</label>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" class="form-control" id="username" name="Username" placeholder="Username">
|
||||
<input type="text" class="form-control form-control-custom" id="username" name="Username" placeholder="Username">
|
||||
</div>
|
||||
<div class="col-lg-4 col-lg-push-1">
|
||||
<input type="password" class="form-control" id="password" name="Password" placeholder="Password">
|
||||
<div class="col-lg-4 col-lg-push-2">
|
||||
<input type="password" class="form-control form-control-custom" id="password" name="Password" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -66,20 +66,16 @@
|
|||
<br />
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<select id="users" multiple="" class="col-lg-10 col-lg-offset-2"></select>
|
||||
<select id="users" multiple="" class="col-lg-10 col-lg-offset-2 form-control-custom "></select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div class="col-lg-10 col-lg-offset-2">
|
||||
<button id="refreshUsers" class="btn btn-primary">Refresh Users</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -137,7 +133,7 @@
|
|||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.length > 1) {
|
||||
$(response).each(function(user) {
|
||||
$(response).each(function() {
|
||||
$('#users').append("<option>" + this + "</option>");
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<div class="form-group">
|
||||
<label for="Ip" class="col-lg-2 control-label">CouchPotato Hostname or IP</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="Ip" name="Ip" placeholder="localhost" value="@Model.Ip">
|
||||
<input type="text" class="form-control form-control-custom " id="Ip" name="Ip" placeholder="localhost" value="@Model.Ip">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
<label for="portNumber" class="col-lg-2 control-label">Port</label>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="portNumber" name="Port" placeholder="Port Number" value="@port">
|
||||
<input type="text" class="form-control form-control-custom " id="portNumber" name="Port" placeholder="Port Number" value="@port">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
<div class="form-group">
|
||||
<label for="ApiKey" class="col-lg-2 control-label">CouchPotato API Key</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="ApiKey" name="ApiKey" value="@Model.ApiKey">
|
||||
<input type="text" class="form-control form-control-custom " id="ApiKey" name="ApiKey" value="@Model.ApiKey">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
|
||||
}
|
||||
<div class="col-sm-8">
|
||||
<form class="form-horizontal" method="POST" action="/admin/couchpotato" id="mainForm">
|
||||
<form class="form-horizontal" method="POST" action="/admin" id="mainForm">
|
||||
<fieldset>
|
||||
<legend>Request Plex Settings</legend>
|
||||
<div class="form-group">
|
||||
<label for="portNumber" class="col-lg-2 control-label">Port</label>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" id="portNumber" name="Port" placeholder="Port Number" value="@port">
|
||||
<input type="text" class="form-control form-control-custom " id="portNumber" name="Port" placeholder="Port Number" value="@port">
|
||||
</div>
|
||||
</div>
|
||||
<small class="col-lg-10 col-lg-offset-2">You will have to restart after changing the port.</small>
|
||||
|
@ -58,9 +58,9 @@
|
|||
|
||||
<div class="form-group">
|
||||
<label for="WeeklyRequestLimit" class="col-lg-2 control-label">Weekly Request Limit</label>
|
||||
<div class="col-lg-10 checkbox">
|
||||
<div class="col-lg-10">
|
||||
<label>
|
||||
<input type="number" id="WeeklyRequestLimit" name="WeeklyRequestLimit" value="@Model.WeeklyRequestLimit">
|
||||
<input type="number" id="WeeklyRequestLimit" name="WeeklyRequestLimit" class="form-control form-control-custom " value="@Model.WeeklyRequestLimit">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue