-
-
{{ $t('falukant.branch.selection.title') }}
-
-
-
-
- {{ $t('falukant.branch.actions.create') }}
-
- {{ $t('falukant.branch.actions.upgrade') }}
-
-
+
+
{{ $t('falukant.branch.selection.title') }}
+
+
-
-
-
-
-
-
\ No newline at end of file
+ },
+};
+
+
+
diff --git a/frontend/src/dialogues/admin/AnswerContact.vue b/frontend/src/dialogues/admin/AnswerContact.vue
index c5f3807..30e2e5f 100644
--- a/frontend/src/dialogues/admin/AnswerContact.vue
+++ b/frontend/src/dialogues/admin/AnswerContact.vue
@@ -6,7 +6,7 @@
{{ contact.message }}
-
+
@@ -19,8 +19,8 @@
@@ -106,5 +100,13 @@ export default {
.editor-container {
margin-top: 20px;
+ border: 1px solid #ccc;
+ padding: 10px;
+ min-height: 200px;
+}
+
+.editor {
+ min-height: 150px;
+ outline: none;
}
diff --git a/frontend/src/dialogues/falukant/CreateBranchDialog.vue b/frontend/src/dialogues/falukant/CreateBranchDialog.vue
new file mode 100644
index 0000000..12678ee
--- /dev/null
+++ b/frontend/src/dialogues/falukant/CreateBranchDialog.vue
@@ -0,0 +1,342 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/dialogues/falukant/NewDirectorDialog.vue b/frontend/src/dialogues/falukant/NewDirectorDialog.vue
index 924d0b1..67d2067 100644
--- a/frontend/src/dialogues/falukant/NewDirectorDialog.vue
+++ b/frontend/src/dialogues/falukant/NewDirectorDialog.vue
@@ -51,8 +51,8 @@ export default {
selectedProposal: null,
products: [],
buttons: [
- { text: 'Einstellen', action: this.hireDirector },
- { text: 'Abbrechen', action: 'close' },
+ { text: this.$t('falukant.newdirector.hire'), action: this.hireDirector },
+ { text: this.$t('Cancel'), action: 'close' },
],
};
},
diff --git a/frontend/src/dialogues/socialnetwork/UserProfileDialog.vue b/frontend/src/dialogues/socialnetwork/UserProfileDialog.vue
index 881fd77..005c00c 100644
--- a/frontend/src/dialogues/socialnetwork/UserProfileDialog.vue
+++ b/frontend/src/dialogues/socialnetwork/UserProfileDialog.vue
@@ -55,8 +55,7 @@
-
+
{{ $t('socialnetwork.profile.guestbook.submit')
}}
@@ -95,14 +94,15 @@
import DialogWidget from '@/components/DialogWidget.vue';
import apiClient from '@/utils/axios.js';
import FolderItem from '../../components/FolderItem.vue';
-import TinyMCEEditor from '@tinymce/tinymce-vue';
+import { Editor, EditorContent } from '@tiptap/vue-3'
+import StarterKit from '@tiptap/starter-kit'
export default {
name: 'UserProfileDialog',
components: {
DialogWidget,
FolderItem,
- editor: TinyMCEEditor,
+ EditorContent,
},
data() {
return {
@@ -126,27 +126,20 @@ export default {
{ name: 'guestbook', label: this.$t('socialnetwork.profile.tab.guestbook') }
],
apiKey: import.meta.env.VITE_TINYMCE_API_KEY,
- tinymceInitOptions: {
- script_url: '/tinymce/tinymce.min.js',
- height: 300,
- menubar: true,
- plugins: [
- 'lists', 'link',
- 'searchreplace', 'visualblocks', 'code',
- 'insertdatetime', 'table'
- ],
- toolbar:
- 'undo redo cut copy paste | bold italic forecolor backcolor fontfamily fontsize| \
- alignleft aligncenter alignright alignjustify | \
- bullist numlist outdent indent | removeformat | link visualblocks code',
- contextmenu: 'link image table',
- menubar: 'edit format table',
- promotion: false,
- },
+ editor: null,
hasSendFriendshipRequest: false,
friendshipState: 'none',
};
},
+ mounted: async function () {
+ this.editor = new Editor({
+ extensions: [StarterKit],
+ content: '',
+ });
+ },
+ beforeUnmount: function () {
+ if (this.editor) this.editor.destroy();
+ },
methods: {
open() {
this.$refs.dialog.open();
diff --git a/frontend/src/i18n/locales/de/falukant.json b/frontend/src/i18n/locales/de/falukant.json
index 76f04df..7c563fb 100644
--- a/frontend/src/i18n/locales/de/falukant.json
+++ b/frontend/src/i18n/locales/de/falukant.json
@@ -4,7 +4,8 @@
"age": "Alter",
"wealth": "Vermögen",
"health": "Gesundheit",
- "events": "Ereignisse"
+ "events": "Ereignisse",
+ "relationship": "Beziehung"
},
"health": {
"amazing": "Super",
@@ -97,7 +98,8 @@
"selection": {
"title": "Niederlassungsauswahl",
"selected": "Ausgewählte Niederlassung",
- "placeholder": "Noch keine Niederlassung ausgewählt"
+ "placeholder": "Noch keine Niederlassung ausgewählt",
+ "selectedcity": "Ausgewählte Stadt"
},
"actions": {
"create": "Neue Niederlassung erstellen",
@@ -223,7 +225,6 @@
"3": "Mittel",
"4": "Hoch",
"5": "Sehr hoch"
-
},
"mood": "Stimmung",
"progress": "Zuneigung",
@@ -353,19 +354,32 @@
"Fine Wine": "Feiner Wein",
"Artisan Chocolate": "Kunsthandwerkliche Schokolade",
"Pearl Necklace": "Perlenanhänger",
- "Rare Painting": "Seltenes Gemälde",
+ "Rare Painting": "Seltenes Gemälde",
"Silver Watch": "Silberuhr",
- "Cat": "Katze",
- "Dog": "Hund",
+ "Cat": "Katze",
+ "Dog": "Hund",
"Horse": "Pferd"
},
"mood": {
"happy": "Glücklich",
"sad": "Traurig",
"angry": "Wütend",
- "scared": "Verängstigt",
- "surprised": "Überrascht",
- "normal": "Normal"
+ "nervous": "Nervös",
+ "excited": "Aufgeregt",
+ "bored": "Gelangweilt",
+ "fearful": "Ängstlich",
+ "confident": "Selbstbewusst",
+ "curious": "Neugierig",
+ "hopeful": "Hoffnungsvoll",
+ "frustrated": "Frustriert",
+ "lonely": "Einsam",
+ "grateful": "Dankbar",
+ "jealous": "Eifersüchtig",
+ "guilty": "Schuldig",
+ "apathetic": "Apathisch",
+ "relieved": "Erleichtert",
+ "proud": "Stolz",
+ "ashamed": "Beschämt"
},
"character": {
"brave": "Mutig",
@@ -595,6 +609,72 @@
"barber": "Barbier"
},
"choose": "Bitte auswählen"
+ },
+ "politics": {
+ "title": "Politik",
+ "tabs": {
+ "current": "Aktuelle Position",
+ "upcoming": "Anstehende Neuwahl-Positionen",
+ "elections": "Wahlen"
+ },
+ "current": {
+ "office": "Amt",
+ "region": "Region",
+ "termEnds": "Läuft ab am",
+ "income": "Einkommen",
+ "none": "Keine aktuelle Position vorhanden.",
+ "holder": "Inhaber"
+ },
+ "open": {
+ "office": "Amt",
+ "region": "Region",
+ "date": "Datum",
+ "candidacy": "Kandidatur",
+ "none": "Keine offenen Positionen."
+ },
+ "upcoming": {
+ "office": "Amt",
+ "region": "Region",
+ "postDate": "Datum",
+ "none": "Keine anstehenden Positionen."
+ },
+ "elections": {
+ "office": "Amt",
+ "region": "Region",
+ "date": "Datum",
+ "posts": "Zu besetzende Posten",
+ "none": "Keine Wahlen vorhanden.",
+ "choose": "Kandidaten",
+ "vote": "Stimme abgeben",
+ "voteAll": "Alle Stimmen abgeben",
+ "candidates": "Kandidaten",
+ "action": "Aktion"
+ },
+ "offices": {
+ "chancellor": "Kanzler",
+ "minister": "Minister",
+ "ministry-helper": "Ministerhelfer",
+ "governor": "Gouverneur",
+ "super-state-administrator": "Oberstaatsverwalter",
+ "state-administrator": "Staatsverwalter",
+ "ruler-consultant": "Berater des Herrschers",
+ "territorial-council-speaker": "Sprecher des Territorialrats",
+ "territorial-council": "Territorialrat",
+ "hangman": "Henker",
+ "treasurer": "Schatzmeister",
+ "sheriff": "Sheriff",
+ "taxman": "Steuereintreiber",
+ "bailif": "Gerichtsdiener",
+ "judge": "Richter",
+ "village-major": "Dorfvorsteher",
+ "master-builder": "Baumeister",
+ "mayor": "Bürgermeister",
+ "town-clerk": "Stadtschreiber",
+ "beadle": "Schulze",
+ "council": "Ratsherr",
+ "councillor": "Stadtrat",
+ "assessor": "Schätzer"
+ }
}
}
}
\ No newline at end of file
diff --git a/frontend/src/router/falukantRoutes.js b/frontend/src/router/falukantRoutes.js
index c259c75..0a8235b 100644
--- a/frontend/src/router/falukantRoutes.js
+++ b/frontend/src/router/falukantRoutes.js
@@ -11,6 +11,7 @@ import EducationView from '../views/falukant/EducationView.vue';
import BankView from '../views/falukant/BankView.vue';
import DirectorView from '../views/falukant/DirectorView.vue';
import HealthView from '../views/falukant/HealthView.vue';
+import PoliticsView from '../views/falukant/PoliticsView.vue';
const falukantRoutes = [
{
@@ -91,6 +92,12 @@ const falukantRoutes = [
component: HealthView,
meta: { requiresAuth: true }
},
+ {
+ path: '/falukant/politics',
+ name: 'PoliticsView',
+ component: PoliticsView,
+ meta: { requiresAuth: true }
+ },
];
export default falukantRoutes;
diff --git a/frontend/src/views/falukant/BranchView.vue b/frontend/src/views/falukant/BranchView.vue
index eef5439..56e821a 100644
--- a/frontend/src/views/falukant/BranchView.vue
+++ b/frontend/src/views/falukant/BranchView.vue
@@ -1,236 +1,291 @@
-
-
-
{{ $t('falukant.branch.title') }}
-
-
-
-
-
-
-
+
+
+
{{ $t('falukant.branch.title') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
\ No newline at end of file
+ }
+
+
\ No newline at end of file
diff --git a/frontend/src/views/falukant/FamilyView.vue b/frontend/src/views/falukant/FamilyView.vue
index a0d8102..58da7c0 100644
--- a/frontend/src/views/falukant/FamilyView.vue
+++ b/frontend/src/views/falukant/FamilyView.vue
@@ -43,12 +43,13 @@
{{ $t('falukant.family.spouse.jumpToPartyForm')
- }}
+ }}
- {{ $t(`falukant.character.${characteristic.tr}`) }}
+
+ {{ $t(`falukant.character.${trait.tr}`) }}
+
@@ -93,7 +96,7 @@
v-model="selectedProposalId">
{{
$t(`falukant.titles.${proposal.proposedCharacterGender}.${proposal.proposedCharacterNobleTitle}`)
- }} {{ proposal.proposedCharacterName }}
+ }} {{ proposal.proposedCharacterName }}
{{ proposal.proposedCharacterAge }}
{{ formatCost(proposal.cost) }}
@@ -123,7 +126,8 @@
{{ child.name }}
- {{ $t('falukant.family.children.baptism') }}
+ {{ $t('falukant.family.children.baptism')
+ }}
{{ child.age }}
@@ -308,12 +312,38 @@ export default {
});
},
- handleDaemonMessage() {
+ handleDaemonMessage(event) {
+ if (event.data === 'ping') {
+ return;
+ }
const message = JSON.parse(event.data);
if (message.event === 'children_update') {
this.loadFamilyData();
}
- }
+ },
+
+ getEffect(gift) {
+ // aktueller Partner
+ const partner = this.relationships[0].character2;
+ // seine aktuelle Mood-ID
+ const moodId = partner.mood?.id ?? partner.mood_id;
+
+ // 1) Mood-Eintrag finden
+ const moodEntry = gift.moodsAffects.find(ma => ma.mood_id === moodId);
+ const moodValue = moodEntry ? moodEntry.suitability : 0;
+
+ // 2) Trait-Einträge matchen
+ let highestTraitValue = 0;
+ for (const trait of partner.traits) {
+ const charEntry = gift.charactersAffects.find(ca => ca.trait_id === trait.id);
+ if (charEntry && charEntry.suitability > highestTraitValue) {
+ highestTraitValue = charEntry.suitability;
+ }
+ }
+
+ // Durchschnitt, gerundet
+ return Math.round((moodValue + highestTraitValue) / 2);
+ },
}
}
diff --git a/frontend/src/views/falukant/OverviewView.vue b/frontend/src/views/falukant/OverviewView.vue
index f42d0da..9f9bd97 100644
--- a/frontend/src/views/falukant/OverviewView.vue
+++ b/frontend/src/views/falukant/OverviewView.vue
@@ -13,14 +13,15 @@
{{ $t('falukant.overview.metadata.nobleTitle') }}
- {{ $t('falukant.titles.' + falukantUser?.character.gender + '.' + falukantUser?.character.nobleTitle.labelTr) }}
+ {{ $t('falukant.titles.' + falukantUser?.character.gender + '.' +
+ falukantUser?.character.nobleTitle.labelTr) }}
{{ $t('falukant.overview.metadata.money') }}
{{ moneyValue != null
? moneyValue.toLocaleString(locale, { style: 'currency', currency: 'EUR' })
- : '---' }}
+ : '---' }}
@@ -170,17 +171,24 @@ export default {
};
},
getHouseStyle() {
- if (!this.falukantUser) return {};
+ console.log(this.falukantUser);
+ if (!this.falukantUser || !this.falukantUser.userHouse?.houseType) return {};
const imageUrl = '/images/falukant/houses.png';
- const housePosition = this.falukantUser.house ? this.falukantUser.house.type.position : 0;
- const x = housePosition % 3;
- const y = Math.floor(housePosition / 3);
+ const pos = this.falukantUser.userHouse.houseType.position;
+ const index = pos - 1;
+ const columns = 3;
+ const spriteSize = 300;
+ const x = (index % columns) * spriteSize;
+ const y = Math.floor(index / columns) * spriteSize;
return {
backgroundImage: `url(${imageUrl})`,
- backgroundPosition: `-${x * 341}px -${y * 341}px`,
- backgroundSize: "341px 341px",
- width: "114px",
- height: "114px",
+ backgroundPosition: `-${x}px -${y}px`,
+ backgroundSize: `${columns * spriteSize}px auto`,
+ width: `300px`,
+ height: `300px`,
+ border: '1px solid #ccc',
+ borderRadius: '4px',
+ imageRendering: 'crisp-edges',
};
},
getAgeColor(age) {
@@ -321,12 +329,10 @@ export default {
border: 1px solid #ccc;
border-radius: 4px;
background-repeat: no-repeat;
- background-size: cover;
image-rendering: crisp-edges;
}
h2 {
padding-top: 20px;
}
-
diff --git a/frontend/src/views/falukant/PoliticsView.vue b/frontend/src/views/falukant/PoliticsView.vue
new file mode 100644
index 0000000..504469d
--- /dev/null
+++ b/frontend/src/views/falukant/PoliticsView.vue
@@ -0,0 +1,405 @@
+
+
+
+
+
{{ $t('falukant.politics.title') }}
+
+
+
+
+
+
+
+
{{ $t('loading') }}
+
+
+
+
+
+
{{ $t('loading') }}
+
+
+
+
+ {{ $t('falukant.politics.open.apply') }}
+
+
+
+
+
+
+
{{ $t('loading') }}
+
+
+
+
+ {{ $t('falukant.politics.elections.voteAll') }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/social/ForumTopicView.vue b/frontend/src/views/social/ForumTopicView.vue
index b878523..d815a9f 100644
--- a/frontend/src/views/social/ForumTopicView.vue
+++ b/frontend/src/views/social/ForumTopicView.vue
@@ -2,89 +2,84 @@
{{ $t('socialnetwork.forum.title') }} {{ forumName }}
{{ forumTopic }}
-
+
+
+
+
{{ $t('socialnetwork.forum.createNewMesssage') }}
-
\ No newline at end of file
+
+.editor-container {
+ margin-top: 1rem;
+ border: 1px solid #ccc;
+ padding: 10px;
+ min-height: 200px;
+ background-color: white;
+}
+
+.editor {
+ min-height: 150px;
+ outline: none;
+}
+
diff --git a/frontend/src/views/social/ForumView.vue b/frontend/src/views/social/ForumView.vue
index 7e8f7dd..fb65620 100644
--- a/frontend/src/views/social/ForumView.vue
+++ b/frontend/src/views/social/ForumView.vue
@@ -11,71 +11,27 @@
-
+
+
+
{{ $t('socialnetwork.forum.createNewTopic') }}
-
-
-
-
- {{ $t('socialnetwork.forum.topic') }}
- {{ $t('socialnetwork.forum.createdBy') }}
- {{ $t('socialnetwork.forum.createdAt') }}
- {{ $t('socialnetwork.forum.reactions') }}
- {{ $t('socialnetwork.forum.lastReaction') }}
-
-
-
-
- {{ title.title }}
- {{ title.createdBy }}
- {{ new Date(title.createdAt).toLocaleString() }}
- {{ title.numberOfItems }}
- {{ new Date(title.lastMessageDate).toLocaleString() }}
-
-
-
-
+
+
{{ $t('socialnetwork.forum.noTitles') }}