Discord Bot web UI first preview
This commit is contained in:
116
DiscordBotPlugins/DiscordBotUI/Views/Bot/Start.cshtml
Normal file
116
DiscordBotPlugins/DiscordBotUI/Views/Bot/Start.cshtml
Normal file
@@ -0,0 +1,116 @@
|
||||
@model DiscordBotUI.Models.Bot.BotModel
|
||||
|
||||
<label>Bot Name: @Model.BotName</label>
|
||||
<br />
|
||||
<label>Connection Status: @Model.StartStatus</label>
|
||||
<br />
|
||||
<label>Number of plugins loaded: @Model.PluginsLoaded</label>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* Clearfix (clear floats) */
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<h2>Commands</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
<th> Description</th>
|
||||
<th> Usage</th>
|
||||
<th> Aliases</th>
|
||||
</tr>
|
||||
@foreach(var cmd in Model.Commands)
|
||||
{
|
||||
<tr>
|
||||
<td>@cmd.Command</td>
|
||||
<td>@cmd.Description</td>
|
||||
<td>@cmd.Usage</td>
|
||||
@if (cmd.Aliases is not null)
|
||||
{
|
||||
<td>@cmd.Aliases</td>
|
||||
} else
|
||||
{
|
||||
<td>No aliases found</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h2>Events</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
<th> Description</th>
|
||||
</tr>
|
||||
@foreach(var eve in Model.Events)
|
||||
{
|
||||
<tr>
|
||||
<td>@eve.Name</td>
|
||||
<td>@eve.Description</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<h2>Slash Commands</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th> Name</th>
|
||||
<th> Description</th>
|
||||
<th> Avalable in DM</th>
|
||||
</tr>
|
||||
@foreach(var scmd in Model.SlashCommands)
|
||||
{
|
||||
<tr>
|
||||
<td>@scmd.Name</td>
|
||||
<td>@scmd.Description</td>
|
||||
@if (scmd.canUseDM)
|
||||
{
|
||||
<td>true</td>
|
||||
} else {
|
||||
<td>false</td>
|
||||
}
|
||||
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user