fix(core): avoid infinite sign in with selfhost (#13169)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* The 404 page now reflects user session state across multiple servers,
showing the appropriate user context when multiple accounts are logged
in.

* **Improvements**
* Enhanced user experience on the 404 page by accurately displaying
information based on the first active logged-in account across all
servers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
EYHN
2025-07-11 17:46:11 +08:00
committed by GitHub
parent 9cda655c9e
commit 0e8ffce126
2 changed files with 38 additions and 16 deletions
@@ -47,6 +47,17 @@ export class ServersService extends Service {
[] as any
);
serversWithAccount$ = this.servers$
.map(servers =>
servers.map(server =>
server.account$.map(account => ({
server,
account,
}))
)
)
.flat();
server$(id: string) {
return this.servers$.map(servers =>
servers.find(server => server.id === id)