@scalio-cloud/ui 0.85.0 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/react/mail.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.0",
|
|
4
4
|
"description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
|
|
5
5
|
"license": "SEE LICENSE IN README.md",
|
|
6
6
|
"private": false,
|
package/react/mail.js
CHANGED
|
@@ -28,6 +28,7 @@ const LABELS = {
|
|
|
28
28
|
rightsCheck: "Status prüfen",
|
|
29
29
|
rightsState: { ok: "Senderecht vorhanden", missing: "Senderecht fehlt" },
|
|
30
30
|
rightsUnknown: "Senden Sie eine Testmail, um das Senderecht zu bestätigen.",
|
|
31
|
+
rightsSettling: (at) => `Die App hat das Senderecht eben geändert. Exchange übernimmt es bis spätestens ${at}; bis dahin kann Microsoft die Mail noch ablehnen.`,
|
|
31
32
|
rightsScriptAlso: "Lieber selbst ausführen? Skript anzeigen",
|
|
32
33
|
testFirst: "Speichern Sie zuerst Weg und Postfach.",
|
|
33
34
|
transportHint: "Über welchen Server die App Mails schickt. Passwort und Client-Secret werden verschlüsselt gespeichert und nie angezeigt.",
|
|
@@ -122,6 +123,7 @@ const LABELS = {
|
|
|
122
123
|
rightsCheck: "Check status",
|
|
123
124
|
rightsState: { ok: "Send right in place", missing: "Send right missing" },
|
|
124
125
|
rightsUnknown: "Send a test mail to confirm the send right.",
|
|
126
|
+
rightsSettling: (at) => `The app has just changed the send right. Exchange applies it by ${at} at the latest; until then Microsoft may still refuse the mail.`,
|
|
125
127
|
rightsScriptAlso: "Rather run it yourself? Show script",
|
|
126
128
|
testFirst: "Save the way and the mailbox first.",
|
|
127
129
|
transportHint: "Which server the app sends mail through. Password and client secret are stored encrypted and never shown.",
|
|
@@ -289,6 +291,12 @@ function select(id, value, options, onChange, extra) {
|
|
|
289
291
|
// With scalio-platform 0.45.0 the status names a `reason` when the app can not set the send right itself: the button
|
|
290
292
|
// «Senderecht setzen» stays visible but greyed out with that reason (grantOffHint {read_only, no_exchange, identity}:
|
|
291
293
|
// the app's own texts, e.g. Citadel «Mit Scalio Schreiben setzt Citadel das Senderecht selbst»).
|
|
294
|
+
function settlingTime(iso, lang) {
|
|
295
|
+
const d = new Date(iso);
|
|
296
|
+
if (isNaN(d.getTime())) return iso;
|
|
297
|
+
return d.toLocaleTimeString(lang === "en" ? "en-GB" : "de-CH", { hour: "2-digit", minute: "2-digit" });
|
|
298
|
+
}
|
|
299
|
+
|
|
292
300
|
function MailTransport(props) {
|
|
293
301
|
const { client, lang } = props;
|
|
294
302
|
const L = mailLabels(lang, props.labels);
|
|
@@ -564,6 +572,11 @@ function MailTransport(props) {
|
|
|
564
572
|
rightsInfo && rightsInfo.mode !== "none" && !rightsKnown
|
|
565
573
|
? h("p", { className: "scalio-settings-help", "data-testid": "mail-rights-unknown" }, L.rightsUnknown)
|
|
566
574
|
: null,
|
|
575
|
+
// scalio-platform 0.53.0: after a change Exchange needs up to two hours; the badge says «vorhanden», this says until when
|
|
576
|
+
rightsOk && rightsInfo.settling_until
|
|
577
|
+
? h("p", { className: "scalio-settings-help", "data-testid": "mail-rights-settling" },
|
|
578
|
+
L.rightsSettling(settlingTime(rightsInfo.settling_until, lang)))
|
|
579
|
+
: null,
|
|
567
580
|
rightsInfo && rightsInfo.detail && !rightsOk
|
|
568
581
|
? h("p", { className: "scalio-settings-help is-error", "data-testid": "mail-rights-detail" }, rightsInfo.detail)
|
|
569
582
|
: null,
|