mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
23 lines
747 B
Text
23 lines
747 B
Text
|
@using BTCPayServer.Abstractions.Extensions;
|
||
|
@using BTCPayServer.Configuration;
|
||
|
@using Microsoft.AspNetCore.Hosting;
|
||
|
@using Microsoft.AspNetCore.Mvc.Routing;
|
||
|
@using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||
|
@using Microsoft.AspNetCore.Mvc;
|
||
|
@inject IFileVersionProvider FileVersionProvider
|
||
|
@inject BTCPayServerOptions BTCPayServerOptions
|
||
|
|
||
|
<svg role="img" class="icon icon-@Symbol">
|
||
|
<use href="@GetPathTo(Symbol)"></use>
|
||
|
</svg>
|
||
|
@code {
|
||
|
public string GetPathTo(string symbol)
|
||
|
{
|
||
|
var versioned = FileVersionProvider.AddFileVersionToPath(default, "img/icon-sprite.svg");
|
||
|
var rootPath = (BTCPayServerOptions.RootPath ?? "/").WithTrailingSlash();
|
||
|
return $"{rootPath}{versioned}#{Symbol}";
|
||
|
}
|
||
|
[Parameter]
|
||
|
public string Symbol { get; set; }
|
||
|
}
|