More work on #399

This commit is contained in:
Jamie.Rees 2016-12-29 13:40:12 +00:00
commit 8a288db2b0
9 changed files with 195 additions and 23 deletions

View file

@ -32,12 +32,23 @@
<label class="control-label">@Model.LogLevel</label>
</div>
<div class="form-group">
<div>
<button id="save" type="submit" class="btn btn-danger-outline">Report a bug</button>
@if (Model.OAuthEnabled)
{
<div class="form-group">
<div>
<button id="save" type="submit" class="btn btn-danger-outline">Report a bug</button>
</div>
</div>
</div>
}
else
{
<div class="form-group">
<div>
<button id="oAuth" type="submit" class="btn btn-primary-outline">Log in via Github</button>
</div>
</div>
}
</fieldset>
</div>
@ -52,16 +63,32 @@
startBug();
});
$('#oAuth').click(function () {
var url = "/admin/oauth";
url = createBaseUrl(baseUrl, url);
$.ajax({
type: "get",
url: url,
dataType: "json",
success: function (response) {
window.location.href = response.uri;
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
}
});
});
function startBug() {
bootbox.prompt({
size: "small",
title: "What is the title of the issue?",
inputType: 'textarea',
callback: mainContent
});
bootbox.prompt({
size: "small",
title: "What is the title of the issue?",
inputType: 'textarea',
callback: mainContent
});
}
function mainContent(userTitle) {
if (!userTitle) {
@ -91,7 +118,7 @@
$.ajax({
type: "post",
url: url,
data: {title : issueTitle, body : additionalInfo},
data: { title: issueTitle, body: additionalInfo },
dataType: "json",
success: function (response) {
if (response && response.result) {

View file

@ -58,7 +58,7 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> @UI.Layout_Admin <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="@url/admin"><i class="fa fa-cog"></i> @UI.Layout_Settings</a></li>
<li><a href="@url/admin/about>"><i class="fa fa-cog"></i> @UI.Layout_Settings</a></li>
<li><a href="@url/changepassword"><i class="fa fa-key"></i> @UI.Layout_ChangePassword</a></li>
<li class="divider"></li>

View file

@ -2,6 +2,7 @@
@Html.LoadSettingsAssets()
<div class="col-lg-3 col-md-3 col-sm-4">
<div class="list-group table-of-contents">
@Html.GetSidebarUrl(Context, "/admin/about", "About")
@Html.GetSidebarUrl(Context, "/admin", "Plex Request")
@Html.GetSidebarUrl(Context, "/admin/customization", "Customization")
@Html.GetSidebarUrl(Context, "/admin/landingpage", "Landing Page")