better align player names/chat

This commit is contained in:
RaidMax 2022-04-20 14:16:34 -05:00
parent 1df76b6ac3
commit 4884abee76

View File

@ -25,13 +25,13 @@
<div class="pt-15 pl-15 pr-15 d-flex flex-wrap flex-column flex-md-row justify-content-between w-full w-auto-lg"> <div class="pt-15 pl-15 pr-15 d-flex flex-wrap flex-column flex-md-row justify-content-between w-full w-auto-lg">
@if (groupedClients.Count > 0) @if (groupedClients.Count > 0)
{ {
<div class="flex-fill flex-lg-grow-0 w-half-md mr-md-10 mb-md-10"> <div class="flex-fill flex-lg-grow-0 w-full w-md-half pr-md-10 pb-md-10">
@foreach (var chat in Model.ChatHistory) @foreach (var chat in Model.ChatHistory)
{ {
var message = chat.IsHidden && !ViewBag.Authorized ? chat.HiddenMessage : chat.Message; var message = chat.IsHidden && !ViewBag.Authorized ? chat.HiddenMessage : chat.Message;
var stateIcon = GetIconForState(chat.Message); var stateIcon = GetIconForState(chat.Message);
<div> <div class="text-truncate">
<i class="oi @stateIcon"></i> <i class="oi @stateIcon"></i>
<span> <span>
@ -53,21 +53,21 @@
</div> </div>
} }
<div class="d-flex flex-row flex-fill flex-lg-grow-0 w-half-md"> <div class="d-flex flex-row w-full w-md-half w-xl-auto pl-md-10 pb-md-10">
@foreach (var clientIndex in groupedClients) @foreach (var clientIndex in groupedClients)
{ {
<div class="@(clientIndex.index == 1 ? "pl-md-10 text-right" : "pr-md-10") flex-fill"> <div class="@(clientIndex.index == 1 ? "pl-md-10" : "pr-md-10") w-half w-xl-full">
@foreach (var client in clientIndex.group) @foreach (var client in clientIndex.group)
{ {
var levelColorClass = !ViewBag.Authorized || client.client.LevelInt == 0 ? "text-light-dm text-dark-lm" : $"level-color-{client.client.LevelInt}"; var levelColorClass = !ViewBag.Authorized || client.client.LevelInt == 0 ? "text-light-dm text-dark-lm" : $"level-color-{client.client.LevelInt}";
<div class="d-flex @(clientIndex.index == 1 ? "flex-row-reverse" : "") w-xl-150"> <div class="d-flex @(clientIndex.index == 1 ? "justify-content-end ml-auto" : "ml-auto") w-full w-xl-200">
<has-permission entity="AdminMenu" required-permission="Update"> <has-permission entity="AdminMenu" required-permission="Update">
<a href="#actionModal" class="profile-action" data-action="kick" data-action-id="@client.client.ClientId" aria-hidden="true"> <a href="#actionModal" class="profile-action" data-action="kick" data-action-id="@client.client.ClientId" aria-hidden="true">
<i class="oi oi-circle-x font-size-12 @levelColorClass"></i> <i class="oi oi-circle-x font-size-12 @levelColorClass"></i>
</a> </a>
</has-permission> </has-permission>
<a asp-controller="Client" asp-action="Profile" asp-route-id="@client.client.ClientId" class="@(clientIndex.index == 1 ? "mr-5" : "ml-5") @levelColorClass no-decoration"> <a asp-controller="Client" asp-action="Profile" asp-route-id="@client.client.ClientId" class="@levelColorClass no-decoration text-truncate">
<color-code value="@client.client.Name"></color-code> <color-code value="@client.client.Name"></color-code>
</a> </a>
</div> </div>