oliverbooth.dev/OliverBooth/Pages/Contact/Blacklist.cshtml

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-12-22 14:26:18 +00:00
@page
@using OliverBooth.Common.Data.Web.Contact
@using OliverBooth.Common.Services
2023-12-22 14:26:18 +00:00
@inject IContactService ContactService
@{
ViewData["Title"] = "Blacklist";
}
<main class="container">
<h1 class="display-4">Contact Blacklist</h1>
<p>
Below is a list of email addresses that have been blocked from contacting me. This list is public so that others
may also block these addresses if they wish. Any email address that contains an asterisk (*) is a wildcard,
meaning that any email address that matches the pattern will be blocked.
</p>
2023-12-22 14:26:18 +00:00
<p>
You can view this list in JSON format
<a asp-controller="FormattedBlacklist" asp-action="OnGet" asp-route-format="json">here</a>,
or in CSV format
<a asp-controller="FormattedBlacklist" asp-action="OnGet" asp-route-format="csv">here</a>.
</p>
2023-12-22 14:26:18 +00:00
<table class="table">
2023-12-22 14:26:18 +00:00
<tr>
<th>Name / Email</th>
<th>Reason</th>
2023-12-22 14:26:18 +00:00
</tr>
@foreach (IBlacklistEntry entry in ContactService.GetBlacklist())
{
<tr>
<td>@entry.Name &lt;@entry.EmailAddress&gt;</td>
<td>@entry.Reason</td>
</tr>
}
</table>
</main>