* feat(webui): improve channel setup flows * fix(webui): refine channel setup interactions (NAN-112) * fix(webui): keep email setup sections channel-owned * fix(webui): remove concrete channel details from shared components * refactor(webui): remove unused channel setup resources * fix(webui): finish channel-owned setup boundaries * fix(webui): update channel switches optimistically * test(channels): remove obsolete absence assertions * fix(webui): flatten channel instance settings disclosure * fix(webui): complete channel setup and connection flows * fix(whatsapp): wait for session database release * fix(webui): preserve scrolling channel controls * fix(webui): stage channel connection checks * fix(channels): align verification actions * fix(email): expose connection checks * fix(webui): align channel field actions * fix(email): verify account credentials * fix(wecom): bypass system proxy for websocket * fix(channels): stabilize async connection cleanup * fix(webui): autosave channel credentials * fix(email): make provider presets non-destructive * test(weixin): isolate persisted QR credentials
18 lines
767 B
TypeScript
18 lines
767 B
TypeScript
import type { TFunction } from "i18next";
|
|
|
|
const messages: Record<string, string> = {
|
|
"Connection verified.": "connected",
|
|
"Configuration is present, but full verification was not possible.": "unverified",
|
|
"Required setup is missing.": "missing",
|
|
"Configuration was checked and looks invalid.": "invalid",
|
|
"This channel is not supported by the WebUI setup checker.": "unsupported",
|
|
"Configured.": "present",
|
|
"Required.": "required",
|
|
"This channel can be checked from saved fields, but not fully verified in-browser.": "manual",
|
|
};
|
|
|
|
export function channelValidationMessage(message: string, t: TFunction): string {
|
|
const key = messages[message];
|
|
return key ? t(`settings.channels.validationMessages.${key}`, { defaultValue: message }) : message;
|
|
}
|