fix(mail-ingest): AI reading can be switched back on, and its hint names the addon

ai_available folded the person's own switch in, so switching AI reading off
greyed the switch out and it never came back. It now says only whether AI
reading works on the instance (the AI Parsing addon and a connection). When
it does not, the settings card says it needs the AI Parsing addon, by its
localized name, in all 28 locales; the wiki says the same.
This commit is contained in:
Maurice
2026-11-13 19:29:48 +01:00
parent 1aa586d829
commit 2ee413368b
33 changed files with 54 additions and 33 deletions
@@ -109,7 +109,12 @@ export default function MailImportSection(): ReactElement | null {
/>
<SettingRow
label={t('mailInbox.settings.ai')}
hint={aiAvailable ? t('mailInbox.settings.aiHint') : t('mailInbox.settings.aiUnavailable')}
// Off without the AI Parsing addon and a connection: the hint names the addon, so the person knows what to ask for.
hint={
aiAvailable
? t('mailInbox.settings.aiHint')
: t('mailInbox.settings.aiUnavailable', { addon: t('admin.addons.catalog.llm_parsing.name') })
}
dimmed={!prefs.enabled}
control={
<ToggleSwitch