feat(Localization, User Management): add missingUserId translations and enhance user ID handling
All checks were successful
Deploy to production / deploy (push) Successful in 2m2s
All checks were successful
Deploy to production / deploy (push) Successful in 2m2s
- Added translations for the "missingUserId" key in multiple languages to improve user feedback when user ID is not available. - Updated the user ID handling in the store and WorkerSchedulesView component to ensure proper user identification when sending data to the daemon. - Enhanced error handling to notify users when the user ID is missing, improving overall user experience.
This commit is contained in:
@@ -418,12 +418,17 @@ const store = createStore({
|
||||
setTimeout(() => {
|
||||
try {
|
||||
if (daemonSocket.readyState === WebSocket.OPEN && state.isLoggedIn && state.user) {
|
||||
const daemonUserId = state.user?.hashedId || state.user?.id || state.user?.username;
|
||||
if (!daemonUserId) {
|
||||
console.warn('[Daemon] Keine User-ID fuer setUserId vorhanden');
|
||||
return;
|
||||
}
|
||||
const payload = JSON.stringify({
|
||||
event: 'setUserId',
|
||||
data: { userId: state.user.id }
|
||||
data: { userId: daemonUserId }
|
||||
});
|
||||
daemonSocket.send(payload);
|
||||
console.log('[Daemon] setUserId gesendet für User:', state.user.id);
|
||||
console.log('[Daemon] setUserId gesendet fuer User:', daemonUserId);
|
||||
} else {
|
||||
console.warn('[Daemon] Socket nicht mehr offen oder Benutzer nicht eingeloggt beim Senden von setUserId');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user