Commit Graph

597 Commits

Author SHA1 Message Date
Torsten Schulz (local)
f902f5298c Refactor native language filtering in VocabService and update frontend handling
- Simplified the logic for filtering courses by native language in VocabService, allowing for better handling of undefined and null values.
- Enhanced the VocabCourseListView to clarify the behavior of nativeLanguageId based on user selection, ensuring accurate course retrieval based on language preferences.
- Improved comments in both files for better understanding of the filtering logic and its implications on course visibility.
2026-01-19 12:09:48 +01:00
Torsten Schulz (local)
ddd038761b Enhance language course creation script to support public courses
- Updated the script to create public language courses for various target and native languages without requiring an ownerHashedId.
- Implemented a function to find or create a system user for course ownership, ensuring automatic user assignment.
- Improved documentation to clarify the script's usage and the types of courses created.
2026-01-19 11:47:55 +01:00
Torsten Schulz (local)
09e53244d9 Add native language support in vocab course management
- Introduced a new field for native language in the VocabCourse model to allow learners to specify their native language.
- Updated the VocabService to handle native language during course creation and retrieval, including filtering options.
- Enhanced the database schema to include foreign key constraints for native language.
- Updated frontend components to support native language selection and display in course listings.
- Added internationalization strings for native language features in both German and English.
2026-01-19 11:43:38 +01:00
Torsten Schulz (local)
714e144329 Add course retrieval by share code feature and enhance course search functionality
- Implemented a new endpoint in VocabController to retrieve courses using a share code.
- Updated VocabService to include logic for validating share codes and checking course access permissions.
- Enhanced course listing functionality with search and language filtering options in the frontend.
- Added a dialog for users to input share codes and search for courses, improving user experience.
- Updated internationalization files to include new strings for share code functionality and search features.
2026-01-19 11:33:20 +01:00
Torsten Schulz (local)
e1b3dfb00a Refactor navigation structure to enhance language learning features
- Renamed 'vocabtrainer' to 'sprachenlernen' in the navigation structure for better clarity.
- Introduced a nested structure under 'sprachenlernen' for 'vocabtrainer' and 'sprachkurse', improving organization of language-related resources.
- Updated internationalization files for both German and English to reflect the new naming and structure, ensuring consistency across the application.
2026-01-19 11:24:46 +01:00
Torsten Schulz (local)
b6a4607e60 Implement vocab course and grammar exercise features in backend and frontend
- Added new course management functionalities in VocabController, including creating, updating, and deleting courses and lessons.
- Implemented enrollment and progress tracking for courses, along with grammar exercise creation and management.
- Updated database schema to include tables for courses, lessons, enrollments, and grammar exercises.
- Enhanced frontend with new routes and views for course listing and details, including internationalization support for course-related texts.
- Improved user experience by adding navigation to courses from the main vocab trainer view.
2026-01-19 10:58:53 +01:00
Torsten Schulz (local)
9553cc811a Update index.html and sitemap.xml for improved SEO and content visibility
- Updated the title and description in index.html to include new features like Vokabeltrainer and additional minigames.
- Added keywords meta tag to enhance search engine optimization.
- Modified sitemap.xml to reflect changes in URLs and update change frequencies for better indexing, including new entries for Vokabeltrainer and minigames.
2026-01-19 10:35:59 +01:00
Torsten Schulz (local)
59c05b3628 Implement job hierarchy and region depth calculations in FalukantService; enhance PoliticsView with own position highlighting
- Added a job hierarchy mapping to determine positions based on their rank.
- Introduced asynchronous region depth calculations to determine the hierarchy of regions.
- Updated the mapping of office data to include job hierarchy levels and region depths.
- Enhanced the PoliticsView to highlight the user's own positions with a distinct style.
- Implemented a method to load the user's character ID for position comparison.
2026-01-16 16:25:22 +01:00
Torsten Schulz (local)
d3629a8a09 Enhance character name resolution logic in MessagesDialog component
- Improved character name extraction by prioritizing names resolved from the backend over those from notification values.
- Simplified fallback mechanisms for character names, ensuring a more robust handling of character IDs.
- Streamlined the logic for handling character names in various effect types, enhancing clarity and maintainability of the code.
2026-01-15 14:08:02 +01:00
Torsten Schulz (local)
a17e8537fb Enhance character name resolution in enrichNotificationsWithCharacterNames function
- Introduced sets for collecting first name and last name IDs to improve character name enrichment.
- Implemented batch loading of first names and last names, optimizing database queries.
- Added a helper function to resolve names from character first and last name IDs, enhancing notification data with resolved character names.
- Improved logic for attaching resolved names to notifications, prioritizing name resolution from IDs over fallback methods.
2026-01-15 13:33:54 +01:00
Torsten Schulz (local)
a7f23c5885 Refactor update-backend.sh script for improved .env file handling and backup process
- Updated the script to securely back up .env files before deleting the old backend, ensuring no loss of environment configurations.
- Enhanced the restoration process of .env files with clearer logging for success and warnings when no files are found.
- Simplified the logic for copying the new backend while excluding .env files, improving clarity and maintainability of the script.
2026-01-15 13:11:44 +01:00
Torsten Schulz (local)
b706191a0e Refactor effect handling in enrichNotificationsWithCharacterNames to improve data parsing
- Simplified the logic for processing notification effects by consolidating the JSON parsing into a single conditional check, enhancing code readability and maintainability.
- Ensured consistent handling of effects regardless of their initial format, improving robustness in notification enrichment.
2026-01-15 09:28:00 +01:00
Torsten Schulz (local)
ba469ef900 Refactor notification handling in FalukantService to improve data processing
- Convert notification rows to plain objects before enriching with character names, ensuring compatibility with subsequent processing.
- Update return structure to include plain notification objects, enhancing data consistency in the response.
2026-01-15 08:16:04 +01:00
Torsten Schulz (local)
e852346b94 Update mood handling in FalukantService and enhance Socket.io configuration in store
- Modified mood assignment in FalukantService to conditionally wrap mood data in an object based on moodId presence, improving data structure consistency.
- Refactored Socket.io initialization in the store to dynamically set the secure option based on the URL scheme, enhancing connection security in production environments.
2026-01-14 16:22:05 +01:00
Torsten Schulz (local)
02d24eccd8 Add 'sleep' status to Production model and update related components
- Introduced a new 'sleep' boolean field in the Production model to indicate if production is suspended.
- Updated FalukantService to include 'sleep' in the production attributes.
- Enhanced MessagesDialog and ProductionSection components to display the production status and handle branch names.
- Added corresponding translations for 'status', 'sleep', and 'active' in both German and English locale files.
2026-01-14 15:29:53 +01:00
Torsten Schulz (local)
d1359ccc36 Refactor proposal mapping in FalukantService to handle null characters
- Updated the proposal mapping logic to filter out proposals with null proposed characters, enhancing data integrity.
- Ensured that noble title is safely accessed with a fallback to null, improving robustness in character data handling.
2026-01-14 14:58:59 +01:00
Torsten Schulz (local)
52c7f1c7ba Refactor sendMessageToConnection method to enhance user data validation and message handling
- Introduce a local copy of the message to ensure its validity during processing.
- Validate user data retrieved from the WebSocket interface to ensure consistency before queuing messages.
- Streamline logging by removing redundant checks and focusing on critical error handling, improving overall clarity and stability.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
7a2749c405 Remove redundant exception handling in sendMessageToConnection method to streamline error logging and improve code clarity. 2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
d71df901ed Refactor message sending logic in WebSocket server to improve direct transmission and error handling
- Attempt to send messages directly during the RECEIVE callback to avoid mutex issues, enhancing performance.
- Implement size checks for messages to prevent overflow, with logging for oversized messages.
- Introduce additional error handling and logging for socket write operations, ensuring robust message delivery and queue management.
- Maintain thread safety by validating user data and mutex locking before queuing messages when direct sending fails.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
1af4b6c2e4 Enhance logging and error handling in sendMessageToConnection method
- Introduce detailed logging for the message sending process, including checks for user data validity and message queue status.
- Implement additional null checks for user data before and after locking the mutex to ensure thread safety.
- Ensure proper message copying to maintain validity during queuing, improving overall stability and error visibility.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
2595cb8565 Enhance error handling and logging in WebSocket server message sending
- Introduce detailed logging for message creation and sending processes, including message size and success confirmation.
- Implement comprehensive null checks for instance, WebSocket interface, and user data before invoking sendMessageToConnection, improving stability.
- Add exception handling to capture and log errors during message sending, enhancing visibility into potential issues.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
45d549aa4e Refactor message sending in WebSocket server to utilize sendMessageToConnection
- Replace manual message queuing and error handling with the sendMessageToConnection method, which consolidates necessary checks and improves code clarity.
- Remove redundant null checks and logging related to message queue access, streamlining the callback logic.
- Enhance overall stability by leveraging existing functionality for message delivery during WebSocket events.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
7f65f5e40e Enhance message queuing with improved error handling and logging in WebSocket server
- Implement detailed logging for message queuing attempts, including message size and copy operations.
- Add comprehensive null checks for user data and message queue validity before pushing messages to the queue.
- Introduce exception handling to manage potential errors during message queuing, improving stability and error visibility.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
5ce1cc4e6a Refine null checks and logging in WebSocket server message handling
- Introduce a local copy of user data before locking the mutex to ensure validity during message queuing.
- Enhance null checks and logging to provide clearer insights when user data or message queue access fails.
- Implement exception handling for message queue access to improve stability and error visibility.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
3a6d60e9a8 Improve null checks and logging in WebSocket server message handling
- Add additional null checks for user data before and after locking the mutex to prevent potential crashes.
- Enhance logging to provide clearer insights when user data is invalid during message queuing.
- Ensure proper message copying to a local variable before accessing the message queue, improving thread safety and stability.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
d5a09f359d Enhance logging and error handling in getConnections callback
- Add detailed logging to track the flow and validity of user data during the getConnections event.
- Implement exception handling to manage potential access issues with user data, improving stability and error visibility.
- Ensure clear output for both successful and failed user data access attempts, aiding in debugging and monitoring.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
127e95ca1c Improve null checks and logging in WebSocket server callbacks
- Add checks for user data to prevent null pointer exceptions during message handling.
- Enhance logging to provide clearer insights when user data is invalid or when exceptions occur.
- Ensure proper mutex locking when accessing the message queue to maintain thread safety.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
bb81126cd8 Enhance error response handling in WebSocket server
- Add detailed logging for error responses during WebSocket callbacks, improving visibility into the error handling process.
- Ensure that error responses are queued correctly without immediate sending, enhancing stability during callback execution.
- Utilize lws_cancel_service to notify the service of pending messages, ensuring proper message delivery after error handling.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
2d3d120f81 Refactor WebSocket server message queuing and error handling
- Implement message queuing for error responses during WebSocket callbacks to prevent immediate sending, enhancing stability.
- Utilize lws_cancel_service to trigger the writable callback safely, ensuring messages are sent correctly after the callback execution.
- Improve error handling and logging for message sending operations, providing clearer insights into potential issues.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
0c36c4a4e5 Refactor WebSocket server message handling to include user data
- Update sendMessageToConnection to accept user data, enhancing message delivery accuracy.
- Improve error handling in WebSocket callbacks by adding user data checks to prevent null pointer exceptions.
- Enhance logging for error responses to provide clearer insights into message handling issues.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
88f6686809 Enhance WebSocket server message handling and error responses
- Improve asynchronous message sending to prevent connection issues during callbacks.
- Add error response handling for failed connection retrieval, ensuring clients receive feedback on errors.
- Implement message size checks to prevent oversized messages from being sent, enhancing stability and reliability.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
9c7b682a36 Improve error handling and null checks in WebSocket server callbacks
- Add null checks for user data in various WebSocket callback functions to prevent crashes and improve stability.
- Enhance error logging to provide clearer insights into issues related to user data and connection management.
- Refactor the handling of active connections to ensure robust error handling during data processing and message sending.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
dafdbf0a84 Refactor WebSocket server to use nlohmann::json for active connections
- Update the return type of getActiveConnections() in both websocket_server.cpp and websocket_server.h to nlohmann::json for consistency and clarity.
- Ensure proper usage of the nlohmann::json library in the WebSocket server implementation.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
5ac8e9b484 Enhance WebSocket server connection management and error handling
- Introduce connection time tracking for WebSocket users to monitor connection duration.
- Implement user ID management to allow dynamic updates and removal of connections based on user ID changes.
- Add functionality to retrieve active connections, including unauthenticated ones, for administrative purposes.
- Improve error handling during connection closure and ensure proper cleanup of connection entries.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
753c5929e1 Refactor configuration file installation and template handling
- Update CMakeLists.txt to install the template configuration file as an example, ensuring it is available for reference.
- Modify install-config.cmake to prioritize the installed template file, with fallbacks to source directory templates if the installed one is missing, enhancing the robustness of the configuration setup.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
e3f46d775a Enhance WebSocket server ping/pong handling and timeout settings
- Introduce handling for LWS_CALLBACK_RECEIVE_PONG to manage Pong frames received from clients.
- Update the WebSocketUserData structure to increase MAX_PING_TIMEOUTS from 3 to 5, allowing more attempts before disconnection.
- Extend PONG_TIMEOUT_SECONDS from 10 to 60 to accommodate longer response times from browsers.
- Modify ping handling to send a WebSocket Ping frame instead of a text message for better protocol compliance.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
0eb3a78332 Enhance configuration file installation process
- Implement a CMake script for intelligent merging of configuration files, ensuring only missing keys are added without overwriting existing ones.
- Install a template configuration file as an example, preventing overwriting of the original during installation.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
3ac9f25284 Enhance WebSocket server socket options and connection handling
- Add support for setting SO_REUSEADDR in the WebSocket server to allow port reuse, improving server flexibility.
- Implement callbacks for socket adoption to ensure SO_REUSEADDR is set when applicable.
- Refine server options to streamline connection management and enhance overall performance.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
b3c9c8f37c Improve WebSocket server startup and error reporting
- Introduce a brief wait time to ensure the port is released before starting the server.
- Update server options to allow port reuse, enhancing server flexibility.
- Enhance error handling during context creation to provide more informative error messages regarding port usage and permissions.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
32bc126def Enhance WebSocket server options and error handling
- Update server options to support multiple simultaneous connections and improve security practices.
- Allow multiple connections per IP with configurable keep-alive settings.
- Improve error handling during WebSocket service operations, ensuring critical errors lead to server shutdown.
- Refine connection closure logic to handle user IDs more robustly and log connection states accurately.
- Enable WebSocket upgrade requests while rejecting other HTTP requests for better protocol management.
2026-01-14 14:38:43 +01:00
Torsten Schulz (local)
00a5f47cae Refactor WebSocket server connection management and message handling
- Update WebSocketUserData to use a message queue for handling outgoing messages, improving concurrency and message delivery.
- Modify pingClients method to handle multiple connections per user and implement timeout logic for ping responses.
- Enhance addConnection and removeConnection methods to manage multiple connections for each user, including detailed logging of connection states.
- Update handleBrokerMessage to send messages to all active connections for a user, ensuring proper queue management and callback invocation.
2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
6a1260687b Implement comprehensive character deletion process in UserCharacterWorker
- Add queries and logic to delete associated data when a character dies, including directors, relationships, child relations, knowledge, debtors prism, political offices, and election candidates.
- Enhance error handling to log issues during the deletion process.
2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
7591787583 Update configuration file path for daemon in main.cpp 2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
bd961a03d4 Aktualisiere WebSocket-Server und Daemon-Konfiguration
- Ändere die Pfade für SSL-Zertifikate in der Konfigurationsdatei.
- Verbessere die Fehlerbehandlung beim Entfernen alter vorbereiteter Anweisungen in HouseWorker.
- Füge Debug-Ausgaben zur Nachverfolgung von Verbindungen und Nachrichten im WebSocket-Server hinzu.
- Implementiere Timeout-Logik für das Stoppen von Worker- und Watchdog-Threads.
- Optimiere die Signalverarbeitung und Shutdown-Logik in main.cpp für bessere Responsivität.
2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
8fe816dddc WebSocket-Verbindungsverwaltung implementiert
- User-ID wird bei setUserId Event gespeichert
- Verbindungen werden in connections Map verwaltet
- Nachrichten werden über pendingMessage gesendet
- Statische Instanz-Referenz für Callback-Zugriff
- Explizite JSON-Konvertierung für Kompatibilität
2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
e7a8dc86eb Füge Unterstützung für die Verwaltung von WebSocket-Verbindungen hinzu. Implementiere Methoden zum Hinzufügen und Entfernen von Verbindungen basierend auf Benutzer-IDs. Aktualisiere die WebSocket-Callback-Logik, um empfangene Nachrichten zu verarbeiten und Benutzer-IDs zu setzen. Verbessere die Ausgabe von Debug-Informationen zur Nachverfolgung von Verbindungen und Nachrichten. 2026-01-14 14:38:42 +01:00
Torsten (PC)
c9dc891481 updated rights 2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
89c3873db7 Füge Überprüfung auf sudo-Rechte im SSL-Setup-Skript hinzu und aktualisiere die Pfade für Apache2-Zertifikate. Priorisiere Let's Encrypt-Zertifikate und füge Warnungen für Snakeoil-Zertifikate hinzu, um Benutzer über deren Einschränkungen zu informieren. Aktualisiere die Dokumentation entsprechend. 2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
60352d7932 Erweitere das SSL/TLS Setup-Skript um Unterstützung für Apache2-Zertifikate. Füge eine neue Funktion zum Einrichten und Verlinken von Apache2-Zertifikaten hinzu, einschließlich der Überprüfung auf vorhandene Zertifikate und der automatischen Erneuerung für Let's Encrypt. Aktualisiere die Benutzerführung zur Auswahl von Zertifikatstypen und dokumentiere die neuen Optionen in der SSL-Setup-Dokumentation. 2026-01-14 14:38:42 +01:00
Torsten Schulz (local)
664f2af346 Erweitere das SSL/TLS Setup-Skript für den YourPart Daemon um Unterstützung für Let's Encrypt. Füge Funktionen zur Erstellung und Erneuerung von Let's Encrypt Zertifikaten hinzu, einschließlich automatischer Erneuerung über Cron Jobs. Ermögliche die Auswahl zwischen Self-Signed und Let's Encrypt Zertifikaten und verbessere die Benutzerführung bei der Zertifikatsauswahl. 2026-01-14 14:38:42 +01:00