@scalio-cloud/ui 0.97.0 → 0.98.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalio-cloud/ui",
3
- "version": "0.97.0",
3
+ "version": "0.98.1",
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/agents.js CHANGED
@@ -480,7 +480,9 @@ function AgentsPanel(props) {
480
480
  }, [load, props.refreshMs]);
481
481
 
482
482
  const offered = (data && data.roles) || [];
483
- const selectedRoles = codeRoles || offered.map((r) => r.name);
483
+ // several roles offered: none preselected, the admin picks (no Active Directory by default);
484
+ // a single offered role has no checkbox, so it is the only possible choice
485
+ const selectedRoles = codeRoles || (offered.length === 1 ? [offered[0].name] : []);
484
486
 
485
487
  const run = async (fn, okText) => {
486
488
  setBusy(true);
package/react/mail.js CHANGED
@@ -308,7 +308,7 @@ function select(id, value, options, onChange, extra) {
308
308
  // the app's own texts, e.g. Citadel «Mit Scalio Schreiben setzt Citadel das Senderecht selbst»).
309
309
  // With scalio-platform 0.60.0 settings and the test mail answer carry from_name_applies, from_name_hint and
310
310
  // from_name_hint_de: when applies is false (e.g. Microsoft 365 sends with the mailbox's display name) the sender name
311
- // has no effect; the field is locked and the hint shown. Without these fields (older backends) nothing changes.
311
+ // has no effect; the field is locked and the hint shown, but only for the ways graph, tenant and default (never for SMTP). Without these fields (older backends) nothing changes.
312
312
  function pickNameInfo(src) {
313
313
  return { applies: src.from_name_applies !== false, hint: src.from_name_hint || "", hint_de: src.from_name_hint_de || "" };
314
314
  }
@@ -500,7 +500,9 @@ function MailTransport(props) {
500
500
  const providers = (form.providers || ["off", "smtp", "graph"]).filter((id) => L.providers[id]);
501
501
  // ADR 0090: the default from Compass or the installation (scalio-platform 0.19.0); never a secret in it
502
502
  const dflt = form.default || null;
503
- const nameInfoNow = nameInfo || (typeof form.from_name_applies === "boolean" ? pickNameInfo(form) : null);
503
+ // The lock and the hint follow the chosen way, not the stored answer: with SMTP the name always applies (free at once).
504
+ const nameWayCounts = form.provider === "graph" || form.provider === "tenant" || form.provider === "default";
505
+ const nameInfoNow = !nameWayCounts ? null : nameInfo || (typeof form.from_name_applies === "boolean" ? pickNameInfo(form) : null);
504
506
  const nameLocked = !!(nameInfoNow && !nameInfoNow.applies);
505
507
  const nameHint = nameHintText(nameInfoNow, lang);
506
508
  const defaultUsable = !!(dflt && dflt.available);