From ed1b53e3d216ada891844a299f188812842ae043 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Mon, 28 Sep 2026 17:55:01 -0400 Subject: [PATCH 1/3] feature: warning sanction UI - The sanction picker offers a Warning. It needs a reason, has no duration, and says it is saved to the record, notifies the player, and is never enforced and never expires. - The sanctions sheet shows a warning as its own amber entry (TriangleAlert, "On record" pill) with no end-date edit and no Permanent/Expires row. Warnings never count toward the active/danger state on the profile hero. - Removing a sanction passes its sanction_id: the api needs it for a warning and removes only that row. - Sanction type labels are localized. - PlayerWarning notifications get the amber accent bar, title and icon. PlayerSanctioned gets the destructive tint where it is certainly a ban (the admin alert and the banned player's own notice). - generated/zeus is hand-patched for warning, PlayerWarning and sanction_id until the next codegen. --- components/PlayerSanctions.vue | 51 +++- components/SanctionPlayer.vue | 48 +++- components/notification/NotificationItem.vue | 58 ++++- generated/zeus/const.full.ts | 2 +- generated/zeus/const.ts | 2 +- generated/zeus/index.ts | 8 +- i18n/locales/ar_SA.json | 22 +- i18n/locales/da_DK.json | 22 +- i18n/locales/de_DE.json | 22 +- i18n/locales/en.json | 22 +- i18n/locales/es_ES.json | 22 +- i18n/locales/fr_FR.json | 22 +- i18n/locales/it_IT.json | 22 +- i18n/locales/ja_JP.json | 22 +- i18n/locales/ko_KR.json | 22 +- i18n/locales/pl_PL.json | 22 +- i18n/locales/pt_BR.json | 22 +- i18n/locales/ru_RU.json | 22 +- i18n/locales/sv_SE.json | 22 +- i18n/locales/tr_TR.json | 22 +- i18n/locales/uk_UA.json | 22 +- i18n/locales/zh_Hans.json | 22 +- i18n/locales/zh_Hant.json | 22 +- tests/components/PlayerSanctions.spec.ts | 222 ++++++++++++++++++ tests/components/SanctionPlayer.spec.ts | 131 +++++++++++ .../notification/NotificationItem.spec.ts | 121 ++++++++++ 26 files changed, 924 insertions(+), 93 deletions(-) create mode 100644 tests/components/PlayerSanctions.spec.ts create mode 100644 tests/components/SanctionPlayer.spec.ts create mode 100644 tests/components/notification/NotificationItem.spec.ts diff --git a/components/PlayerSanctions.vue b/components/PlayerSanctions.vue index e78f07cf..b9f52ce4 100644 --- a/components/PlayerSanctions.vue +++ b/components/PlayerSanctions.vue @@ -15,6 +15,7 @@ import { ShieldAlert, ShieldCheck, ShieldX, + TriangleAlert, } from "lucide-vue-next"; import { Button } from "~/components/ui/button"; import { @@ -276,6 +277,11 @@ const tabCountClasses = class="h-4 w-4 shrink-0" :class="accentTextClass(sanction)" /> + - {{ sanction.type }} + {{ typeLabel(sanction.type) }} - {{ - isExpired(sanction) - ? $t("player.sanctions.expired") - : $t("player.sanctions.active") - }} + {{ statusLabel(sanction) }}

- +