pages all work

This commit is contained in:
adam 2025-03-18 20:14:52 -04:00
parent 488a89614a
commit b6f74f580c
5 changed files with 9 additions and 13 deletions

View File

@ -10,13 +10,6 @@ namespace vassago.WebInterface.Controllers;
public class ChannelsController() : Controller public class ChannelsController() : Controller
{ {
public IActionResult Index()
{
var channels = Rememberer.ChannelsOverview();
return channels != null ?
View(channels.OrderBy(c => c.LineageSummary)) :
Problem("Entity set '_db.Channels' is null.");
}
public async Task<IActionResult> Details(Guid id) public async Task<IActionResult> Details(Guid id)
{ {
var allChannels = Rememberer.ChannelsOverview(); var allChannels = Rememberer.ChannelsOverview();

View File

@ -4,16 +4,18 @@
@{ @{
ViewData["Title"] = "Account details"; ViewData["Title"] = "Account details";
} }
<a href="/">home</a>/@Html.Raw(ViewData["breadcrumbs"])
<table class="table"> <table class="table">
<tbody> <tbody>
<tr> <tr>
<th scope="row">belongs to user</th> <th scope="row">belongs to user</th>
<td>@Model.IsUser.DisplayName</td> <td>@Model.IsUser.DisplayName</td>
<td><button alt="to do" disabled>separate</button></td> <td><button alt="to do" disabled>separate</button></2td>
</tr> </tr>
<tr> <tr>
<th scope="row">Seen in channel</th> <th scope="row">Seen in channel</th>
<td><div class="protocol-icon">&nbsp;</div>@Model.SeenInChannel.LineageSummary<a href="/Channels/Details/@Model.SeenInChannel.Id">@Model.SeenInChannel.DisplayName</a></td> <td class="account @Model.SeenInChannel.Protocol"><div class="protocol-icon">&nbsp;</div>@Model.SeenInChannel.LineageSummary<a href="/Channels/Details/@Model.SeenInChannel.Id">@Model.SeenInChannel.DisplayName</a></td>
</tr> </tr>
<tr> <tr>
<th scope="row">Permission Tags</th> <th scope="row">Permission Tags</th>

View File

@ -152,7 +152,7 @@
foreach (var acc in ThisChannel.Users.OrderBy(a => a.SeenInChannel.LineageSummary)) foreach (var acc in ThisChannel.Users.OrderBy(a => a.SeenInChannel.LineageSummary))
{ {
if(!first) if(!first)
sb.Append(','); sb.Append(',');
sb.Append($"{{text: \"<div class=\\\"account {acc.Protocol}\\\"><div class=\\\"protocol-icon\\\">&nbsp;</div>{acc.SeenInChannel.LineageSummary}/<a href=\\\"/Accounts/Details/{acc.Id}\\\">{acc.DisplayName}</a>\"}}"); sb.Append($"{{text: \"<div class=\\\"account {acc.Protocol}\\\"><div class=\\\"protocol-icon\\\">&nbsp;</div>{acc.SeenInChannel.LineageSummary}/<a href=\\\"/Accounts/Details/{acc.Id}\\\">{acc.DisplayName}</a>\"}}");
first=false; first=false;
} }

View File

@ -1,8 +1,7 @@
@{ @{
ViewData["Title"] = "Home Page"; ViewData["Title"] = "Home Page";
} }
<div id="tree"></div> <div id="tree">tree here</div>
tree above.
@section Scripts{ @section Scripts{
<script type="text/javascript"> <script type="text/javascript">

View File

@ -4,11 +4,13 @@
@{ @{
ViewData["Title"] = "User details"; ViewData["Title"] = "User details";
} }
<a href="/">home</a>/@Html.Raw(ViewData["breadcrumbs"])
<table class="table"> <table class="table">
<tbody> <tbody>
<tr> <tr>
<th scope="row">Display Name (here)</th> <th scope="row">Display Name (here)</th>
<td><input type="text" id="displayName" value="@Model.DisplayName"></input> <button <td><input type="text" id="displayName" value="@Model.DisplayName" disabled alt="todo"></input> <button
onclick="patchModel(jsonifyUser(), @Html.Raw("'/api/Users/'"))" disabled alt"todo">update</button></td> onclick="patchModel(jsonifyUser(), @Html.Raw("'/api/Users/'"))" disabled alt"todo">update</button></td>
</tr> </tr>
<tr> <tr>