Falukant production, family and administration enhancements

This commit is contained in:
Torsten Schulz
2025-04-14 15:17:35 +02:00
parent 90b4f51dcb
commit b15d93a798
77 changed files with 2429 additions and 1093 deletions

View File

@@ -11,9 +11,17 @@
<td>{{ falukantUser?.character.definedFirstName.name }} {{
falukantUser?.character.definedLastName.name }}</td>
</tr>
<tr>
<td>{{ $t('falukant.overview.metadata.nobleTitle') }}</td>
<td>{{ $t('falukant.titles.' + falukantUser?.character.gender + '.' + falukantUser?.character.nobleTitle.labelTr) }}</td>
</tr>
<tr>
<td>{{ $t('falukant.overview.metadata.money') }}</td>
<td>{{ falukantUser?.money }}</td>
<td>
{{ moneyValue != null
? moneyValue.toLocaleString(locale, { style: 'currency', currency: 'EUR' })
: '---' }}
</td>
</tr>
<tr>
<td>{{ $t('falukant.overview.metadata.age') }}</td>
@@ -150,7 +158,7 @@ export default {
const ageGroup = this.getAgeGroup(age);
const genderData = AVATAR_POSITIONS[gender] || {};
const position = genderData.positions?.[ageGroup] || { x: 0, y: 0 };
const width = genderData.width || 100;
const width = genderData.width || 100;
const height = genderData.height || 100;
return {
backgroundImage: `url(${imageUrl})`,
@@ -160,6 +168,13 @@ export default {
height: `${height}px`,
};
},
moneyValue() {
const m = this.falukantUser?.money;
return typeof m === 'string' ? parseFloat(m) : m;
},
locale() {
return window.navigator.language || 'en-US';
},
},
async mounted() {
await this.fetchFalukantUser();
@@ -171,7 +186,6 @@ export default {
}
if (this.daemonSocket) {
this.daemonSocket.addEventListener('message', (event) => {
console.log('incoming event', event);
try {
if (event.data === "ping") return;
const message = JSON.parse(event.data);
@@ -182,6 +196,8 @@ export default {
console.error('Error processing WebSocket message in FalukantOverviewView:', error);
}
});
} else {
console.log('no daemon socket');
}
},
beforeUnmount() {
@@ -281,4 +297,8 @@ export default {
background-size: cover;
image-rendering: crisp-edges;
}
h2 {
padding-top: 20px;
}
</style>