mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
This commit is contained in:
parent
4d2539e1a2
commit
17502d695b
3 changed files with 5 additions and 12 deletions
|
@ -18,7 +18,6 @@ namespace PlexRequests.UI.Modules
|
||||||
public DonationLinkModule(ICacheProvider provider, ISettingsService<PlexRequestSettings> pr, ISecurityExtensions security) : base("customDonation", pr, security)
|
public DonationLinkModule(ICacheProvider provider, ISettingsService<PlexRequestSettings> pr, ISecurityExtensions security) : base("customDonation", pr, security)
|
||||||
{
|
{
|
||||||
Cache = provider;
|
Cache = provider;
|
||||||
|
|
||||||
Get["/", true] = async (x, ct) => await GetCustomDonationUrl(pr);
|
Get["/", true] = async (x, ct) => await GetCustomDonationUrl(pr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,14 +30,12 @@ namespace PlexRequests.UI.Modules
|
||||||
PlexRequestSettings settings = await pr.GetSettingsAsync();
|
PlexRequestSettings settings = await pr.GetSettingsAsync();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (settings.EnableCustomDonationUrl)
|
if (settings.EnableCustomDonationUrl && Security.IsLoggedIn(Context))
|
||||||
{
|
{
|
||||||
return Response.AsJson(new { url = settings.CustomDonationUrl, message = settings.CustomDonationMessage, enabled = true });
|
return Response.AsJson(new { url = settings.CustomDonationUrl, message = settings.CustomDonationMessage, enabled = true });
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return Response.AsJson(new { enabled = false });
|
||||||
return Response.AsJson(new { enabled = false });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
{
|
{
|
||||||
@Html.GetNavbarUrl(Context, "/usermanagement", UI.Layout_Usermanagement, "users")
|
@Html.GetNavbarUrl(Context, "/usermanagement", UI.Layout_Usermanagement, "users")
|
||||||
}
|
}
|
||||||
@*@if (Context.CurrentUser.IsAuthenticated()) // TODO replace with IsAdmin*@
|
|
||||||
@if (Html.IsAdmin())
|
@if (Html.IsAdmin())
|
||||||
{
|
{
|
||||||
<li><a id="donate" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: red"></i> @UI.Layout_Donate</a></li>
|
<li><a id="donate" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: red"></i> @UI.Layout_Donate</a></li>
|
||||||
|
@ -48,12 +47,10 @@
|
||||||
<li id="customDonate" style="display: none"><a id="customDonateHref" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: yellow;"></i> <span id="donationText">@UI.Custom_Donation_Default</span></a></li>
|
<li id="customDonate" style="display: none"><a id="customDonateHref" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: yellow;"></i> <span id="donationText">@UI.Custom_Donation_Default</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
@*@if (!Context.CurrentUser.IsAuthenticated() && Context.Request.Session[SessionKeys.UsernameKey] == null) // TODO replace with IsAdmin*@
|
|
||||||
@if (!Html.IsLoggedIn(Context))
|
@if (!Html.IsLoggedIn(Context))
|
||||||
{
|
{
|
||||||
<li><a href="@url/login?redirect=@Context.Request.Path"><i class="fa fa-user"></i> @UI.Layout_Admin</a></li>
|
<li><a href="@url/login?redirect=@Context.Request.Path"><i class="fa fa-user"></i> @UI.Layout_Admin</a></li>
|
||||||
}
|
}
|
||||||
@*@if (Context.CurrentUser.IsAuthenticated()) // TODO replace with IsAdmin*@
|
|
||||||
@if (Html.IsAdmin())
|
@if (Html.IsAdmin())
|
||||||
{
|
{
|
||||||
<li><a>@UI.Layout_Welcome @Context.CurrentUser.UserName</a></li>
|
<li><a>@UI.Layout_Welcome @Context.CurrentUser.UserName</a></li>
|
||||||
|
@ -68,7 +65,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
@*@if (Context.Request.Session[SessionKeys.UsernameKey] != null && !Context.CurrentUser.IsAuthenticated())*@
|
|
||||||
else if (Html.IsNormalUser()) // Logged in but not admin
|
else if (Html.IsNormalUser()) // Logged in but not admin
|
||||||
{
|
{
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
|
|
|
@ -3,9 +3,9 @@ configuration: Release
|
||||||
assembly_info:
|
assembly_info:
|
||||||
patch: true
|
patch: true
|
||||||
file: '**\AssemblyInfo.*'
|
file: '**\AssemblyInfo.*'
|
||||||
assembly_version: '1.10.0'
|
assembly_version: '1.10.1'
|
||||||
assembly_file_version: '{version}'
|
assembly_file_version: '{version}'
|
||||||
assembly_informational_version: '1.10.0'
|
assembly_informational_version: '1.10.1'
|
||||||
before_build:
|
before_build:
|
||||||
- cmd: appveyor-retry nuget restore
|
- cmd: appveyor-retry nuget restore
|
||||||
build:
|
build:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue