feat: Implement Ledger alignment and correct corrective mutation authors in seeders
This commit is contained in:
@@ -22,6 +22,7 @@ const props = defineProps<{
|
||||
name: string;
|
||||
score: number;
|
||||
rules: string;
|
||||
alignment: string;
|
||||
media?: Array<{ id: number; url: string; mime_type: string }>;
|
||||
mutations: Array<{
|
||||
id: number;
|
||||
@@ -175,6 +176,28 @@ function isOwnerUser(userId: number): boolean {
|
||||
{{ ledger.rules }}
|
||||
</p>
|
||||
|
||||
<!-- Ledger Alignment Badge / Subtitle -->
|
||||
<div class="c-ledger-show__alignment-wrapper">
|
||||
<span
|
||||
v-if="ledger.alignment === 'positive'"
|
||||
class="c-ledger-show__alignment-badge c-ledger-show__alignment-badge--positive"
|
||||
>
|
||||
▲ Positive Alignment — A higher score is better.
|
||||
</span>
|
||||
<span
|
||||
v-else-if="ledger.alignment === 'negative'"
|
||||
class="c-ledger-show__alignment-badge c-ledger-show__alignment-badge--negative"
|
||||
>
|
||||
▼ Negative Alignment — A lower score is better (demerits / infractions).
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
class="c-ledger-show__alignment-badge c-ledger-show__alignment-badge--neutral"
|
||||
>
|
||||
◆ Neutral Alignment — Scorekeeping neutral.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Ledger Descriptive Media -->
|
||||
<div
|
||||
v-if="ledger.media && ledger.media.length > 0"
|
||||
@@ -219,6 +242,7 @@ function isOwnerUser(userId: number): boolean {
|
||||
:mutations="ledger.mutations"
|
||||
:participants="dynamic.participants"
|
||||
:is-owner="isOwner"
|
||||
:ledger-alignment="ledger.alignment"
|
||||
@open-lightbox="openLightbox"
|
||||
/>
|
||||
</div>
|
||||
@@ -296,6 +320,26 @@ function isOwnerUser(userId: number): boolean {
|
||||
@apply mt-2 text-sm text-gray-600 dark:text-gray-400;
|
||||
}
|
||||
|
||||
.c-ledger-show__alignment-wrapper {
|
||||
@apply mt-3 flex items-center;
|
||||
}
|
||||
|
||||
.c-ledger-show__alignment-badge {
|
||||
@apply text-xs font-semibold uppercase tracking-wide px-2.5 py-1 rounded;
|
||||
}
|
||||
|
||||
.c-ledger-show__alignment-badge--positive {
|
||||
@apply text-green-600 bg-green-50/50 dark:text-green-400 dark:bg-green-950/20;
|
||||
}
|
||||
|
||||
.c-ledger-show__alignment-badge--negative {
|
||||
@apply text-red-600 bg-red-50/50 dark:text-red-400 dark:bg-red-950/20;
|
||||
}
|
||||
|
||||
.c-ledger-show__alignment-badge--neutral {
|
||||
@apply text-gray-500 bg-gray-50/50 dark:text-gray-400 dark:bg-neutral-800/20;
|
||||
}
|
||||
|
||||
.c-ledger-show__media-list {
|
||||
@apply mt-4 flex flex-wrap gap-3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user