Commit Graph

268 Commits

Author SHA1 Message Date
Torsten Schulz (local)
e57de7f983 Fix typo in healthDrunkOfLife method and enhance health change logic in FalukantService; refactor health measures localization structure in English and German JSON files for better organization. 2025-12-02 13:05:39 +01:00
Torsten Schulz (local)
08e2c87de8 Enhance branch selection with weather information and localization updates
- Updated FalukantService to include weather data in branch retrieval, enhancing user context.
- Modified BranchSelection component to display current weather for selected branches, improving user experience.
- Added weather translations in both English and German localization files for better accessibility.
- Improved styling for weather information display in the frontend.
2025-12-02 12:53:02 +01:00
Torsten Schulz (local)
ba1a12402d Add product weather effects and regional pricing enhancements
- Introduced a new endpoint in FalukantController to retrieve product prices based on region and product ID.
- Implemented logic in FalukantService to calculate product prices considering user knowledge and regional factors.
- Added weather-related data models and associations to enhance product pricing accuracy based on weather conditions.
- Updated frontend components to cache and display regional product prices effectively, improving user experience.
2025-12-02 09:55:08 +01:00
Torsten Schulz (local)
39716b1f40 Add regional pricing calculation for products in FalukantService
- Introduced a new function `calcRegionalSellPrice` to compute product prices based on regional worth percentages.
- Updated existing methods to utilize the new pricing logic, ensuring revenue calculations reflect regional variations.
- Integrated retrieval of `TownProductWorth` data to enhance pricing accuracy across different regions.
2025-12-02 08:44:53 +01:00
Torsten Schulz (local)
adc7132404 Add product price retrieval feature in cities
- Implemented a new endpoint in FalukantController to fetch product prices in various cities based on product ID and current price.
- Developed the corresponding service method in FalukantService to calculate and return prices, considering user knowledge and city branches.
- Updated frontend components (RevenueSection and SaleSection) to display better prices for products, including loading logic and UI enhancements for price visibility.
- Added styling for price indicators based on branch types to improve user experience.
2025-12-01 16:42:54 +01:00
Torsten Schulz (local)
8c8841705c Implement daemon socket listener management in BranchView.vue
- Added a watcher for the daemon socket to properly register and unregister message event listeners on socket changes.
- Simplified the event listener setup for handling daemon messages, improving code clarity and maintainability.
- Ensured that listeners are removed during component unmount to prevent memory leaks.
2025-12-01 14:06:18 +01:00
Torsten Schulz (local)
f7fdd8ab08 Refactor localization structure for production notifications in English and German
- Updated the localization files to nest the "overproduction" notification under a "production" key for better organization and clarity.
- Ensured consistency in translation structure across both English and German localization files.
2025-12-01 11:51:37 +01:00
Torsten Schulz (local)
5807c6f3d3 Update daemon socket configuration and fallback logic in frontend scripts
- Changed the default value for `VITE_DAEMON_SOCKET` in `deploy-frontend.sh` and `update-frontend.sh` to connect directly to port 4551 instead of using the Apache proxy.
- Updated fallback logic in `frontend/src/store/index.js` to reflect the new direct connection to the daemon on port 4551, enhancing connection reliability.
2025-12-01 11:46:50 +01:00
Torsten Schulz (local)
7e0691eea3 Enhance message formatting and localization handling in MessagesDialog.vue
- Updated the formatBody method to support JSON formatted translation keys and improve key normalization for i18n.
- Ensured that keys are correctly prefixed with the "falukant.notifications." namespace when necessary, enhancing translation accuracy.
2025-12-01 11:26:46 +01:00
Torsten Schulz (local)
17d4d21620 Add new daemon start script and update localization for director salary
- Introduced a new script `start-daemon` in `package.json` for running the daemon server.
- Added translations for "director payed out" in both English and German localization files to enhance user notifications.
2025-12-01 10:06:06 +01:00
Torsten Schulz (local)
d19feb8bc1 Update daemon socket URL and enhance message rendering in frontend
- Changed the default value for `VITE_DAEMON_SOCKET` in `deploy-frontend.sh` and `update-frontend.sh` to use the `/ws/` path.
- Updated the message rendering logic in `MessagesDialog.vue` to utilize a new `formatBody` method for improved translation handling.
- Added a new translation for "overproduction" in both English and German localization files.
2025-12-01 09:47:16 +01:00
Torsten Schulz (local)
ab1e4bec60 Update localization for notifications in English and German
- Added new notification translations for election creation in both `falukant.json` files.
- Updated the message rendering in `MessagesDialog.vue` to include the new translation structure.
2025-12-01 09:32:59 +01:00
Torsten Schulz (local)
672cec9c2a Add localization updates for money history in English and German 2025-12-01 09:28:44 +01:00
Torsten Schulz (local)
c3ea7eecc2 Update dependencies and refactor authentication logic
- Replaced `bcrypt` with `bcryptjs` for compatibility in `authService.js` and `settingsService.js`.
- Updated package versions in `package.json` and `package-lock.json`, including `multer`, `nodemailer`, and others.
- Added storage management features in the frontend, including free storage calculation and localization updates for new terms in `falukant.json` files.
2025-11-26 18:14:36 +01:00
Torsten Schulz (local)
608e62c2bd Implement cooldown feature for nobility advancement
- Added logic in FalukantService to calculate the next available advancement date based on the user's last advancement.
- Updated the frontend to display a cooldown message indicating when the user can next advance in nobility.
- Enhanced the NobilityView component to handle and format the next advancement date appropriately.
2025-11-26 17:23:54 +01:00
Torsten Schulz (local)
c1b69389c6 Add lastNobilityAdvanceAt field and update logic in FalukantService
- Introduced a new field `lastNobilityAdvanceAt` in the FalukantUser model to track the last time a user advanced in nobility.
- Updated the `FalukantService` to enforce a one-week cooldown between nobility advancements, throwing an error if the user attempts to advance too soon.
- Ensured the `lastNobilityAdvanceAt` field is updated with the current date upon a successful nobility advancement.
2025-11-26 17:17:37 +01:00
Torsten (PC)
182f38597c update-funktion verbessert 2025-11-26 17:16:30 +01:00
Torsten Schulz (local)
06ea259dc9 Add Falukant region and transport management features
- Implemented new endpoints in AdminController for managing Falukant regions, including fetching, updating, and deleting region distances.
- Enhanced the FalukantService with methods for retrieving region distances and handling upsert operations.
- Updated the router to expose new routes for region management and transport creation.
- Introduced a transport management interface in the frontend, allowing users to create and manage transports between branches.
- Added localization for new transport-related terms and improved the vehicle management interface to include transport options.
- Enhanced the database initialization logic to support new region and transport models.
2025-11-26 16:44:27 +01:00
Torsten Schulz (local)
29dd7ec80c Refactor daemon connection logic and enhance error handling
- Simplified fallback logic for daemon URL generation, removing hardcoded values and using dynamic protocol and hostname.
- Added detailed error messages for common WebSocket connection issues, improving debugging capabilities.
- Updated reconnection warning messages to guide users on potential configuration issues with the daemon server.
2025-11-24 20:28:11 +01:00
Torsten Schulz (local)
3f043fc315 Add vehicle management features in Falukant
- Introduced vehicle types and transport management in the backend, including new models and associations for vehicles and transports.
- Implemented service methods to retrieve vehicle types and handle vehicle purchases, ensuring user validation and transaction management.
- Updated the FalukantController and router to expose new endpoints for fetching vehicle types and buying vehicles.
- Enhanced the frontend with a new transport tab in BranchView, allowing users to buy vehicles, and added localization for vehicle-related terms.
- Included initialization logic for vehicle types in the database setup.
2025-11-24 20:15:45 +01:00
Torsten Schulz (local)
5ed27e5a6a Refactor navigation and enhance director information display
- Removed the directors section from the navigation menu for a cleaner interface.
- Updated the FalukantService to include additional attributes for directors, such as knowledges and region.
- Enhanced the DirectorInfo component to display detailed information, including knowledge and income management features.
- Implemented tab navigation in BranchView for better organization of director, inventory, production, and storage sections.
- Updated localization files to reflect changes in navigation and tab labels.
2025-11-24 16:38:36 +01:00
Torsten Schulz (local)
23725c20ee Enhance mood change calculation in FalukantService
- Updated the mood change calculation to include a random bonus between 0 and 7 points, improving variability in user experience.
- Refactored the calculation logic for clarity, separating the base change value from the random bonus.
2025-11-24 15:51:27 +01:00
Torsten Schulz (local)
29b6db7ee9 Update dropdown positioning in FormattedDropdown component for improved visibility
- Changed the dropdown list positioning from normal document flow to absolute positioning, ensuring the list is reliably visible when opened.
2025-11-24 15:39:44 +01:00
Torsten Schulz (local)
6e7165fe7f Add console log to toggleDropdown method in FormattedDropdown component for debugging 2025-11-24 15:33:55 +01:00
Torsten Schulz (local)
43131250ed Fix dropdown toggle method in FormattedDropdown component to ensure proper function call 2025-11-24 15:26:44 +01:00
Torsten Schulz (local)
c3beb029e5 Refactor FormattedDropdown and enhance BranchView functionality
- Updated the FormattedDropdown component to use normal document flow for the dropdown list, ensuring visibility when opened.
- Enhanced the createBranch method in BranchView to automatically select the most recently created branch after a new branch is added, improving user experience.
2025-11-24 15:19:35 +01:00
Torsten Schulz (local)
9f10ac9e96 Enhance BranchSelection component to force re-render on branch list change
- Added a computed property `branchesKey` to generate a unique key based on branch IDs, ensuring the dropdown re-renders when the branch list updates.
- Updated the FormattedDropdown component to utilize this key for improved responsiveness to data changes.
2025-11-24 13:45:04 +01:00
Torsten Schulz (local)
d36901aa2b Refactor tab change logic in PoliticsView to simplify loading conditions
- Updated the onTabChange method to remove unnecessary checks for existing data before loading current positions, open politics, and elections.
- This change enhances the clarity of the method and ensures that data is always loaded when the respective tab is selected.
2025-11-24 12:24:31 +01:00
Torsten Schulz (local)
4510aa3d14 Implement politics overview feature in FalukantService and update UI
- Added a new method `getPoliticsOverview` in FalukantService to retrieve currently held offices, including office holders and term end dates.
- Enhanced the PoliticsView component to display the term end dates for current offices.
- Updated localization files to include a new message for applying to selected positions.
- Improved the handling of already applied positions in the open politics section, pre-selecting checkboxes accordingly.
2025-11-24 11:50:21 +01:00
Torsten Schulz (local)
3b8736acd7 Enhance WebSocketLogDialog to display enriched user information
- Updated the WebSocketLogDialog to use enriched log entries with resolved usernames for connection and target users.
- Implemented batch retrieval of user information from the API to improve user display in logs.
- Added error handling for user data fetching and fallback logic for missing usernames.
2025-11-22 13:32:44 +01:00
Torsten Schulz (local)
735075d1bd Add WebSocket Log feature to Services Status View
- Introduced a WebSocket Log section in the Services Status View, allowing users to view real-time logs.
- Updated localization files for both German and English to include WebSocket Log messages.
- Enhanced the UI with a button to open the WebSocket Log dialog, improving user interaction and monitoring capabilities.
2025-11-22 13:21:13 +01:00
Torsten Schulz (local)
dc7001a80c Implement batch user retrieval in AdminController and update routes
- Added a new method `getUsers` in AdminController to handle batch retrieval of user information based on hashed IDs.
- Updated adminRouter to include a new route for batch user retrieval.
- Enhanced AdminService with a method to fetch user details by hashed IDs, ensuring proper access control.
- Updated localization files to include the new "username" field for user connections in both German and English.
- Modified ServicesStatusView to utilize the new batch user retrieval for displaying usernames alongside connection counts.
2025-11-21 23:49:05 +01:00
Torsten Schulz (local)
8a9acf6c4a Refactor ServicesStatusView to handle daemon response structure
- Updated the handling of daemon responses to accommodate a new structure that includes user connection counts.
- Transformed the users object into an array for easier template rendering.
- Improved error handling for JSON parsing and daemon message processing.
2025-11-21 23:45:29 +01:00
Torsten Schulz (local)
5ca017950e Remove Google Chrome RPM package file 2025-11-20 15:52:04 +01:00
Torsten Schulz (local)
eadec50e30 Feature: Add Services Status page and update navigation
- Introduced a new Services Status page to monitor the status of Backend, Chat, and Daemon services.
- Updated navigation structure to include the new Services Status link for main admin users.
- Added German and English localization for the Services Status page, including titles, descriptions, and status messages.
2025-11-20 15:49:08 +01:00
Torsten Schulz (local)
e7f5918013 Enhance Vite configuration to load environment variables
- Refactored Vite configuration to load environment variables explicitly based on the current mode
- Added support for additional environment variables: VITE_DAEMON_SOCKET, VITE_API_BASE_URL, VITE_CHAT_WS_URL, and VITE_SOCKET_IO_URL
- Improved clarity and maintainability of the configuration structure
2025-11-18 08:59:20 +01:00
Torsten Schulz (local)
27b675cb19 Refactor daemon URL configuration and enhance logging
- Improved fallback logic for daemon URL based on hostname and environment
- Added detailed logging for daemon connection status and environment settings
- Streamlined handling of environment variables for better clarity
2025-11-18 08:50:25 +01:00
Torsten Schulz (local)
016a37c116 Refactor daemon connection logic and enhance logging
- Improved handling of daemon URL configuration based on environment variables
- Added detailed logging for daemon connection status and environment settings
- Streamlined fallback logic for local development and production environments
2025-11-18 08:37:02 +01:00
Torsten Schulz (local)
d8b1efc3ca Enhance StatusBar and daemon connection management
- Added image preloading for quick access in StatusBar component
- Implemented a watcher to reload images when the menu changes
- Introduced a delay before sending 'setUserId' to ensure daemon readiness
- Improved logging for WebSocket close events and errors
2025-11-17 16:19:43 +01:00
Torsten Schulz (local)
d13fe19198 Fix: Enhance daemon connection management and retry logic
- Clear socket reference on connection close and error
- Ensure reconnection attempts only occur if the user is logged in
- Improved logging for reconnection attempts and retry count
- Added maximum retry limit with extended wait time after reaching it
2025-11-16 11:33:20 +01:00
Torsten Schulz (local)
762a2e9cf0 Fix: Improve daemon connection handling and retry logic
- Reset daemon connection state on successful connection and errors
- Clear retry timer when connection is established
- Enhanced retry logic to prevent multiple simultaneous connection attempts
- Improved logging for daemon reconnection attempts
2025-10-31 16:24:35 +01:00
Torsten Schulz (local)
44a2c525e7 Fix: Restore original avatar images
- Avatar images should not be optimized as they are used for character display
- Restored original 1792x1024 resolution for proper character appearance
- Only small icons should be optimized, not character avatars
2025-10-24 23:22:22 +02:00
Torsten Schulz (local)
507b0275d3 Performance: Optimize all images and improve error handling
- Optimized Falukant shortmap icons: 1.4MB-2.9MB → 1.9KB-3.3KB (99%+ reduction)
- Optimized all large images: avatars, maps, passengers, products, etc.
- Improved error handling in getGifts method with better logging
- Fixed icon loading performance issues
- Maintained original design while dramatically improving load times
- Total space savings: ~100MB+
2025-10-24 23:18:18 +02:00
Torsten Schulz (local)
ccd8bfba0d Feature: Termine-Anzeige auf der Startseite
- Neue CSV-Datei backend/data/termine.csv für Termine-Speicherung
- Backend-Controller und Router für /api/termine Endpoint
- TermineWidget Component zur Anzeige von bevorstehenden Terminen
- Integration in LoggedInView (Startseite für eingeloggte User)
- Zeigt Datum, Titel, Beschreibung, Ort und Uhrzeit an
- Sortiert nach Datum, filtert automatisch vergangene Termine
2025-10-20 22:27:35 +02:00
Torsten Schulz (local)
47f5def67c Fix: Korrekter Tabellenname für UserRightType Model
- Ändere tableName von 'user_right_type' zu 'user_right'
- Die Tabelle heißt type.user_right, nicht type.user_right_type
- Behebt: Verwaltungsmenü wird nicht angezeigt für mainadmin
2025-10-20 21:33:12 +02:00
Torsten Schulz (local)
5c1252801e Fix: Null-safe access to rightType.title in menu endpoint
- Verwende Optional Chaining (?.) für ur.rightType.title
- Filtere null/undefined Werte aus rights Array
- Behebt: Cannot read properties of null (reading 'title')
2025-10-20 21:14:53 +02:00
Torsten Schulz (local)
56d85b091a Fix: Return minimal menu on error instead of 500
- Bei Fehler im menu() Endpunkt wird jetzt ein minimales Menü zurückgegeben
- Verhindert 500 Internal Server Error wenn Falukant-Tabelle nicht verfügbar
- Ermöglicht Benutzern weiterhin Zugriff auf Basis-Funktionen
2025-10-20 21:12:16 +02:00
Torsten Schulz (local)
2d430691ad Fix: Null-Check für menu.falukant in StatusBar
- Prüfe ob menu.falukant und menu.falukant.children existieren
- Verhindert TypeError wenn Falukant-Menü nicht geladen ist
- Behebt: can't access property 'children', e.menu.falukant is undefined
2025-10-20 21:08:02 +02:00
Torsten Schulz (local)
5be3855bcd Fix: Robustere Fehlerbehandlung für Falukant-Account-Check im Menü-Filtering
- Füge try-catch zu hasFalukantAccount() hinzu um DB-Fehler abzufangen
- Füge try-catch zu filterMenu() hinzu für zusätzliche Sicherheit
- Verhindert Crash wenn Falukant-User-Tabelle nicht verfügbar ist
- Fallback: return false wenn Fehler auftritt
2025-10-20 21:04:20 +02:00
Torsten Schulz (local)
c81e61433c Erweiterung der Kollisionslogik im Taxi-Spiel
Änderungen:
- Implementierung einer erweiterten Kollisionsprüfung für Passagiere und Ziele, um den Kollisionsbereich um 30px in alle Richtungen zu vergrößern.
- Anpassung der Methoden zur Abholung und Ablieferung von Passagieren, um die neue Kollisionslogik zu nutzen.
- Verbesserung der Kommentare zur Klarheit der Änderungen und des Codes.

Diese Anpassungen verbessern die Genauigkeit der Kollisionserkennung und optimieren das Spielerlebnis durch eine erweiterte Interaktion mit Passagieren und Zielen.
2025-10-20 20:51:55 +02:00