mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
272cc3d3c9
* Login Code: Turn into Blazor component and extend with data for the app * POS: Add login code for POS frontend * Improve components, fix test
20 lines
618 B
Plaintext
20 lines
618 B
Plaintext
@using BTCPayServer.Configuration;
|
|
@using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
|
@inject IFileVersionProvider FileVersionProvider
|
|
@inject BTCPayServerOptions BTCPayServerOptions
|
|
|
|
<svg role="img" class="icon icon-@Symbol">
|
|
<use href="@GetPathTo(Symbol)"></use>
|
|
</svg>
|
|
@code {
|
|
[Parameter, EditorRequired]
|
|
public string Symbol { get; set; }
|
|
|
|
private string GetPathTo(string symbol)
|
|
{
|
|
var versioned = FileVersionProvider.AddFileVersionToPath(default, "img/icon-sprite.svg");
|
|
var rootPath = (BTCPayServerOptions.RootPath ?? "/").WithTrailingSlash();
|
|
return $"{rootPath}{versioned}#{symbol}";
|
|
}
|
|
}
|