mirror of https://github.com/Ombi-app/Ombi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
3.0 KiB
84 lines
3.0 KiB
8 years ago
|
@using Ombi.UI.Helpers
|
||
|
@inherits Ombi.UI.Helpers.EmptyViewBase<Ombi.UI.Models.LandingPageViewModel>
|
||
9 years ago
|
@{
|
||
|
var baseUrl = Html.GetBaseUrl();
|
||
|
var formAction = string.Empty;
|
||
|
if (!string.IsNullOrEmpty(baseUrl.ToHtmlString()))
|
||
|
{
|
||
|
formAction = "/" + baseUrl.ToHtmlString();
|
||
|
}
|
||
|
}
|
||
|
<img class="landing-header" src="@formAction/Content/images/logo.png" width="300" />
|
||
9 years ago
|
<div id="area" class="landing-block">
|
||
9 years ago
|
@if (Model.NoticeEnable && (!Model.EnabledNoticeTime || Model.NoticeActive))
|
||
9 years ago
|
{
|
||
9 years ago
|
<div class="media">
|
||
|
<div class="media-left media-middle">
|
||
|
<i class="fa fa-bell"></i>
|
||
9 years ago
|
</div>
|
||
9 years ago
|
<div class="media-body">
|
||
|
<h4 class="media-heading landing-title">Notice</h4>
|
||
9 years ago
|
@Html.Raw(Model.NoticeMessage)<br />
|
||
9 years ago
|
@if (Model.EnabledNoticeTime)
|
||
|
{
|
||
|
<strong><span id="startDate"></span> <span id="endDate"></span></strong>
|
||
|
}
|
||
9 years ago
|
</div>
|
||
|
</div>
|
||
|
}
|
||
9 years ago
|
|
||
|
<div class="media">
|
||
|
<div class="media-left media-middle">
|
||
|
<i id="statusIcon" class="fa fa-spinner fa-spin fa-fw"></i>
|
||
9 years ago
|
</div>
|
||
9 years ago
|
<div class="media-body">
|
||
|
<h4 class="media-heading landing-title" id="statusTitle">Checking...</h4>
|
||
9 years ago
|
The Plex server is <strong><span id="statusText">Loading...</span></strong> (check this page for continuous status updates)
|
||
9 years ago
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
9 years ago
|
<div style="text-align: center; margin-top: 20px">
|
||
|
<a href="@Model.ContinueUrl?landing=false" class="btn btn-primary-outline">Continue</a>
|
||
9 years ago
|
</div>
|
||
|
|
||
|
<script>
|
||
|
$(function () {
|
||
9 years ago
|
@if (Model.NoticeEnable && (!Model.EnabledNoticeTime || Model.NoticeActive))
|
||
9 years ago
|
{
|
||
|
<text>
|
||
9 years ago
|
var start = moment("@Model.NoticeStart.ToString("O")");
|
||
|
var end = moment("@Model.NoticeEnd.ToString("O")");
|
||
9 years ago
|
|
||
9 years ago
|
var text = "for " + start.to(end, true);
|
||
|
$('#startDate').html(start.toString());
|
||
|
$('#endDate').html(text);
|
||
9 years ago
|
</text>
|
||
|
}
|
||
|
var base = "@Html.GetBaseUrl()";
|
||
|
var url = createBaseUrl(base, "landing/status");
|
||
|
|
||
|
$.ajax({
|
||
|
type: "GET",
|
||
|
url: url,
|
||
|
dataType: "json",
|
||
|
success: function (response) {
|
||
|
$('#statusIcon').removeClass("fa-spinner fa-spin fa-fw");
|
||
|
if (response === true) {
|
||
|
//fa fa-check-circle fa-5x
|
||
|
$('#statusIcon').addClass("fa-check-circle");
|
||
|
$('#statusText').text("currently online");
|
||
|
$('#statusTitle').text("Currently Online");
|
||
|
} else {
|
||
|
$('#statusIcon').addClass("fa-times-circle");
|
||
|
$('#statusText').text("currently offline");
|
||
|
$('#statusTitle').text("Currently Offline");
|
||
|
}
|
||
|
},
|
||
|
error: function (e) {
|
||
|
console.log(e);
|
||
|
$('#statusIcon').addClass("fa-times-circle");
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|