90 lines
2.8 KiB
Plaintext
90 lines
2.8 KiB
Plaintext
@using System.ComponentModel
|
|
@using Newtonsoft.Json
|
|
@model Channel
|
|
|
|
@Html.Raw(ViewData["breadcrumbs"])
|
|
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row">Display Name</th>
|
|
<td>@Model.DisplayName</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Channel type</th>
|
|
<td>@(Model.ChannelType != null ? Enumerations.GetDescription(Model.ChannelType) : "?")</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Lewdness Filter Level</th>
|
|
<td>
|
|
<select name="LewdnessFilterLevel" id="LewdnessFilterLevel" onchange="postmodelupdate(jsonifyChannel())">
|
|
<!option value="" @(Model.LewdnessFilterLevel == null ? "selected" : "")>inhereted</!option>
|
|
@foreach (Enumerations.LewdnessFilterLevel enumVal in Enum.GetValues(typeof(Enumerations.LewdnessFilterLevel)))
|
|
{
|
|
<!option value="@((int)enumVal)" @(Model.LewdnessFilterLevel == enumVal ? "selected" : "")>@(Enumerations.GetDescription<Enumerations.LewdnessFilterLevel>(enumVal))</!option>
|
|
}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Links Allowed</th>
|
|
<td>@(Model.LinksAllowed?.ToString() ?? "unknown")</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Lineage summary</th>
|
|
<td>@Model.LineageSummary</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">max attachment bytes</th>
|
|
<td>@Model.MaxAttachmentBytes (i hear there's "ByteSize")</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">max message length</th>
|
|
<td>@(Model.MaxTextChars?.ToString() ?? "inherited")</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Meanness Filter Level</th>
|
|
<td>@(Model.MeannessFilterLevel != null ? Enumerations.GetDescription<Enumerations.MeannessFilterLevel>(Model.MeannessFilterLevel.GetValueOrDefault()) : "inherited")</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Messages (count)</th>
|
|
<td>@(Model.Messages?.Count ?? 0)</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Protocol</th>
|
|
<td>@Model.Protocol</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Reactions Possible</th>
|
|
<td>@(Model.ReactionsPossible?.ToString() ?? "inherited")</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Sub Channels</th>
|
|
<td>@(Model.SubChannels?.Count ?? 0)</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Users</th>
|
|
<td>@(Model.Users?.Count ?? 0)</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
@section Scripts{
|
|
<script type="text/javascript">
|
|
@{
|
|
var modelAsString = JsonConvert.SerializeObject(Model, new JsonSerializerSettings
|
|
{
|
|
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
|
});
|
|
}
|
|
const channelOnLoad = @Html.Raw(modelAsString);
|
|
function jsonifyChannel()
|
|
{
|
|
var channelNow = channelOnLoad;
|
|
channelNow.LewdnessFilterLevel = document.querySelector("#LewdnessFilterLevel").value;
|
|
console.log(channelNow);
|
|
return channelNow;
|
|
}
|
|
</script>
|
|
} |