app/BTCPayApp.UI/Components/InstanceLogo.razor
2024-06-24 19:31:29 +02:00

15 lines
528 B
Plaintext

@using BTCPayApp.CommonServer.Models
@using BTCPayApp.UI.Features
@inherits Fluxor.Blazor.Web.Components.FluxorComponent
@inject IState<UIState> UIState
<img src="@LogoUrl" alt="@LogoText" class="logo"/>
@code {
private AppInstanceInfo? InstanceInfo => UIState.Value.Instance?.Data;
private string LogoText => InstanceInfo?.ServerName ?? "BTCPay Server";
private string LogoUrl => !string.IsNullOrEmpty(InstanceInfo?.LogoUrl)
? InstanceInfo.LogoUrl
: "_content/BTCPayApp.UI/img/logo-symbol.svg";
}