Remotely/Server/Pages/Index.cshtml
2021-07-29 07:56:55 -07:00

34 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@page
@model IndexModel
@using Remotely.Shared.Utilities
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostEnv
@{
ViewData["Title"] = "Home";
}
@if (!User.Identity.IsAuthenticated)
{
<partial name="_IndexNotLoggedIn" model="Model" />
}
else
{
<div id="motdAlert" class="alert alert-info alert-dismissible mr-5" role="alert" hidden>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<span id="motdContentSpan">@Model.Motd</span>
</div>
@if (Model.IsNewVersionAvailable)
{
<div class="alert alert-info alert-dismissible mr-5" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<span class="mr-1">A new version is available! Upgrade scripts:</span>
<a class="mr-1" href="~/Downloads/Ubuntu-Upgrade.sh">Ubuntu</a>
<a class="mr-1" href="~/Downloads/Windows-Upgrade.ps1">Windows</a>
<a class="mr-1" href="~/Downloads/CentOS-Upgrade.sh">CentOS</a>
</div>
}
<partial name="_LoadingWheel" model="Model" />
<partial name="_IndexLoggedIn" model="Model" />
}