Add admin-placeable alerts

This commit is contained in:
Celestora 2021-11-02 23:07:26 +02:00
parent 69ff2309f6
commit 9e86389b62
4 changed files with 17 additions and 1 deletions

View file

@ -204,6 +204,11 @@ class User extends RowModel
return $this->getRecord()->shortcode; return $this->getRecord()->shortcode;
} }
function getAlert(): ?string
{
return $this->getRecord()->alert;
}
function getBanReason(): ?string function getBanReason(): ?string
{ {
return $this->getRecord()->block_reason; return $this->getRecord()->block_reason;

View file

@ -349,7 +349,7 @@
<div class="right_big_block"> <div class="right_big_block">
<div class="page_info"> <div class="page_info">
<div n:if="!is_null($alert = $user->getAlert())" class="user-alert">{$alert}</div>
<div class="accountInfo clearFix"> <div class="accountInfo clearFix">
<div class="profileName"> <div class="profileName">
<h2>{$user->getFullName()}</h2> <h2>{$user->getFullName()}</h2>

View file

@ -1433,3 +1433,13 @@ body.scrolled .toTop:hover {
#ovkDraw .literally .lc-picker .toolbar-button:hover:not(.disabled), #ovkDraw .literally .horz-toolbar .square-toolbar-button:hover:not(.disabled) { #ovkDraw .literally .lc-picker .toolbar-button:hover:not(.disabled), #ovkDraw .literally .horz-toolbar .square-toolbar-button:hover:not(.disabled) {
border-color: #cdcdcd; border-color: #cdcdcd;
} }
.user-alert {
margin-left: 9px;
margin-bottom: 8px;
padding: 4px;
border: 1px solid #c3a476;
font-weight: 900;
background-color: #f3ddbd;
color: #58462a;
}

View file

@ -0,0 +1 @@
ALTER TABLE `profiles` ADD `alert` TEXT NULL DEFAULT NULL AFTER `since`;