Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: increase client name prominence #154

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public static class ViewHelpers
{
public static string GetClientName(string clientId, string clientName)
{
return $"{clientId} ({clientName})";
return $"{clientName} ({clientId})";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a asp-area="@CommonConsts.AdminUIArea" asp-controller="Configuration" asp-action="Clients">@Localizer["NavigationClients"]</a></li>
<li class="breadcrumb-item active" aria-current="page">@Model.ClientId</li>
<li class="breadcrumb-item active" aria-current="page">@Model.ClientName (@Model.ClientId)</li>
</ol>
</nav>
</div>

@if (Model.Id != 0)
{
<div class="col-12">
<h2>@Localizer["Title"] @Model.ClientId</h2>
<h2>@Localizer["Title"] @Model.ClientName</h2>
</div>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
<h5 class="card-header">@Localizer["PanelTitle"]</h5>
<div class="card-body">

<!--Input - text -->
<div class="form-group row">
<label asp-for="ClientName" class="col-sm-3 col-form-label">
@await Html.PartialAsync("Client/Section/Label", "ClientName")
</label>
<div class="col-sm-9">
<input type="text" required class="form-control" asp-for="ClientName">
<span asp-validation-for="ClientName" class="text-danger"></span>
</div>
</div>

<!--Input - text -->
<div class="form-group row">
<label asp-for="ClientId" class="col-sm-3 col-form-label">
Expand All @@ -17,23 +28,14 @@
<input id="clientid-input" type="text" required class="form-control" asp-for="ClientId">
<span asp-validation-for="ClientId" class="text-danger"></span>
<div class="input-group-append">
<button type="button" id="generate-clientid-button" class="btn btn-primary"><span class="oi oi-random"></span></button>
<button type="button" id="generate-clientid-button" class="btn btn-primary">
<span class="oi oi-random"></span>
</button>
</div>
</div>
</div>
</div>

<!--Input - text -->
<div class="form-group row">
<label asp-for="ClientName" class="col-sm-3 col-form-label">
@await Html.PartialAsync("Client/Section/Label", "ClientName")
</label>
<div class="col-sm-9">
<input type="text" required class="form-control" asp-for="ClientName">
<span asp-validation-for="ClientName" class="text-danger"></span>
</div>
</div>

@if (Model.Id != default)
{
<!--Input - text -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<thead>
<tr>
<th></th>
<th>@Localizer["TableClientId"]</th>
<th>@Localizer["TableClientName"]</th>
<th>@Localizer["TableClientId"]</th>
<th></th>
</tr>
</thead>
Expand All @@ -39,8 +39,8 @@
{
<tr>
<th><a asp-area="@CommonConsts.AdminUIArea" class="btn btn-primary" asp-action="Client" asp-route-id="@client.Id">@Localizer["TableButtonEdit"]</a></th>
<td>@client.ClientId</td>
<td>@client.ClientName</td>
<td><code>@client.ClientId</code></td>
<td>
<a asp-area="@CommonConsts.AdminUIArea" class="btn btn-danger" asp-action="ClientDelete" asp-route-id="@client.Id"><span class="oi oi-x"></span></a>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{
<tr>
<td><a class="btn btn-danger" asp-area="@CommonConsts.AdminUIArea" asp-action="PersistedGrantDelete" asp-route-id="@UrlHelpers.QueryStringSafeHash(persistedGrant.Key)"><span class="oi oi-x"></span></a></td>
<td>@persistedGrant.SubjectId</td>
<td><code>@persistedGrant.SubjectId</code></td>
<td>@persistedGrant.Type</td>
<td>@persistedGrant.Expiration</td>
<td>@persistedGrant.Data</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
<tr>
<th scope="row"><a asp-area="@CommonConsts.AdminUIArea" class="btn btn-primary" asp-action="PersistedGrant" asp-route-id="@persistedGrant.SubjectId">@Localizer["TableButtonDetail"]</a></th>
<td>@persistedGrant.SubjectId</td>
<td><code>@persistedGrant.SubjectId</code></td>
<td>@persistedGrant.SubjectName</td>
</tr>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<td class="align-middle">
<img-gravatar email="@user.Email" class="gravatar-image img-thumbnail" />
</td>
<td class="align-middle">@user.Id</td>
<td class="align-middle"><code>@user.Id</code></td>
<td class="align-middle">@user.UserName</td>
<td class="align-middle">@user.Email</td>
<td class="align-middle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<td class="align-middle">
<img-gravatar email="@user.Email" class="gravatar-image img-thumbnail" />
</td>
<td class="align-middle">@user.Id</td>
<td class="align-middle"><code>@user.Id</code></td>
<td class="align-middle">@user.UserName</td>
<td class="align-middle">@user.Email</td>
<td class="align-middle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@foreach (var key in Model.Keys)
{
<tr>
<th scope="row">@key.Id</th>
<th scope="row"><code>@key.Id</code></th>
<td>@key.Version</td>
<td>@key.Algorithm</td>
<td>@key.Use</td>
Expand Down