feat: Rename to Toju and add translation
Some checks failed
Deploy Web Apps / deploy (push) Successful in 5m52s
Build Android APK / build-android-apk (push) Failing after 23m15s
Queue Release Build / prepare (push) Successful in 1m42s
Queue Release Build / build-linux (push) Failing after 9m33s
Queue Release Build / build-windows (push) Successful in 26m5s
Queue Release Build / finalize (push) Has been skipped
Some checks failed
Deploy Web Apps / deploy (push) Successful in 5m52s
Build Android APK / build-android-apk (push) Failing after 23m15s
Queue Release Build / prepare (push) Successful in 1m42s
Queue Release Build / build-linux (push) Failing after 9m33s
Queue Release Build / build-windows (push) Successful in 26m5s
Queue Release Build / finalize (push) Has been skipped
This commit is contained in:
@@ -49,6 +49,7 @@ import {
|
||||
} from '../../shared-kernel';
|
||||
import { setStoredCurrentUserId } from '../../core/storage/current-user-storage';
|
||||
import { findRoomMember, removeRoomMember } from '../rooms/room-members.helpers';
|
||||
import { AppI18nService } from '../../core/i18n';
|
||||
|
||||
type IncomingModerationExtraAction =
|
||||
| ReturnType<typeof RoomsActions.forgetRoom>
|
||||
@@ -66,6 +67,7 @@ export class UsersEffects {
|
||||
private db = inject(DatabaseService);
|
||||
private serverDirectory = inject(ServerDirectoryFacade);
|
||||
private webrtc = inject(RealtimeSessionFacade);
|
||||
private readonly i18n = inject(AppI18nService);
|
||||
|
||||
/** Prepares persisted state for a successful login before exposing the user in-memory. */
|
||||
authenticateUser$ = createEffect(() =>
|
||||
@@ -81,7 +83,9 @@ export class UsersEffects {
|
||||
RoomsActions.loadRooms()
|
||||
]),
|
||||
catchError((error: Error) =>
|
||||
of(UsersActions.loadCurrentUserFailure({ error: error.message || 'Failed to prepare local user state.' }))
|
||||
of(UsersActions.loadCurrentUserFailure({
|
||||
error: error.message || this.i18n.instant('auth.users.prepareStateFailed')
|
||||
}))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -97,7 +101,7 @@ export class UsersEffects {
|
||||
from(this.db.getCurrentUser()).pipe(
|
||||
switchMap((user) => {
|
||||
if (!user) {
|
||||
return of(UsersActions.loadCurrentUserFailure({ error: 'No current user' }));
|
||||
return of(UsersActions.loadCurrentUserFailure({ error: this.i18n.instant('auth.users.noCurrentUser') }));
|
||||
}
|
||||
|
||||
const sanitizedUser = this.clearStartupVoiceConnection(user);
|
||||
@@ -514,7 +518,7 @@ export class UsersEffects {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
return user.username?.trim() || 'User';
|
||||
return user.username?.trim() || this.i18n.instant('common.defaultUser');
|
||||
}
|
||||
|
||||
private toSourceSelector(room: Room): { sourceId?: string; sourceUrl?: string } {
|
||||
|
||||
Reference in New Issue
Block a user