Sending method, the owner's answers: nothing changes until another option is picked; the panel warns before the save
- a save that sends the method already shown, while nothing is stored, stores nothing: the site keeps sending exactly as before and keeps following what is filled in, until somebody picks ANOTHER option - the state block reads the form as it is edited and warns at once when "Own SMTP server" is picked with server, user name or password empty, or "Microsoft Graph" on a server without GRAPH_* (graphReady in the panel state); it reloads after every save - texts, doctor's info finding, docs, skills, changelog; reference e2e checks the warning Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
8c19391590
commit
dc3e594d38
@@ -12,8 +12,10 @@ export const integrationsTexts = defineTexts({
|
||||
|
||||
// Intecion mail service: the state block on the e-mail tab (MailRelayStatus) and its routes
|
||||
mailMethodGraphNotSetUp: 'Microsoft Graph is chosen, but it is not set up on this server. E-mails are not sent. Ask your administrator.',
|
||||
mailMethodNotChosen: 'Nobody has chosen the sending method yet, so the site picked this one. Save this page to keep it.',
|
||||
mailMethodGraphNotSetUpForm: 'Microsoft Graph is not set up on this server. If you save this, e-mails will not be sent.',
|
||||
mailMethodNotChosen: 'The site sends the way it did before. It changes only when you pick another sending method.',
|
||||
mailMethodSmtpIncomplete: 'Your SMTP server is chosen, but its settings are incomplete. E-mails are not sent. Fill in server, user name and password.',
|
||||
mailMethodSmtpIncompleteForm: 'Fill in server, user name and password below. If you save without them, e-mails will not be sent.',
|
||||
mailRelayCheck: 'Check now',
|
||||
mailRelayConnect: 'Connect again',
|
||||
mailRelayConnected: `The site is connected to ${IWSN}.`,
|
||||
@@ -138,8 +140,10 @@ export const integrationsTexts = defineTexts({
|
||||
alertsUnknownError: 'Nieznany błąd.',
|
||||
|
||||
mailMethodGraphNotSetUp: 'Wybrano Microsoft Graph, ale nie jest on skonfigurowany na tym serwerze. E-maile nie są wysyłane. Zapytaj administratora.',
|
||||
mailMethodNotChosen: 'Nikt jeszcze nie wybrał sposobu wysyłki, więc witryna dobrała ten. Zapisz tę stronę, aby go zachować.',
|
||||
mailMethodGraphNotSetUpForm: 'Microsoft Graph nie jest skonfigurowany na tym serwerze. Jeśli to zapiszesz, e-maile nie będą wysyłane.',
|
||||
mailMethodNotChosen: 'Witryna wysyła tak jak dotąd. Zmieni to dopiero wybór innego sposobu wysyłki.',
|
||||
mailMethodSmtpIncomplete: 'Wybrano Twój serwer SMTP, ale jego ustawienia są niepełne. E-maile nie są wysyłane. Uzupełnij serwer, nazwę użytkownika i hasło.',
|
||||
mailMethodSmtpIncompleteForm: 'Uzupełnij poniżej serwer, nazwę użytkownika i hasło. Jeśli zapiszesz bez nich, e-maile nie będą wysyłane.',
|
||||
mailRelayCheck: 'Sprawdź teraz',
|
||||
mailRelayConnect: 'Połącz ponownie',
|
||||
mailRelayConnected: `Witryna jest połączona z ${IWSN}.`,
|
||||
|
||||
@@ -69,7 +69,7 @@ export const mailRules: DoctorRule[] = [
|
||||
return [{ fix: 'set the four GRAPH_* variables on the server — or choose another sending method in Site integrations → E-mail sending (Microsoft Graph is deprecated and removed in 2.0)', message: '"Microsoft Graph" is the chosen sending method, but the GRAPH_* variables are missing on this server: e-mails are not sent (nothing is sent another way)', severity: 'error' }]
|
||||
}
|
||||
if (mail.methodChosen === false && mail.transport !== 'none') {
|
||||
return [{ fix: 'open Site integrations → E-mail sending, check "Sending method" and save: from then on the site sends that way only', message: `nobody has chosen the sending method yet: the site picks one from what is filled in (now: ${mail.transport === 'relay' ? 'the built-in service' : mail.transport === 'smtp' ? 'the SMTP server' : 'Microsoft Graph'}), and would switch by itself if that changed`, severity: 'info' }]
|
||||
return [{ fix: 'nothing to do while it sends the way it should; to fix the method, pick it in Site integrations → E-mail sending (another option, or setMailMethod)', message: `nobody has picked a sending method: the site sends the way it did before the upgrade (now: ${mail.transport === 'relay' ? 'the built-in service' : mail.transport === 'smtp' ? 'the SMTP server' : 'Microsoft Graph'}) and follows what is filled in, as before`, severity: 'info' }]
|
||||
}
|
||||
return []
|
||||
},
|
||||
|
||||
@@ -31,6 +31,8 @@ export type MailPanelState = {
|
||||
accessKeyField?: boolean
|
||||
/** The address the service calls this site back at. */
|
||||
confirmUrl?: string
|
||||
/** The four `GRAPH_*` variables are set on this server (whether "Microsoft Graph" could send). */
|
||||
graphReady: boolean
|
||||
/**
|
||||
* An admin chose the method in effect ("Sending method" was saved). False: nobody has chosen yet, and the
|
||||
* method follows the order of 1.17.0 until Site integrations is saved.
|
||||
@@ -100,6 +102,7 @@ export async function mailPanelState(req: Pick<PayloadRequest, 'payload'>, own:
|
||||
return {
|
||||
...(options?.accessKeyField === true ? { accessKeyField: true } : {}),
|
||||
...(status?.host ? { confirmUrl: `https://${status.host}${api}${RELAY_CONFIRM_PATH}` } : {}),
|
||||
graphReady: graphAvailable(),
|
||||
methodChosen: method.explicit,
|
||||
...(mailMethodColumnMissing() ? { methodColumnMissing: true } : {}),
|
||||
...(method.problem ? { methodProblem: method.problem } : {}),
|
||||
|
||||
Reference in New Issue
Block a user