Refactor mini-message system: add precomputed styles for optimization, update models and components to use preprocessed nodes, and display total message counts in ChatInfo UI.

This commit is contained in:
2026-08-01 23:33:34 +02:00
parent 819739ff60
commit c8b5a01c21
9 changed files with 81 additions and 60 deletions
@@ -1,10 +1,11 @@
@if (selectedChannel(); as chatChannel) {
<div class="full-width"
[style.background-color]="getServerColor(chatChannel.name ?? '')">
<span class="channel" [style.color]="getServerTextColor(chatChannel.name ?? '')">
[style.background-color]="getServerColor(chatChannel.name)">
<span class="channel" [style.color]="getServerTextColor(chatChannel.name)">
@for (segment of getDisplayName(chatChannel); track $index) {
<span [style.color]="segment.color">{{ segment.text }}</span>
}
<span class="message-count">({{ chatChannel.totalMessages }})</span>
</span>
<div class="notification-icon">
@if (notificationEnabled()) {