@scalio-cloud/ui 0.50.1 → 0.51.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/nav.css +2 -0
- package/package.json +1 -1
- package/react/fields.js +1 -1
- package/react/labels.js +2 -0
- package/react/license.js +4 -2
- package/react/support.js +10 -5
package/nav.css
CHANGED
|
@@ -603,6 +603,8 @@
|
|
|
603
603
|
.scalio-license-bar > div { height: 100%; background: hsl(var(--primary)); }
|
|
604
604
|
.scalio-license-bar > div.is-unlimited { background: #10b981; }
|
|
605
605
|
.scalio-license-bar > div.is-full { background: hsl(var(--destructive)); }
|
|
606
|
+
.scalio-license-bar > div.is-near { background: #d97706; }
|
|
607
|
+
.dark .scalio-license-bar > div.is-near { background: #f59e0b; }
|
|
606
608
|
.scalio-license-addons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
|
|
607
609
|
@media (min-width: 640px) { .scalio-license-addons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
608
610
|
.scalio-license-addon { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.625rem 0.75rem; border: 1px solid hsl(var(--border)); border-radius: 2px; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalio-cloud/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.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/fields.js
CHANGED
|
@@ -455,7 +455,7 @@ function Input(props) {
|
|
|
455
455
|
className: error ? `${className} border-destructive` : className,
|
|
456
456
|
"aria-invalid": error ? true : rest["aria-invalid"],
|
|
457
457
|
"aria-describedby": error ? `${id}-error` : rest["aria-describedby"],
|
|
458
|
-
"data-testid": testId,
|
|
458
|
+
"data-testid": testId !== undefined ? testId : rest["data-testid"],
|
|
459
459
|
onChange: change,
|
|
460
460
|
onBlur: blur,
|
|
461
461
|
})),
|
package/react/labels.js
CHANGED
|
@@ -157,6 +157,7 @@ const LABELS = {
|
|
|
157
157
|
supportConnStatus: { unpaired: "Nicht verbunden", pending: "Wartet auf Bestätigung", active: "Verbunden", blocked: "Gesperrt" },
|
|
158
158
|
supportConnHelp: "Tickets aus dieser Installation gehen an den Scalio Support. Den einmaligen Code erhalten Sie im Scalio-Portal unter Support -> Verbundene Apps.",
|
|
159
159
|
supportConnHelpConnected: "Tickets aus dieser Installation gehen an den Scalio Support.",
|
|
160
|
+
supportConnManaged: "Im SaaS-Betrieb verbindet Compass diese Instanz selbst mit dem Scalio Support (spätestens nach einer Stunde). Hier gibt es nichts einzurichten.",
|
|
160
161
|
supportLinkOnly: "Diese Installation ist nicht mit dem Scalio Support verbunden. Eröffnen Sie Ihre Anfrage bitte im Scalio-Portal.",
|
|
161
162
|
supportLinkOnlyAdmin: "Ein Admin kann die Verbindung unter Einstellungen -> Support-Verbindung einrichten, dann gehen Anfragen direkt aus der App.",
|
|
162
163
|
supportOpenPortal: "Zum Scalio-Portal",
|
|
@@ -718,6 +719,7 @@ const LABELS = {
|
|
|
718
719
|
supportConnStatus: { unpaired: "Not connected", pending: "Waiting for confirmation", active: "Connected", blocked: "Blocked" },
|
|
719
720
|
supportConnHelp: "Tickets from this installation go to Scalio Support. You get the one-time code in the Scalio portal under Support -> Connected apps.",
|
|
720
721
|
supportConnHelpConnected: "Tickets from this installation go to Scalio Support.",
|
|
722
|
+
supportConnManaged: "In SaaS operation Compass connects this instance to Scalio Support itself (within an hour). There is nothing to set up here.",
|
|
721
723
|
supportLinkOnly: "This installation is not connected to Scalio Support. Please open your request in the Scalio portal.",
|
|
722
724
|
supportLinkOnlyAdmin: "An admin can set up the connection under Settings -> Support connection; then requests go straight from the app.",
|
|
723
725
|
supportOpenPortal: "Open the Scalio portal",
|
package/react/license.js
CHANGED
|
@@ -93,6 +93,8 @@ function UsageBar({ item }) {
|
|
|
93
93
|
const used = item.used === undefined || item.used === null ? null : item.used;
|
|
94
94
|
const full = !unlimited && used !== null && used >= item.max;
|
|
95
95
|
const pct = unlimited ? 100 : Math.min(100, Math.round(((used || 0) / Math.max(1, item.max)) * 100));
|
|
96
|
+
// Amber from 90 percent: a hint to extend before new people are blocked.
|
|
97
|
+
const near = !unlimited && !full && used !== null && pct >= 90;
|
|
96
98
|
return h(
|
|
97
99
|
"div",
|
|
98
100
|
{ "data-testid": `license-limit-${item.key}` },
|
|
@@ -100,9 +102,9 @@ function UsageBar({ item }) {
|
|
|
100
102
|
"div",
|
|
101
103
|
{ className: "scalio-license-bar-head" },
|
|
102
104
|
h("span", { className: "scalio-license-bar-label" }, item.label),
|
|
103
|
-
h("span", { className: cx("scalio-license-bar-value", full && "is-error") }, used === null ? "-" : used, " / ", unlimited ? "∞" : item.max)
|
|
105
|
+
h("span", { className: cx("scalio-license-bar-value", full && "is-error", near && "is-warn") }, used === null ? "-" : used, " / ", unlimited ? "∞" : item.max)
|
|
104
106
|
),
|
|
105
|
-
h("div", { className: "scalio-license-bar" }, h("div", { className: cx(full && "is-full", unlimited && "is-unlimited"), style: { width: `${pct}%` } })),
|
|
107
|
+
h("div", { className: "scalio-license-bar" }, h("div", { className: cx(full && "is-full", near && "is-near", unlimited && "is-unlimited"), style: { width: `${pct}%` } })),
|
|
106
108
|
item.hint ? h("p", { className: "scalio-license-bar-hint", "data-testid": `license-limit-${item.key}-hint` }, item.hint) : null
|
|
107
109
|
);
|
|
108
110
|
}
|
package/react/support.js
CHANGED
|
@@ -508,6 +508,8 @@ function SupportConnection({ client, lang, labels, onChange }) {
|
|
|
508
508
|
if (st === null) return h("div", { className: "scalio-support-meta" }, L.loading);
|
|
509
509
|
if (st === false) return h("div", { className: "scalio-notice is-error", role: "alert" }, error);
|
|
510
510
|
const connected = st.status !== "unpaired";
|
|
511
|
+
// SaaS: Compass pairs the instance itself (hourly support_repair, compass #245); no form, no remove (BL-231).
|
|
512
|
+
const managed = st.mode === "saas";
|
|
511
513
|
const outbox = st.outbox || {};
|
|
512
514
|
return h(
|
|
513
515
|
"div",
|
|
@@ -519,7 +521,8 @@ function SupportConnection({ client, lang, labels, onChange }) {
|
|
|
519
521
|
(L.supportConnStatus && L.supportConnStatus[st.status]) || st.status),
|
|
520
522
|
st.status === "active" && st.detail ? h("span", null, st.detail) : null
|
|
521
523
|
),
|
|
522
|
-
h("p", { className: "scalio-support-meta"
|
|
524
|
+
h("p", { className: "scalio-support-meta", "data-testid": managed ? "support-connection-managed" : undefined },
|
|
525
|
+
managed ? L.supportConnManaged : connected ? L.supportConnHelpConnected : L.supportConnHelp),
|
|
523
526
|
st.status === "pending" ? h("div", { className: "scalio-notice is-warn" }, L.supportConnPending) : null,
|
|
524
527
|
st.status === "blocked" ? h("div", { className: "scalio-notice is-error" }, L.supportConnBlocked) : null,
|
|
525
528
|
connected && st.key_ok === false ? h("div", { className: "scalio-notice is-error" }, L.supportConnKeyLost) : null,
|
|
@@ -547,15 +550,17 @@ function SupportConnection({ client, lang, labels, onChange }) {
|
|
|
547
550
|
h("span", null, L.supportButtonHidden)
|
|
548
551
|
)
|
|
549
552
|
: null,
|
|
550
|
-
connected
|
|
553
|
+
connected || managed
|
|
551
554
|
? h(
|
|
552
555
|
"div",
|
|
553
556
|
{ className: "scalio-support-conn-actions" },
|
|
554
557
|
h("button", { type: "button", className: "scalio-btn", disabled: busy, "data-testid": "support-connection-check",
|
|
555
558
|
onClick: () => run(() => client.check(), L.supportChecked) }, L.supportCheck),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
+
managed
|
|
560
|
+
? null
|
|
561
|
+
: h("button", { type: "button", className: "scalio-btn scalio-btn-danger", disabled: busy, "data-testid": "support-connection-remove",
|
|
562
|
+
onClick: async () => (await askConfirm({ text: L.supportRemoveConfirm, danger: true, lang })) && run(() => client.disconnect(), L.supportRemoved) },
|
|
563
|
+
L.supportRemove)
|
|
559
564
|
)
|
|
560
565
|
: h(
|
|
561
566
|
"form",
|