Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Added SessionGuard component to manage session expiration and online status. - Updated AuthProvider to streamline session fetching and handling. - Introduced IdentityProvidersSection for managing OAuth, SAML, and LDAP identity providers. - Implemented identity provider guides for easier configuration. - Enhanced mail settings with infinite scroll option for improved user experience. - Updated global styles and layout components for better consistency across the application.
70 lines
3.5 KiB
TypeScript
70 lines
3.5 KiB
TypeScript
import { MAIL_SETTINGS_NAV, type MailSettingsSectionId } from "@/lib/mail-settings/settings-nav"
|
|
|
|
export type MailSettingsSearchEntry = {
|
|
id: string
|
|
label: string
|
|
description?: string
|
|
sectionId: MailSettingsSectionId
|
|
sectionLabel: string
|
|
href: string
|
|
keywords: string
|
|
}
|
|
|
|
function sectionHref(sectionId: MailSettingsSectionId): string {
|
|
return MAIL_SETTINGS_NAV.find((item) => item.id === sectionId)?.href ?? "/mail/settings"
|
|
}
|
|
|
|
function sectionLabel(sectionId: MailSettingsSectionId): string {
|
|
return MAIL_SETTINGS_NAV.find((item) => item.id === sectionId)?.label ?? "Affichage"
|
|
}
|
|
|
|
function entry(
|
|
sectionId: MailSettingsSectionId,
|
|
id: string,
|
|
label: string,
|
|
keywords: string,
|
|
description?: string
|
|
): MailSettingsSearchEntry {
|
|
return {
|
|
id,
|
|
label,
|
|
description,
|
|
sectionId,
|
|
sectionLabel: sectionLabel(sectionId),
|
|
href: sectionHref(sectionId),
|
|
keywords,
|
|
}
|
|
}
|
|
|
|
/** Index statique des réglages recherchables (sections + sous-rubriques). */
|
|
export const MAIL_SETTINGS_SEARCH_INDEX: MailSettingsSearchEntry[] = [
|
|
...MAIL_SETTINGS_NAV.map((item) =>
|
|
entry(item.id, `section-${item.id}`, item.label, `${item.description} réglages paramètres`, item.description)
|
|
),
|
|
entry("display", "density", "Densité", "compact normal défaut espacement liste messages"),
|
|
entry("display", "theme", "Thème", "clair sombre dark light mode apparence couleurs"),
|
|
entry("display", "background", "Arrière-plan", "fond wallpaper image thème décor"),
|
|
entry("display", "inbox-type", "Type de boîte de réception", "important non lus suivis starred tri inbox"),
|
|
entry("display", "reading-pane", "Volet de lecture", "split panneau droite aperçu message"),
|
|
entry("display", "conversation", "Mode Conversation", "fil discussion thread regrouper messages"),
|
|
entry("display", "infinite-scroll", "Scroll infini", "défilement pagination liste messages bureau desktop"),
|
|
entry("accounts", "add-account", "Ajouter un compte mail", "imap smtp oauth connecter serveur"),
|
|
entry("accounts", "identities", "Identités d'envoi", "alias from expéditeur adresse envoi"),
|
|
entry("accounts", "imap", "IMAP", "réception serveur entrant synchronisation"),
|
|
entry("accounts", "smtp", "SMTP", "envoi serveur sortant"),
|
|
entry("accounts", "signature-library", "Bibliothèque de signatures", "créer modifier supprimer signature html"),
|
|
entry("accounts", "signature-assign", "Signature par identité", "identité signature par défaut sélecteur compte mail"),
|
|
entry("labels", "labels", "Libellés", "tags couleur étiquettes organisation"),
|
|
entry("labels", "folders", "Dossiers", "imap unified unifiés arborescence"),
|
|
entry("labels", "unified-folders", "Dossiers unifiés", "cross-comptes organisation partagée"),
|
|
entry("notifications", "desktop-new", "Nouveaux messages (bureau)", "notification desktop alerte push"),
|
|
entry("notifications", "desktop-mentions", "Mentions et réponses", "notification mention reply"),
|
|
entry("notifications", "email-digest", "Résumé quotidien par e-mail", "digest récap quotidien"),
|
|
entry("notifications", "sound", "Son de notification", "audio alerte sonore"),
|
|
entry("automation", "rules", "Règles de tri", "automatisation filtre tri forward réponse"),
|
|
entry("automation", "webhooks", "Webhooks", "http post template payload externe"),
|
|
entry("automation", "llm", "Fournisseurs LLM", "ia openai tri intelligent llm"),
|
|
entry("automation", "search-providers", "Fournisseurs de recherche", "web search api recherche"),
|
|
entry("automation", "api-tokens", "Tokens API", "agent ia accès programmatique fine-grained"),
|
|
]
|