support ~ notation for license urls

This commit is contained in:
sbwalker
2023-08-28 07:49:06 -04:00
parent 85f20aca58
commit 45592e6acd
2 changed files with 26 additions and 34 deletions

View File

@ -68,9 +68,9 @@
<div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="license" HelpText="The license of the theme" ResourceKey="License">License: </Label>
<div class="col-sm-9">
@if (_license.StartsWith("http") || _license.StartsWith("/"))
@if (_license.StartsWith("http") || _license.StartsWith("/") || _license.StartsWith("~"))
{
<a href="@_license" class="btn btn-info" style="text-decoration: none !important" target="_new">@Localizer["View License"]</a>
<a href="@_license.Replace("~", PageState?.Alias.BaseUrl + "/Themes/" + Utilities.GetTypeName(_themeName))" class="btn btn-info" style="text-decoration: none !important" target="_new">@Localizer["View License"]</a>
}
else
{