@if (IsLoading)
{
@Localizer["loading"]
}
else if (instance is null)
{
@Localizer["The server's description could not be read."]
@Localizer["Retry"]
}
else
{
@if (instance.Thumbnail.Url is { Length: > 0 } thumbnail)
{
@* decorative: the server's name follows *@
}
@instance.Title
@if (instance.Domain is { Length: > 0 } domain)
{
@domain
}
@if (instance.Description is { Length: > 0 } summary)
{
@summary
}
@if (description?.Content is { Length: > 0 } extended)
{
@((MarkupString)extended)
@if (description.UpdatedAt is { } describedAt)
{
@Localizer["Last changed on {0}", describedAt.ToLocalTime().ToString(SUtility.dateTimeFormat)]
}
}
@if (instance.Contact.Email is { Length: > 0 } || instance.Contact.Account is not null)
{
@Localizer["Contact"]
@if (instance.Contact.Account is { } account)
{
@CustomEmojis.Text(account.Name, account.Emojis)
@("@" + account.Acct)
}
@if (instance.Contact.Email is { Length: > 0 } email)
{
@email
}
}
@Localizer["Rules"]
@if (instance.Rules.Count == 0)
{
@Localizer["The server has no rules."]
}
else
{
@foreach (var rule in instance.Rules)
{
-
@rule.Text
@if (rule.Hint is { Length: > 0 } hint)
{
@hint
}
}
}
@if (privacy?.Content is { Length: > 0 } policy)
{
@Localizer["Privacy policy"]
@((MarkupString)policy)
@if (privacy.UpdatedAt is { } policyAt)
{
@Localizer["Last changed on {0}", policyAt.ToLocalTime().ToString(SUtility.dateTimeFormat)]
}
}
@if (terms?.Content is { Length: > 0 } termsText)
{
@Localizer["Terms of service"]
@if (TermsDate is { } effectiveOn)
{
@(terms.Effective ? Localizer["In effect since {0}", effectiveOn] : Localizer["In effect from {0}", effectiveOn])
}
@((MarkupString)termsText)
}
@if (blocks.Count > 0)
{
@Localizer["Moderated servers"]
@Localizer["This server does not exchange with these, or keeps them out of its public feeds."]
}
}