mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Started #243
This commit is contained in:
parent
ba52772fd9
commit
7a8d7e3f19
18 changed files with 1757 additions and 1373 deletions
|
@ -1,70 +1,70 @@
|
|||
@using PlexRequests.UI.Helpers
|
||||
<div class="home">
|
||||
<h1>Login</h1>
|
||||
<div>
|
||||
<p>
|
||||
Want to watch a movie or tv show but it's not currently on Plex?
|
||||
Login below with your Plex.tv username and password! <span title="Your login details are only used to authenticate your Plex account."><i class="fa fa-question-circle"></i></span>
|
||||
</p>
|
||||
</div>
|
||||
<form method="POST" id="loginForm">
|
||||
<div>
|
||||
<div>
|
||||
<label>Plex.tv Username </label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="form-control form-control-custom" type="text" name="Username" placeholder="Username" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@if (Model.UsePassword)
|
||||
{
|
||||
<div>
|
||||
<div>
|
||||
<label> Password </label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="form-control form-control-custom" name="Password" type="password" placeholder="Password"/>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
}
|
||||
|
||||
<button id="loginBtn" class="btn btn-success-outline" type="submit"><i class="fa fa-user fa-fw"></i> Sign In</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
var base = '@Html.GetBaseUrl()';
|
||||
$('#loginBtn').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#loginForm");
|
||||
var formData = $form.serialize();
|
||||
var dtOffset = new Date().getTimezoneOffset();
|
||||
formData += ('&DateTimeOffset=' + dtOffset);
|
||||
|
||||
var url = createBaseUrl(base, '/search');
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: $form.prop("action"),
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
|
||||
location.replace(response.message);
|
||||
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@using PlexRequests.Resources
|
||||
@using PlexRequests.UI.Helpers
|
||||
<div class="home">
|
||||
<h1>@UI.UserLogin_Title</h1>
|
||||
<div>
|
||||
<p>
|
||||
@UI.UserLogin_Paragraph <span title="@UI.UserLogin_Paragraph_SpanHover"><i class="fa fa-question-circle"></i></span>
|
||||
</p>
|
||||
</div>
|
||||
<form method="POST" id="loginForm">
|
||||
<div>
|
||||
<div>
|
||||
<label>@UI.UserLogin_Username</label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="form-control form-control-custom" type="text" name="Username" placeholder="@UI.UserLogin_Username_Placeholder" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@if (Model.UsePassword)
|
||||
{
|
||||
<div>
|
||||
<div>
|
||||
<label> @UI.UserLogin_Password </label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="form-control form-control-custom" name="Password" type="password" placeholder="@UI.UserLogin_Password"/>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
}
|
||||
|
||||
<button id="loginBtn" class="btn btn-success-outline" type="submit"><i class="fa fa-user fa-fw"></i> @UI.UserLogin_SignIn</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
var base = '@Html.GetBaseUrl()';
|
||||
$('#loginBtn').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#loginForm");
|
||||
var formData = $form.serialize();
|
||||
var dtOffset = new Date().getTimezoneOffset();
|
||||
formData += ('&DateTimeOffset=' + dtOffset);
|
||||
|
||||
var url = createBaseUrl(base, '/search');
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: $form.prop("action"),
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
|
||||
location.replace(response.message);
|
||||
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("@UI.Javascript_SomethingWentWrong", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue