Add password reset localization and chat configuration

- Implemented German and English localization for password reset functionality.
- Added WebSocket URL resolution logic in chat services to support various environments and configurations.
- Created centralized chat configuration for event keys and payload mappings.
- Developed RoomsView component for admin chat room management, including create, edit, and delete functionalities.
This commit is contained in:
Torsten Schulz (local)
2025-08-18 07:44:56 +02:00
parent 23f698d8fd
commit 19ee6ba0a1
50 changed files with 3117 additions and 359 deletions

View File

@@ -14,7 +14,7 @@
<div v-if="diaryEntries.length === 0">{{ $t('socialnetwork.diary.noEntries') }}</div>
<div v-else class="diary-entries">
<div v-for="entry in diaryEntries" :key="entry.id" class="diary-entry">
<p v-html="entry.text"></p>
<p v-html="sanitizedText(entry)"></p>
<div class="entry-info">
<span class="entry-timestamp">{{ new Date(entry.createdAt).toLocaleString() }}</span>
<span class="entry-actions">
@@ -39,6 +39,7 @@
import { mapGetters } from 'vuex';
import apiClient from '@/utils/axios.js';
import ChooseDialog from "@/dialogues/standard/ChooseDialog.vue";
import DOMPurify from 'dompurify';
export default {
name: 'DiaryView',
@@ -59,6 +60,9 @@ export default {
...mapGetters(['user']),
},
methods: {
sanitizedText(entry) {
return DOMPurify.sanitize(entry.text);
},
async loadDiaryEntries(page) {
try {
console.log(page);

View File

@@ -3,7 +3,7 @@
<h3 v-if="forumTopic">{{ forumTopic }}</h3>
<ul class="messages">
<li v-for="message in messages" :key="message.id">
<div v-html="message.text"></div>
<div v-html="sanitizedMessage(message)"></div>
<div class="footer">
<span class="link" @click="openProfile(message.lastMessageUser.hashedId)">
{{ message.lastMessageUser.username }}
@@ -23,6 +23,7 @@
import { Editor, EditorContent } from '@tiptap/vue-3'
import StarterKit from '@tiptap/starter-kit'
import apiClient from '../../utils/axios'
import DOMPurify from 'dompurify'
export default {
name: 'ForumTopicView',
@@ -87,6 +88,9 @@ export default {
},
openForum() {
this.$router.push(`/socialnetwork/forum/${this.forumId}`);
},
sanitizedMessage(message) {
return DOMPurify.sanitize(message.text);
}
}
}

View File

@@ -7,7 +7,7 @@
<div v-for="entry in guestbookEntries" :key="entry.id" class="guestbook-entry">
<img v-if="entry.image" :src="entry.image.url" alt="Entry Image"
style="max-width: 400px; max-height: 400px;" />
<p v-html="entry.contentHtml"></p>
<p v-html="sanitizedContent(entry)"></p>
<div class="entry-info">
<span class="entry-timestamp">{{ new Date(entry.createdAt).toLocaleString() }}</span>
<span class="entry-user">
@@ -30,6 +30,7 @@
<script>
import { mapActions, mapGetters } from 'vuex';
import apiClient from '@/utils/axios.js';
import DOMPurify from 'dompurify';
export default {
name: 'GuestbookView',
@@ -73,6 +74,9 @@ export default {
console.error('Error fetching image:', error);
}
},
sanitizedContent(entry) {
return DOMPurify.sanitize(entry.contentHtml);
},
},
mounted() {
this.loadGuestbookEntries(1);