mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-01 16:05:39 +00:00
Contents accumulated in the working tree since the initial commit: - Multi-account: account-store, per-accountId credential scoping, account switcher in sidebar, add-account flow on LoginScreen - Calendar: recurring event expansion, EventModal/EventDetailSheet, week/ agenda views, calendar sidebar, participant input, per-day event index for O(1) cell lookup (MonthView/WeekView/AgendaView) - Contacts: contact detail/form/group screens, vCard import/export, avatar utils, contact picker sheet, sidebar drawer - Email: compose screen, thread screen, sender avatar, EmailBodyView with CID image resolution and external-content policy - Infrastructure: navigation types, mailbox tree helper, settings store Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
12 lines
306 B
TypeScript
12 lines
306 B
TypeScript
export const MAX_ACCOUNTS = 5;
|
|
|
|
export function generateAccountId(username: string, serverUrl: string): string {
|
|
let host = serverUrl;
|
|
try {
|
|
host = new URL(serverUrl).hostname;
|
|
} catch {
|
|
host = serverUrl.replace(/^https?:\/\//, '').replace(/\/.*$/, '');
|
|
}
|
|
return `${username}@${host}`;
|
|
}
|