feat(MessagesDialog, StatusBar, i18n): enhance character death notifications and UI updates
- Added support for displaying character death notifications with detailed information including age, region, and relationships in both German and English. - Updated MessagesDialog to format additional parameters such as region, spouses, children, and lovers based on the locale. - Enhanced StatusBar to show the character's name dynamically, improving user experience. - Modified i18n files to include new notification messages for character deaths, ensuring accurate translations for both languages.
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
<span class="badge" v-if="unreadCount > 0">{{ unreadCount }}</span>
|
||||
<img src="/images/icons/falukant/messages24.png" class="menu-icon" />
|
||||
</div>
|
||||
<div v-if="characterName" class="status-identity" :title="characterName">
|
||||
<span class="status-identity__label">{{ $t('falukant.overview.metadata.name') }}</span>
|
||||
<strong class="status-identity__name">{{ characterName }}</strong>
|
||||
</div>
|
||||
<template v-for="item in statusItems" :key="item.key">
|
||||
<div class="status-item" v-if="item.value !== null && item.image == null">
|
||||
<span class="status-icon-wrapper">
|
||||
@@ -76,6 +80,7 @@ export default {
|
||||
active: false,
|
||||
inDebtorsPrison: false
|
||||
},
|
||||
characterName: '',
|
||||
pendingStatusRefresh: null,
|
||||
};
|
||||
},
|
||||
@@ -155,6 +160,9 @@ export default {
|
||||
const response = await apiClient.get("/api/falukant/info");
|
||||
const { money, character, events } = response.data;
|
||||
const { age, health } = character;
|
||||
const firstName = character?.definedFirstName?.name || '';
|
||||
const lastName = character?.definedLastName?.name || '';
|
||||
this.characterName = [firstName, lastName].filter(Boolean).join(' ');
|
||||
const relationship = response.data.character.relationshipsAsCharacter1[0]?.relationshipType?.tr
|
||||
|| response.data.character.relationshipsAsCharacter2[0]?.relationshipType?.tr
|
||||
|| null;
|
||||
@@ -349,6 +357,35 @@ export default {
|
||||
border: 1px solid rgba(93, 64, 55, 0.08);
|
||||
}
|
||||
|
||||
.status-identity {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 0.5rem;
|
||||
min-height: 34px;
|
||||
padding: 0.2rem 0.95rem;
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248, 241, 231, 0.98) 100%);
|
||||
border: 1px solid rgba(126, 71, 27, 0.16);
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
|
||||
max-width: min(100%, 26rem);
|
||||
}
|
||||
|
||||
.status-identity__label {
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: #9a7a5f;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-identity__name {
|
||||
font-size: 0.98rem;
|
||||
color: #5f3617;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.quick-access {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
Reference in New Issue
Block a user