[backend/razor] Show register link in Public Preview footer if registrations aren't closed
This commit is contained in:
parent
49e9c6d825
commit
ca567e4aba
1 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
@inject IOptions<Config.InstanceSection> Instance
|
@inject IOptions<Config> Config
|
||||||
@using Iceshrimp.Backend.Core.Configuration
|
@using Iceshrimp.Backend.Core.Configuration
|
||||||
@using Iceshrimp.Backend.Core.Extensions
|
@using Iceshrimp.Backend.Core.Extensions
|
||||||
@using Iceshrimp.Backend.Core.Middleware
|
@using Iceshrimp.Backend.Core.Middleware
|
||||||
|
@ -22,11 +22,18 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<span>
|
<span>
|
||||||
<strong>Iceshrimp.NET</strong> v@(Instance.Value.Version)
|
<strong>Iceshrimp.NET</strong> v@(Config.Value.Instance.Version)
|
||||||
</span>
|
</span>
|
||||||
@if (!Context.ShouldHideFooter())
|
@if (!Context.ShouldHideFooter())
|
||||||
{
|
{
|
||||||
|
<div>
|
||||||
|
@if (Config.Value.Security.Registrations != Enums.Registrations.Closed)
|
||||||
|
{
|
||||||
|
<a href="/register">Register</a>
|
||||||
|
<span aria-hidden="true">•</span>
|
||||||
|
}
|
||||||
<a href="/login?rd=@((Context.Request.Path.Value ?? "/").UrlEncode())">Login</a>
|
<a href="/login?rd=@((Context.Request.Path.Value ?? "/").UrlEncode())">Login</a>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Add table
Reference in a new issue