@scalio-cloud/ui 0.71.0 → 0.72.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 +30 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.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
|
@@ -20,6 +20,11 @@ const LABELS = {
|
|
|
20
20
|
autoHint: "Die App richtet das Senderecht mit ihrer Verbindung zum Tenant selbst ein, nur für dieses Postfach («RBAC for Applications»). Exchange übernimmt es nach bis zu zwei Stunden.",
|
|
21
21
|
autoGrant: "Senderecht setzen",
|
|
22
22
|
autoGranted: "Senderecht gesetzt",
|
|
23
|
+
grantOff: {
|
|
24
|
+
read_only: "Die Verbindung zum Tenant darf Exchange Online nur lesen. Darum setzt die App das Senderecht nicht selbst: Führen Sie das Skript aus.",
|
|
25
|
+
no_exchange: "Die Verbindung zum Tenant hat keinen Zugang zur Exchange-Verwaltung. Darum setzt die App das Senderecht nicht selbst: Führen Sie das Skript aus.",
|
|
26
|
+
identity: "Die App konnte ihre eigene Identität im Tenant nicht lesen. Prüfen Sie die Tenant-Verbindung oder führen Sie das Skript aus.",
|
|
27
|
+
},
|
|
23
28
|
rightsCheck: "Status prüfen",
|
|
24
29
|
rightsState: { ok: "Senderecht vorhanden", missing: "Senderecht fehlt", unknown: "Senderecht nicht prüfbar, die Testmail zeigt es" },
|
|
25
30
|
rightsScriptAlso: "Lieber selbst ausführen? Skript anzeigen",
|
|
@@ -54,7 +59,7 @@ const LABELS = {
|
|
|
54
59
|
tenantChoose: "Bitte wählen",
|
|
55
60
|
noTenants: "Noch kein Tenant verbunden. Verbinden Sie zuerst einen Tenant, dann wählen Sie ihn hier.",
|
|
56
61
|
rightsTitle: "Senderecht in Exchange Online",
|
|
57
|
-
rightsHint: "Damit die App nur als dieses Postfach senden darf: Führen Sie das Skript einmal als Exchange-Administrator in der Azure Cloud Shell
|
|
62
|
+
rightsHint: "Damit die App nur als dieses Postfach senden darf: Führen Sie das Skript einmal als Exchange-Administrator in der Azure Cloud Shell oder in PowerShell 7 auf Ihrem Computer aus (fehlende Module installiert es selbst). Es nutzt «RBAC for Applications» und kann erneut laufen, auch nach einem Wechsel des Postfachs. Exchange übernimmt das Recht nach bis zu zwei Stunden; dann die Testmail senden.",
|
|
58
63
|
showScript: "Skript anzeigen",
|
|
59
64
|
copy: "Kopieren",
|
|
60
65
|
copied: "Skript kopiert",
|
|
@@ -107,6 +112,11 @@ const LABELS = {
|
|
|
107
112
|
autoHint: "The app sets up the send right itself with its connection to the tenant, for this mailbox only (RBAC for Applications). Exchange applies it within up to two hours.",
|
|
108
113
|
autoGrant: "Set send right",
|
|
109
114
|
autoGranted: "Send right set",
|
|
115
|
+
grantOff: {
|
|
116
|
+
read_only: "The connection to the tenant may only read Exchange Online, so the app does not set the send right itself: run the script.",
|
|
117
|
+
no_exchange: "The connection to the tenant has no access to the Exchange administration, so the app does not set the send right itself: run the script.",
|
|
118
|
+
identity: "The app could not read its own identity in the tenant. Check the tenant connection or run the script.",
|
|
119
|
+
},
|
|
110
120
|
rightsCheck: "Check status",
|
|
111
121
|
rightsState: { ok: "Send right in place", missing: "Send right missing", unknown: "Send right can not be checked, the test mail shows it" },
|
|
112
122
|
rightsScriptAlso: "Rather run it yourself? Show script",
|
|
@@ -141,7 +151,7 @@ const LABELS = {
|
|
|
141
151
|
tenantChoose: "Please choose",
|
|
142
152
|
noTenants: "No tenant connected yet. Connect a tenant first, then choose it here.",
|
|
143
153
|
rightsTitle: "Send right in Exchange Online",
|
|
144
|
-
rightsHint: "So the app may send only as this mailbox: run the script once as an Exchange administrator in Azure Cloud Shell (
|
|
154
|
+
rightsHint: "So the app may send only as this mailbox: run the script once as an Exchange administrator in Azure Cloud Shell or in PowerShell 7 on your computer (it installs missing modules itself). It uses RBAC for Applications and can run again, also after changing the mailbox. Exchange applies the right within up to two hours; then send the test mail.",
|
|
145
155
|
showScript: "Show script",
|
|
146
156
|
copy: "Copy",
|
|
147
157
|
copied: "Script copied",
|
|
@@ -272,6 +282,9 @@ function select(id, value, options, onChange, extra) {
|
|
|
272
282
|
// Exchange Online» shows the PowerShell from GET /mail/send-rights). With scalio-platform 0.19.0 (ADR 0090) the backend may
|
|
273
283
|
// list the provider `default` («Vorgabe verwenden») and send `default` {available, source, provider, from_name,
|
|
274
284
|
// from_address, tenant_id, smtp_host}: the page shows where the default comes from and where mails go.
|
|
285
|
+
// With scalio-platform 0.45.0 the status names a `reason` when the app can not set the send right itself: the button
|
|
286
|
+
// «Senderecht setzen» stays visible but greyed out with that reason (grantOffHint {read_only, no_exchange, identity}:
|
|
287
|
+
// the app's own texts, e.g. Citadel «Mit Scalio Schreiben setzt Citadel das Senderecht selbst»).
|
|
275
288
|
function MailTransport(props) {
|
|
276
289
|
const { client, lang } = props;
|
|
277
290
|
const L = mailLabels(lang, props.labels);
|
|
@@ -514,6 +527,10 @@ function MailTransport(props) {
|
|
|
514
527
|
);
|
|
515
528
|
|
|
516
529
|
const auto = !!(rightsInfo && rightsInfo.mode === "auto" && client.grantRights);
|
|
530
|
+
// The button «Senderecht setzen» is there in every app (like Foundry); greyed out with the reason where the app's
|
|
531
|
+
// own connection may not set it (scalio-platform 0.45.0 `reason`). Not for an own app registration (provider graph).
|
|
532
|
+
const offReason = rightsInfo && rightsInfo.mode === "script" && L.grantOff[rightsInfo.reason] ? rightsInfo.reason : "";
|
|
533
|
+
const showGrant = auto || (!!offReason && !!client.grantRights);
|
|
517
534
|
const rights = form.send_rights && (form.provider === "graph" || form.provider === "tenant" || form.provider === "default")
|
|
518
535
|
? h(
|
|
519
536
|
SettingsSection,
|
|
@@ -524,9 +541,18 @@ function MailTransport(props) {
|
|
|
524
541
|
L.rightsState[rightsInfo.state] || rightsInfo.state),
|
|
525
542
|
h("button", { type: "button", className: "scalio-btn is-ghost", onClick: loadRights, "data-testid": "mail-rights-check" }, L.rightsCheck))
|
|
526
543
|
: null,
|
|
527
|
-
|
|
544
|
+
rightsInfo && rightsInfo.detail
|
|
545
|
+
? h("p", { className: "scalio-settings-help is-error", "data-testid": "mail-rights-detail" }, rightsInfo.detail)
|
|
546
|
+
: null,
|
|
547
|
+
showGrant
|
|
528
548
|
? h("div", { className: "scalio-settings-section-footer" },
|
|
529
|
-
|
|
549
|
+
offReason
|
|
550
|
+
? h("p", { className: "scalio-settings-help", "data-testid": "mail-rights-grant-off" },
|
|
551
|
+
(props.grantOffHint && props.grantOffHint[offReason]) || L.grantOff[offReason])
|
|
552
|
+
: null,
|
|
553
|
+
h("button", { type: "button", className: "scalio-btn is-primary", onClick: grant, disabled: granting || !auto,
|
|
554
|
+
title: offReason ? ((props.grantOffHint && props.grantOffHint[offReason]) || L.grantOff[offReason]) : undefined,
|
|
555
|
+
"data-testid": "mail-rights-grant" },
|
|
530
556
|
h(Icons.Check, { className: "scalio-icon" }), L.autoGrant))
|
|
531
557
|
: null,
|
|
532
558
|
script
|