finish color code support (I think)

This commit is contained in:
RaidMax
2019-08-02 18:04:34 -05:00
parent dfecb99d07
commit bb42861a92
35 changed files with 990 additions and 70 deletions

View File

@ -39,7 +39,9 @@
{
<div class="p-2 mb-3 border-bottom" style="background-color: #222;">
<div class="d-flex flex-row">
<a asp-controller="Client" asp-action="ProfileAsync" asp-route-id="@client.ClientId" class="h4 mr-auto">@client.Name</a>
<a asp-controller="Client" asp-action="ProfileAsync" asp-route-id="@client.ClientId" class="h4 mr-auto">
<color-code value="@client.Name" allow="@ViewBag.EnableColorCodes"></color-code>
</a>
<div class="client-location-flag align-self-center" data-ip="@client.IPAddress"></div>
</div>
<div class="d-flex flex-row">

View File

@ -51,18 +51,17 @@
}
@switch (meta.Type)
{
case SharedLibraryCore.Dtos.ProfileMeta.MetaType.ChatMessage:
case SharedLibraryCore.Dtos.ProfileMeta.MetaType.QuickMessage:
{
case SharedLibraryCore.Dtos.ProfileMeta.MetaType.ChatMessage:
case SharedLibraryCore.Dtos.ProfileMeta.MetaType.QuickMessage:
<div class="profile-meta-entry loader-data-time" data-time="@meta.When">
<span style="color:white;">></span>
<span class="client-message text-muted @(meta.Type == SharedLibraryCore.Dtos.ProfileMeta.MetaType.QuickMessage ? "font-italic" : "")" data-serverid="@meta.Extra" data-when="@meta.When.ToFileTimeUtc()" title="@SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_PROFILE_MESSAGE_CONTEXT"]"> @meta.Value</span>
<span class="client-message text-muted @(meta.Type == SharedLibraryCore.Dtos.ProfileMeta.MetaType.QuickMessage ? "font-italic" : "")" data-serverid="@meta.Extra" data-when="@meta.When.ToFileTimeUtc()" title="@SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_PROFILE_MESSAGE_CONTEXT"]"> <color-code value="@meta.Value" allow="@ViewBag.EnableColorCodes"></color-code></span>
</div>
break;
case SharedLibraryCore.Dtos.ProfileMeta.MetaType.ReceivedPenalty:
case SharedLibraryCore.Dtos.ProfileMeta.MetaType.Penalized:
<div class="profile-meta-entry loader-data-time" data-time="@meta.When">@Html.Raw(formatPenalty(meta))</div>
<div class="profile-meta-entry loader-data-time" data-time="@meta.When"><color-code value="@Html.Raw(formatPenalty(meta))" allow="@ViewBag.EnableColorCodes"></color-code></div>
break;
}
}