@streamoid/settings 0.17.0 → 0.19.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/dist/index.d.mts +43 -2
- package/dist/index.d.ts +43 -2
- package/dist/index.js +561 -370
- package/dist/index.mjs +564 -371
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ __export(index_exports, {
|
|
|
41
41
|
ExportDateModal: () => ExportDateModal,
|
|
42
42
|
INITIAL_USAGE_LOGS_STATE: () => INITIAL_USAGE_LOGS_STATE,
|
|
43
43
|
InviteUpdateModal: () => InviteUpdateModal,
|
|
44
|
+
MOCK_REFERRED_USERS: () => MOCK_REFERRED_USERS,
|
|
44
45
|
MemberCreditLimitModal: () => MemberCreditLimitModal,
|
|
45
46
|
MemberListFrame: () => MemberListFrame,
|
|
46
47
|
MemberListToolbar: () => MemberListToolbar,
|
|
@@ -56,6 +57,7 @@ __export(index_exports, {
|
|
|
56
57
|
ProfileAvatar: () => ProfileAvatar,
|
|
57
58
|
ProfileTab: () => ProfileTab,
|
|
58
59
|
REMOVE_REASON_MAX_LENGTH: () => REMOVE_REASON_MAX_LENGTH,
|
|
60
|
+
ReferralHistoryView: () => ReferralHistoryView,
|
|
59
61
|
ReferralTab: () => ReferralTab,
|
|
60
62
|
RemovePoolMemberModal: () => RemovePoolMemberModal,
|
|
61
63
|
SCOPE_LABELS: () => SCOPE_LABELS,
|
|
@@ -131,6 +133,10 @@ __export(index_exports, {
|
|
|
131
133
|
poolWorkspaceName: () => poolWorkspaceName,
|
|
132
134
|
productsForCountry: () => productsForCountry,
|
|
133
135
|
readSettingsCaller: () => readSettingsCaller,
|
|
136
|
+
referralCodeOf: () => referralCodeOf,
|
|
137
|
+
referralCountLabel: () => referralCountLabel,
|
|
138
|
+
referralLink: () => referralLink,
|
|
139
|
+
referralSignupDate: () => referralSignupDate,
|
|
134
140
|
rememberSettingsCaller: () => rememberSettingsCaller,
|
|
135
141
|
resolveSettingsTabFromPath: () => resolveSettingsTabFromPath,
|
|
136
142
|
roundCredits: () => roundCredits,
|
|
@@ -138,6 +144,7 @@ __export(index_exports, {
|
|
|
138
144
|
sharedPoolBannerText: () => sharedPoolBannerText,
|
|
139
145
|
sharedPoolEndsText: () => sharedPoolEndsText,
|
|
140
146
|
sliceUsageLogsPage: () => sliceUsageLogsPage,
|
|
147
|
+
sortReferredUsers: () => sortReferredUsers,
|
|
141
148
|
sponsoredCreditsText: () => sponsoredCreditsText,
|
|
142
149
|
toCsv: () => toCsv,
|
|
143
150
|
toLocalDateInput: () => toLocalDateInput,
|
|
@@ -496,7 +503,7 @@ var TAB_DESCRIPTIONS = {
|
|
|
496
503
|
organization: "Everyone in the organization and their role",
|
|
497
504
|
organizationWorkspaces: "Every workspace in this organization, and workspaces asking to join it",
|
|
498
505
|
organizationDomains: "Every workspace in this organization, and workspaces asking to join it",
|
|
499
|
-
referral: "
|
|
506
|
+
referral: "Your link for bringing new people to Streamoid",
|
|
500
507
|
billing: "Workspace plan, credits, invoices and usage history",
|
|
501
508
|
apikey: "Create and revoke keys for calling the Streamoid APIs",
|
|
502
509
|
connectedApps: "Apps like ChatGPT and Codex that you've allowed to use CXO for you",
|
|
@@ -538,6 +545,7 @@ function AdministrationOverview({
|
|
|
538
545
|
isWorkspaceAdmin,
|
|
539
546
|
showConnectedApps,
|
|
540
547
|
showIntegrations,
|
|
548
|
+
showReferral = false,
|
|
541
549
|
canInvite,
|
|
542
550
|
onNavigate,
|
|
543
551
|
onInvitePeople
|
|
@@ -545,7 +553,7 @@ function AdministrationOverview({
|
|
|
545
553
|
const groups = [
|
|
546
554
|
{
|
|
547
555
|
title: "Account",
|
|
548
|
-
tabs: ["profile", "workspaceList", ...showConnectedApps ? ["connectedApps"] : []]
|
|
556
|
+
tabs: ["profile", "workspaceList", ...showConnectedApps ? ["connectedApps"] : [], ...showReferral ? ["referral"] : []]
|
|
549
557
|
},
|
|
550
558
|
...hasWorkspace ? [{
|
|
551
559
|
title: "Workspace",
|
|
@@ -9783,7 +9791,11 @@ function Spinner() {
|
|
|
9783
9791
|
}
|
|
9784
9792
|
);
|
|
9785
9793
|
}
|
|
9786
|
-
function LoadError({
|
|
9794
|
+
function LoadError({
|
|
9795
|
+
message,
|
|
9796
|
+
onRetry,
|
|
9797
|
+
retryLabel = "Try again"
|
|
9798
|
+
}) {
|
|
9787
9799
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
9788
9800
|
"div",
|
|
9789
9801
|
{
|
|
@@ -9798,7 +9810,7 @@ function LoadError({ message, onRetry }) {
|
|
|
9798
9810
|
},
|
|
9799
9811
|
children: [
|
|
9800
9812
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { style: { margin: 0, fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: message }),
|
|
9801
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ui13.ScButton, { text:
|
|
9813
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ui13.ScButton, { text: retryLabel, variant: "outline", size: "sm", onClick: onRetry })
|
|
9802
9814
|
]
|
|
9803
9815
|
}
|
|
9804
9816
|
);
|
|
@@ -14477,13 +14489,171 @@ function ConnectedAppsContent() {
|
|
|
14477
14489
|
);
|
|
14478
14490
|
}
|
|
14479
14491
|
|
|
14492
|
+
// src/referral.ts
|
|
14493
|
+
function referralCodeOf(user) {
|
|
14494
|
+
if (!user || typeof user !== "object") return "";
|
|
14495
|
+
const u = user;
|
|
14496
|
+
for (const key of ["referralCode", "referral_code", "referalCode", "referal_code"]) {
|
|
14497
|
+
const value = u[key];
|
|
14498
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
14499
|
+
}
|
|
14500
|
+
return "";
|
|
14501
|
+
}
|
|
14502
|
+
function referralLink(code, origin) {
|
|
14503
|
+
return code && origin ? `${origin}?referral_code=${encodeURIComponent(code)}` : "";
|
|
14504
|
+
}
|
|
14505
|
+
var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
14506
|
+
function referralSignupDate(iso) {
|
|
14507
|
+
const date = iso ? new Date(iso) : null;
|
|
14508
|
+
if (!date || Number.isNaN(date.valueOf())) return "\u2013";
|
|
14509
|
+
return `${date.getDate()} ${MONTHS[date.getMonth()]} ${date.getFullYear()}`;
|
|
14510
|
+
}
|
|
14511
|
+
function sortReferredUsers(users) {
|
|
14512
|
+
const time = (u) => {
|
|
14513
|
+
const t = new Date(u.createdAt).valueOf();
|
|
14514
|
+
return Number.isNaN(t) ? -Infinity : t;
|
|
14515
|
+
};
|
|
14516
|
+
return [...users].sort((a, b) => time(b) - time(a));
|
|
14517
|
+
}
|
|
14518
|
+
function referralCountLabel(count) {
|
|
14519
|
+
return `${count} ${count === 1 ? "person" : "people"} signed up with your link`;
|
|
14520
|
+
}
|
|
14521
|
+
var MOCK_REFERRED_USERS = [
|
|
14522
|
+
{ id: "r1", email: "chris@kepler.com", createdAt: "2025-11-09T10:30:00.000Z" },
|
|
14523
|
+
{ id: "r2", email: "maya@northwind.studio", createdAt: "2026-11-24T06:15:00.000Z" },
|
|
14524
|
+
{ id: "r3", email: "arjun@lumen.co", createdAt: "2026-03-02T12:00:00.000Z" }
|
|
14525
|
+
];
|
|
14526
|
+
|
|
14527
|
+
// src/referral-history.tsx
|
|
14528
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
14529
|
+
var TITLE_ID = "settings-referral-history-title";
|
|
14530
|
+
var SKELETON_ROWS = 3;
|
|
14531
|
+
var REFERRAL_HISTORY_EMPTY = "No one has signed up with your link yet. Share it to get started.";
|
|
14532
|
+
var LOAD_FAILED = "Couldn't load your referral history.";
|
|
14533
|
+
function ReferralHistory({
|
|
14534
|
+
load
|
|
14535
|
+
}) {
|
|
14536
|
+
const { value, error, retry } = useLoad(
|
|
14537
|
+
"referred-users",
|
|
14538
|
+
(signal) => load(signal),
|
|
14539
|
+
LOAD_FAILED
|
|
14540
|
+
);
|
|
14541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ReferralHistoryView, { users: value, error, onRetry: retry });
|
|
14542
|
+
}
|
|
14543
|
+
function ReferralHistoryView({ users, error, onRetry }) {
|
|
14544
|
+
let body;
|
|
14545
|
+
if (error) {
|
|
14546
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(LoadError, { message: error, onRetry, retryLabel: "Retry" });
|
|
14547
|
+
} else if (!users) {
|
|
14548
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HistorySkeleton, {});
|
|
14549
|
+
} else if (users.length === 0) {
|
|
14550
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Card2, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { padding: T15.sp6xl }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Muted, { children: REFERRAL_HISTORY_EMPTY }) }) });
|
|
14551
|
+
} else {
|
|
14552
|
+
body = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HistoryTable, { users: sortReferredUsers(users) });
|
|
14553
|
+
}
|
|
14554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("section", { "aria-labelledby": TITLE_ID, className: "flex flex-col w-full", style: { gap: T15.spXl }, children: [
|
|
14555
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col", style: { gap: T15.spXs }, children: [
|
|
14556
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
14557
|
+
"h2",
|
|
14558
|
+
{
|
|
14559
|
+
id: TITLE_ID,
|
|
14560
|
+
style: {
|
|
14561
|
+
margin: 0,
|
|
14562
|
+
fontFamily: T15.font,
|
|
14563
|
+
fontSize: T15.fsSm,
|
|
14564
|
+
fontWeight: 400,
|
|
14565
|
+
lineHeight: T15.lhSm,
|
|
14566
|
+
color: "var(--alias-text---icons-tertiary)"
|
|
14567
|
+
},
|
|
14568
|
+
children: "Referral History"
|
|
14569
|
+
}
|
|
14570
|
+
),
|
|
14571
|
+
!error && users && users.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Muted, { children: referralCountLabel(users.length) })
|
|
14572
|
+
] }),
|
|
14573
|
+
body
|
|
14574
|
+
] });
|
|
14575
|
+
}
|
|
14576
|
+
function Card2({ children }) {
|
|
14577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
14578
|
+
"div",
|
|
14579
|
+
{
|
|
14580
|
+
className: "w-full overflow-clip",
|
|
14581
|
+
style: {
|
|
14582
|
+
backgroundColor: T15.surfaceBase,
|
|
14583
|
+
border: `1px solid ${T15.borderSubtle}`,
|
|
14584
|
+
borderRadius: T15.r3xl
|
|
14585
|
+
},
|
|
14586
|
+
children
|
|
14587
|
+
}
|
|
14588
|
+
);
|
|
14589
|
+
}
|
|
14590
|
+
var CELL = { padding: `${T15.spXl} ${T15.sp6xl}`, textAlign: "left" };
|
|
14591
|
+
var HEAD_CELL = {
|
|
14592
|
+
...CELL,
|
|
14593
|
+
fontFamily: T15.font,
|
|
14594
|
+
fontSize: T15.fsXs,
|
|
14595
|
+
lineHeight: T15.lhXs,
|
|
14596
|
+
fontWeight: 500,
|
|
14597
|
+
color: T15.muted
|
|
14598
|
+
};
|
|
14599
|
+
var BODY_CELL = {
|
|
14600
|
+
...CELL,
|
|
14601
|
+
fontFamily: T15.font,
|
|
14602
|
+
fontSize: T15.fsSm,
|
|
14603
|
+
lineHeight: T15.lhSm,
|
|
14604
|
+
borderTop: `1px solid ${T15.borderDivider}`
|
|
14605
|
+
};
|
|
14606
|
+
function HistoryTable({ users }) {
|
|
14607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Card2, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("table", { className: "w-full", style: { borderCollapse: "collapse" }, children: [
|
|
14608
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("tr", { children: [
|
|
14609
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { scope: "col", style: HEAD_CELL, children: "Email" }),
|
|
14610
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { scope: "col", style: { ...HEAD_CELL, textAlign: "right" }, children: "Signed up" })
|
|
14611
|
+
] }) }),
|
|
14612
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tbody", { children: users.map((user) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("tr", { children: [
|
|
14613
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { style: { ...BODY_CELL, color: T15.primary, wordBreak: "break-all" }, children: user.email }),
|
|
14614
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { style: { ...BODY_CELL, color: T15.muted, textAlign: "right", whiteSpace: "nowrap" }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("time", { dateTime: user.createdAt, children: referralSignupDate(user.createdAt) }) })
|
|
14615
|
+
] }, user.id)) })
|
|
14616
|
+
] }) });
|
|
14617
|
+
}
|
|
14618
|
+
function Bar({ width }) {
|
|
14619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
14620
|
+
"div",
|
|
14621
|
+
{
|
|
14622
|
+
className: "animate-pulse",
|
|
14623
|
+
style: {
|
|
14624
|
+
width,
|
|
14625
|
+
height: 12,
|
|
14626
|
+
borderRadius: "var(--radius-full)",
|
|
14627
|
+
backgroundColor: "var(--alias-fill-neutral-neutral)"
|
|
14628
|
+
}
|
|
14629
|
+
}
|
|
14630
|
+
);
|
|
14631
|
+
}
|
|
14632
|
+
function HistorySkeleton() {
|
|
14633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { role: "status", "aria-label": "Loading referral history", className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Card2, { children: Array.from({ length: SKELETON_ROWS }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
14634
|
+
"div",
|
|
14635
|
+
{
|
|
14636
|
+
className: "flex items-center justify-between",
|
|
14637
|
+
style: {
|
|
14638
|
+
padding: `${T15.spXl} ${T15.sp6xl}`,
|
|
14639
|
+
borderTop: i === 0 ? void 0 : `1px solid ${T15.borderDivider}`
|
|
14640
|
+
},
|
|
14641
|
+
children: [
|
|
14642
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Bar, { width: 180 }),
|
|
14643
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Bar, { width: 72 })
|
|
14644
|
+
]
|
|
14645
|
+
},
|
|
14646
|
+
i
|
|
14647
|
+
)) }) });
|
|
14648
|
+
}
|
|
14649
|
+
|
|
14480
14650
|
// src/organization-integrations-content.tsx
|
|
14481
14651
|
var import_react26 = require("react");
|
|
14482
14652
|
var import_ui20 = require("@streamoid/ui");
|
|
14483
|
-
var
|
|
14653
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
14484
14654
|
var COLUMN = { app: "6.5rem", workspace: "9rem", date: "6.5rem", action: "4.75rem" };
|
|
14485
14655
|
function HeaderRow() {
|
|
14486
|
-
const cell = (label, width) => /* @__PURE__ */ (0,
|
|
14656
|
+
const cell = (label, width) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14487
14657
|
"span",
|
|
14488
14658
|
{
|
|
14489
14659
|
className: width ? "shrink-0" : "flex-1 min-w-0",
|
|
@@ -14501,7 +14671,7 @@ function HeaderRow() {
|
|
|
14501
14671
|
children: label
|
|
14502
14672
|
}
|
|
14503
14673
|
);
|
|
14504
|
-
return /* @__PURE__ */ (0,
|
|
14674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
14505
14675
|
"div",
|
|
14506
14676
|
{
|
|
14507
14677
|
className: "flex items-center",
|
|
@@ -14512,7 +14682,7 @@ function HeaderRow() {
|
|
|
14512
14682
|
cell("Workspace", COLUMN.workspace),
|
|
14513
14683
|
cell("Connected", COLUMN.date),
|
|
14514
14684
|
cell("Last used", COLUMN.date),
|
|
14515
|
-
/* @__PURE__ */ (0,
|
|
14685
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "shrink-0", style: { width: COLUMN.action } })
|
|
14516
14686
|
]
|
|
14517
14687
|
}
|
|
14518
14688
|
);
|
|
@@ -14521,7 +14691,7 @@ function ConnectionRow({ app, onRevoke }) {
|
|
|
14521
14691
|
const name = app.user?.name?.trim();
|
|
14522
14692
|
const email = app.user?.email ?? "";
|
|
14523
14693
|
const active = app.status === "active";
|
|
14524
|
-
const text2 = (value, width, color = T15.primary) => /* @__PURE__ */ (0,
|
|
14694
|
+
const text2 = (value, width, color = T15.primary) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14525
14695
|
"span",
|
|
14526
14696
|
{
|
|
14527
14697
|
className: "truncate shrink-0",
|
|
@@ -14530,7 +14700,7 @@ function ConnectionRow({ app, onRevoke }) {
|
|
|
14530
14700
|
children: value
|
|
14531
14701
|
}
|
|
14532
14702
|
);
|
|
14533
|
-
return /* @__PURE__ */ (0,
|
|
14703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
14534
14704
|
"div",
|
|
14535
14705
|
{
|
|
14536
14706
|
className: "flex items-center",
|
|
@@ -14541,10 +14711,10 @@ function ConnectionRow({ app, onRevoke }) {
|
|
|
14541
14711
|
opacity: active ? 1 : 0.6
|
|
14542
14712
|
},
|
|
14543
14713
|
children: [
|
|
14544
|
-
/* @__PURE__ */ (0,
|
|
14545
|
-
/* @__PURE__ */ (0,
|
|
14546
|
-
/* @__PURE__ */ (0,
|
|
14547
|
-
/* @__PURE__ */ (0,
|
|
14714
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center flex-1 min-w-0", style: { minWidth: 200, gap: T15.spMd }, children: [
|
|
14715
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ProfileAvatar, { name: name || email || "Member", size: 32 }),
|
|
14716
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
14717
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14548
14718
|
"span",
|
|
14549
14719
|
{
|
|
14550
14720
|
className: "truncate",
|
|
@@ -14552,17 +14722,17 @@ function ConnectionRow({ app, onRevoke }) {
|
|
|
14552
14722
|
children: name || email || "A member"
|
|
14553
14723
|
}
|
|
14554
14724
|
),
|
|
14555
|
-
name && email && /* @__PURE__ */ (0,
|
|
14725
|
+
name && email && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: email })
|
|
14556
14726
|
] })
|
|
14557
14727
|
] }),
|
|
14558
|
-
/* @__PURE__ */ (0,
|
|
14559
|
-
/* @__PURE__ */ (0,
|
|
14560
|
-
/* @__PURE__ */ (0,
|
|
14728
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center shrink-0", style: { width: COLUMN.app, gap: T15.spMd }, children: [
|
|
14729
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AppMark, { name: app.clientName, size: 24 }),
|
|
14730
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: app.clientName })
|
|
14561
14731
|
] }),
|
|
14562
14732
|
text2(workspaceLabel(app), COLUMN.workspace),
|
|
14563
14733
|
text2(formatDate2(app.createdAt), COLUMN.date),
|
|
14564
14734
|
text2(active ? lastUsedLabel(app.lastUsedAt) : "Revoked", COLUMN.date, T15.muted),
|
|
14565
|
-
/* @__PURE__ */ (0,
|
|
14735
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex justify-end shrink-0", style: { width: COLUMN.action }, children: active && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14566
14736
|
import_ui20.ScButton,
|
|
14567
14737
|
{
|
|
14568
14738
|
text: "Revoke",
|
|
@@ -14582,7 +14752,7 @@ function AccessCard({
|
|
|
14582
14752
|
activeCount,
|
|
14583
14753
|
onToggle
|
|
14584
14754
|
}) {
|
|
14585
|
-
return /* @__PURE__ */ (0,
|
|
14755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
14586
14756
|
"section",
|
|
14587
14757
|
{
|
|
14588
14758
|
"aria-label": "ChatGPT and Codex access",
|
|
@@ -14595,19 +14765,19 @@ function AccessCard({
|
|
|
14595
14765
|
borderRadius: T15.r3xl
|
|
14596
14766
|
},
|
|
14597
14767
|
children: [
|
|
14598
|
-
/* @__PURE__ */ (0,
|
|
14599
|
-
/* @__PURE__ */ (0,
|
|
14600
|
-
/* @__PURE__ */ (0,
|
|
14601
|
-
/* @__PURE__ */ (0,
|
|
14602
|
-
enabled === false && activeCount > 0 && /* @__PURE__ */ (0,
|
|
14768
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(AppMark, { name: "ChatGPT and Codex" }),
|
|
14769
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
|
|
14770
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: "ChatGPT & Codex" }),
|
|
14771
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Muted, { children: "Let members use CXO from ChatGPT and Codex. Each member still chooses which workspace an app can reach, and the app gets only that member's permissions there." }),
|
|
14772
|
+
enabled === false && activeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: [
|
|
14603
14773
|
"Off: the ",
|
|
14604
14774
|
countLabel(activeCount, "connection"),
|
|
14605
14775
|
" below can't start new work until you turn this back on."
|
|
14606
14776
|
] })
|
|
14607
14777
|
] }),
|
|
14608
|
-
/* @__PURE__ */ (0,
|
|
14609
|
-
/* @__PURE__ */ (0,
|
|
14610
|
-
/* @__PURE__ */ (0,
|
|
14778
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
|
|
14779
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: enabled === null ? "" : enabled ? "On" : "Off" }),
|
|
14780
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14611
14781
|
import_ui20.ScToggleSwitch,
|
|
14612
14782
|
{
|
|
14613
14783
|
checked: !!enabled,
|
|
@@ -14653,7 +14823,7 @@ function OrganizationIntegrationsContent() {
|
|
|
14653
14823
|
const [confirmOff, setConfirmOff] = (0, import_react26.useState)(false);
|
|
14654
14824
|
const [revoking, setRevoking] = (0, import_react26.useState)(null);
|
|
14655
14825
|
if (!canLoad) {
|
|
14656
|
-
return /* @__PURE__ */ (0,
|
|
14826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Muted, { children: !supported ? "Integrations aren't available here yet." : "Integrations are managed by organization admins." }) });
|
|
14657
14827
|
}
|
|
14658
14828
|
const value = data.value;
|
|
14659
14829
|
const rows = value ? sortConnections(value.rows) : [];
|
|
@@ -14691,8 +14861,8 @@ function OrganizationIntegrationsContent() {
|
|
|
14691
14861
|
toast.error(errorMessage(cause, { method: "DELETE" }));
|
|
14692
14862
|
}
|
|
14693
14863
|
}
|
|
14694
|
-
return /* @__PURE__ */ (0,
|
|
14695
|
-
/* @__PURE__ */ (0,
|
|
14864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", style: { gap: T15.sp3xl }, children: [
|
|
14865
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14696
14866
|
ScopeHeader,
|
|
14697
14867
|
{
|
|
14698
14868
|
kind: "organization",
|
|
@@ -14702,10 +14872,10 @@ function OrganizationIntegrationsContent() {
|
|
|
14702
14872
|
facts: [value && countLabel(activeRows.length, "active connection")]
|
|
14703
14873
|
}
|
|
14704
14874
|
),
|
|
14705
|
-
data.error && /* @__PURE__ */ (0,
|
|
14706
|
-
!value && !data.error && /* @__PURE__ */ (0,
|
|
14707
|
-
value && /* @__PURE__ */ (0,
|
|
14708
|
-
/* @__PURE__ */ (0,
|
|
14875
|
+
data.error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(LoadError, { message: data.error, onRetry: data.retry }),
|
|
14876
|
+
!value && !data.error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Spinner, {}),
|
|
14877
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
14878
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14709
14879
|
AccessCard,
|
|
14710
14880
|
{
|
|
14711
14881
|
enabled: value.enabled,
|
|
@@ -14714,7 +14884,7 @@ function OrganizationIntegrationsContent() {
|
|
|
14714
14884
|
onToggle: (next) => next ? void setAccess(true) : setConfirmOff(true)
|
|
14715
14885
|
}
|
|
14716
14886
|
),
|
|
14717
|
-
/* @__PURE__ */ (0,
|
|
14887
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14718
14888
|
MemberListToolbar,
|
|
14719
14889
|
{
|
|
14720
14890
|
activeTab: "active",
|
|
@@ -14724,7 +14894,7 @@ function OrganizationIntegrationsContent() {
|
|
|
14724
14894
|
activeCount: visible.length,
|
|
14725
14895
|
searchQuery: search,
|
|
14726
14896
|
onSearchChange: setSearch,
|
|
14727
|
-
action: revokedCount > 0 ? /* @__PURE__ */ (0,
|
|
14897
|
+
action: revokedCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14728
14898
|
import_ui20.ScButton,
|
|
14729
14899
|
{
|
|
14730
14900
|
text: showRevoked ? "Hide revoked" : `Show revoked (${revokedCount})`,
|
|
@@ -14735,30 +14905,30 @@ function OrganizationIntegrationsContent() {
|
|
|
14735
14905
|
) : void 0
|
|
14736
14906
|
}
|
|
14737
14907
|
),
|
|
14738
|
-
/* @__PURE__ */ (0,
|
|
14908
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14739
14909
|
MemberListFrame,
|
|
14740
14910
|
{
|
|
14741
|
-
header: /* @__PURE__ */ (0,
|
|
14911
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HeaderRow, {}),
|
|
14742
14912
|
isEmpty: visible.length === 0,
|
|
14743
14913
|
emptyText: q ? "No connections match your search" : value.enabled ? "No one has connected ChatGPT or Codex yet" : "Turn on ChatGPT & Codex to let members connect",
|
|
14744
14914
|
grow: "fill",
|
|
14745
|
-
children: visible.map((app) => /* @__PURE__ */ (0,
|
|
14915
|
+
children: visible.map((app) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ConnectionRow, { app, onRevoke: () => setRevoking(app) }, app.id))
|
|
14746
14916
|
}
|
|
14747
14917
|
)
|
|
14748
14918
|
] }),
|
|
14749
|
-
confirmOff && /* @__PURE__ */ (0,
|
|
14919
|
+
confirmOff && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14750
14920
|
ConfirmActionModal,
|
|
14751
14921
|
{
|
|
14752
14922
|
title: "Turn off ChatGPT & Codex?",
|
|
14753
|
-
body: /* @__PURE__ */ (0,
|
|
14754
|
-
/* @__PURE__ */ (0,
|
|
14923
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
14924
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { children: [
|
|
14755
14925
|
"Members of ",
|
|
14756
14926
|
current?.name || "this organization",
|
|
14757
14927
|
" won't be able to connect ChatGPT or Codex",
|
|
14758
14928
|
activeRows.length > 0 ? `, and the ${countLabel(activeRows.length, "existing connection")} will stop working` : "",
|
|
14759
14929
|
"."
|
|
14760
14930
|
] }),
|
|
14761
|
-
/* @__PURE__ */ (0,
|
|
14931
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
|
|
14762
14932
|
REVOKE_TIMING,
|
|
14763
14933
|
" Connections come back when you turn this on again."
|
|
14764
14934
|
] })
|
|
@@ -14769,20 +14939,20 @@ function OrganizationIntegrationsContent() {
|
|
|
14769
14939
|
onConfirm: () => setAccess(false)
|
|
14770
14940
|
}
|
|
14771
14941
|
),
|
|
14772
|
-
revoking && /* @__PURE__ */ (0,
|
|
14942
|
+
revoking && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
14773
14943
|
ConfirmActionModal,
|
|
14774
14944
|
{
|
|
14775
14945
|
title: `Revoke ${revoking.clientName}?`,
|
|
14776
|
-
body: /* @__PURE__ */ (0,
|
|
14777
|
-
/* @__PURE__ */ (0,
|
|
14946
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
14947
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { children: [
|
|
14778
14948
|
revoking.user?.name || revoking.user?.email || "This member",
|
|
14779
14949
|
"'s ",
|
|
14780
14950
|
revoking.clientName,
|
|
14781
14951
|
" will no longer be able to use CXO in ",
|
|
14782
|
-
/* @__PURE__ */ (0,
|
|
14952
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: { fontWeight: 600 }, children: workspaceLabel(revoking) }),
|
|
14783
14953
|
"."
|
|
14784
14954
|
] }),
|
|
14785
|
-
/* @__PURE__ */ (0,
|
|
14955
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
|
|
14786
14956
|
REVOKE_TIMING,
|
|
14787
14957
|
" They can connect again unless you turn access off."
|
|
14788
14958
|
] })
|
|
@@ -14797,7 +14967,7 @@ function OrganizationIntegrationsContent() {
|
|
|
14797
14967
|
}
|
|
14798
14968
|
|
|
14799
14969
|
// src/settings-content.tsx
|
|
14800
|
-
var
|
|
14970
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
14801
14971
|
function deriveInitials(name) {
|
|
14802
14972
|
return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
|
|
14803
14973
|
}
|
|
@@ -14833,7 +15003,7 @@ function SettingsNavItem({
|
|
|
14833
15003
|
onTabChange
|
|
14834
15004
|
}) {
|
|
14835
15005
|
const isActive = activeTab === tab;
|
|
14836
|
-
return /* @__PURE__ */ (0,
|
|
15006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
14837
15007
|
import_ui21.ScSidebarMenu,
|
|
14838
15008
|
{
|
|
14839
15009
|
icon: icon(isActive ? PRIMARY_COLOR3 : MUTED_COLOR2),
|
|
@@ -14862,9 +15032,10 @@ function SettingsNav({
|
|
|
14862
15032
|
hasOrganization,
|
|
14863
15033
|
isWorkspaceAdmin,
|
|
14864
15034
|
showConnectedApps = false,
|
|
14865
|
-
showIntegrations = false
|
|
15035
|
+
showIntegrations = false,
|
|
15036
|
+
showReferral = false
|
|
14866
15037
|
}) {
|
|
14867
|
-
const item = (tab, icon) => /* @__PURE__ */ (0,
|
|
15038
|
+
const item = (tab, icon) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
14868
15039
|
SettingsNavItem,
|
|
14869
15040
|
{
|
|
14870
15041
|
tab,
|
|
@@ -14874,7 +15045,7 @@ function SettingsNav({
|
|
|
14874
15045
|
onTabChange
|
|
14875
15046
|
}
|
|
14876
15047
|
);
|
|
14877
|
-
return /* @__PURE__ */ (0,
|
|
15048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
14878
15049
|
"div",
|
|
14879
15050
|
{
|
|
14880
15051
|
className: "flex flex-col items-start shrink-0 relative overflow-y-auto",
|
|
@@ -14897,42 +15068,43 @@ function SettingsNav({
|
|
|
14897
15068
|
gap: "var(--spacing-5xl)"
|
|
14898
15069
|
},
|
|
14899
15070
|
children: [
|
|
14900
|
-
/* @__PURE__ */ (0,
|
|
14901
|
-
/* @__PURE__ */ (0,
|
|
14902
|
-
item("profile", (color) => /* @__PURE__ */ (0,
|
|
14903
|
-
item("workspaceList", (color) => /* @__PURE__ */ (0,
|
|
14904
|
-
showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ (0,
|
|
15071
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15072
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
|
|
15073
|
+
item("profile", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconUser, { className: "w-5 h-5", color })),
|
|
15074
|
+
item("workspaceList", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconSwitch, { className: "w-5 h-5", color })),
|
|
15075
|
+
showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SiconPlug_default, { className: "w-5 h-5", color })),
|
|
15076
|
+
showReferral && item("referral", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconReferral, { className: "w-5 h-5", color }))
|
|
14905
15077
|
] }),
|
|
14906
|
-
/* @__PURE__ */ (0,
|
|
14907
|
-
/* @__PURE__ */ (0,
|
|
14908
|
-
/* @__PURE__ */ (0,
|
|
14909
|
-
item("workspace", (color) => /* @__PURE__ */ (0,
|
|
14910
|
-
item("workspaceMembers", (color) => /* @__PURE__ */ (0,
|
|
14911
|
-
isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
14912
|
-
item("billing", (color) => /* @__PURE__ */ (0,
|
|
14913
|
-
item("apikey", (color) => /* @__PURE__ */ (0,
|
|
15078
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ui21.ScHDivider, {}),
|
|
15079
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15080
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { title: workspaceName ?? void 0, style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Workspace" }),
|
|
15081
|
+
item("workspace", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconSettings, { className: "w-5 h-5", color })),
|
|
15082
|
+
item("workspaceMembers", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconTeam, { className: "w-5 h-5", color })),
|
|
15083
|
+
isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
15084
|
+
item("billing", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconBilling, { className: "w-5 h-5", color })),
|
|
15085
|
+
item("apikey", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SiconKey_default, { className: "w-5 h-5", color }))
|
|
14914
15086
|
] }),
|
|
14915
|
-
!isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
15087
|
+
!isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { style: { margin: "4px 12px", fontSize: 12, lineHeight: "18px", color: MUTED_COLOR2 }, children: "Contact your workspace admin for credit top-ups and billing history." })
|
|
14916
15088
|
] }),
|
|
14917
|
-
/* @__PURE__ */ (0,
|
|
14918
|
-
/* @__PURE__ */ (0,
|
|
14919
|
-
/* @__PURE__ */ (0,
|
|
14920
|
-
item("organizationList", (color) => /* @__PURE__ */ (0,
|
|
14921
|
-
item("organization", (color) => /* @__PURE__ */ (0,
|
|
14922
|
-
item("organizationWorkspaces", (color) => /* @__PURE__ */ (0,
|
|
14923
|
-
showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ (0,
|
|
14924
|
-
] }) : /* @__PURE__ */ (0,
|
|
14925
|
-
/* @__PURE__ */ (0,
|
|
15089
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ui21.ScHDivider, {}),
|
|
15090
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
15091
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
|
|
15092
|
+
item("organizationList", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconSwitch, { className: "w-5 h-5", color })),
|
|
15093
|
+
item("organization", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconTeam, { className: "w-5 h-5", color })),
|
|
15094
|
+
item("organizationWorkspaces", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconWorkspace, { className: "w-5 h-5", color })),
|
|
15095
|
+
showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SiconPlug_default, { className: "w-5 h-5", color }))
|
|
15096
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
15097
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
14926
15098
|
SettingsNavItem,
|
|
14927
15099
|
{
|
|
14928
15100
|
tab: "organization",
|
|
14929
15101
|
label: "Organization",
|
|
14930
|
-
icon: (color) => /* @__PURE__ */ (0,
|
|
15102
|
+
icon: (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconGlobe, { className: "w-5 h-5", color }),
|
|
14931
15103
|
activeTab,
|
|
14932
15104
|
onTabChange
|
|
14933
15105
|
}
|
|
14934
15106
|
),
|
|
14935
|
-
item("organizationList", (color) => /* @__PURE__ */ (0,
|
|
15107
|
+
item("organizationList", (color) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconSwitch, { className: "w-5 h-5", color }))
|
|
14936
15108
|
] }) })
|
|
14937
15109
|
]
|
|
14938
15110
|
}
|
|
@@ -14941,7 +15113,7 @@ function SettingsNav({
|
|
|
14941
15113
|
var SPECIALIZATION_ICON_SIZE = 24;
|
|
14942
15114
|
function SpecializationIcon({ iconUrl }) {
|
|
14943
15115
|
if (iconUrl) {
|
|
14944
|
-
return /* @__PURE__ */ (0,
|
|
15116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
14945
15117
|
"img",
|
|
14946
15118
|
{
|
|
14947
15119
|
src: iconUrl,
|
|
@@ -14954,7 +15126,7 @@ function SpecializationIcon({ iconUrl }) {
|
|
|
14954
15126
|
}
|
|
14955
15127
|
);
|
|
14956
15128
|
}
|
|
14957
|
-
return /* @__PURE__ */ (0,
|
|
15129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
14958
15130
|
import_icons18.SiconBolt,
|
|
14959
15131
|
{
|
|
14960
15132
|
style: {
|
|
@@ -15027,15 +15199,15 @@ function SpecializationDropdown({
|
|
|
15027
15199
|
};
|
|
15028
15200
|
}, [open]);
|
|
15029
15201
|
const selected = options.find((o) => o.id === value);
|
|
15030
|
-
return /* @__PURE__ */ (0,
|
|
15202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15031
15203
|
"div",
|
|
15032
15204
|
{
|
|
15033
15205
|
ref: containerRef,
|
|
15034
15206
|
className: "w-full",
|
|
15035
15207
|
style: { position: "relative" },
|
|
15036
15208
|
children: [
|
|
15037
|
-
/* @__PURE__ */ (0,
|
|
15038
|
-
/* @__PURE__ */ (0,
|
|
15209
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15210
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15039
15211
|
"div",
|
|
15040
15212
|
{
|
|
15041
15213
|
className: "spec-dropdown-trigger",
|
|
@@ -15043,7 +15215,7 @@ function SpecializationDropdown({
|
|
|
15043
15215
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15044
15216
|
"aria-haspopup": "listbox",
|
|
15045
15217
|
"aria-expanded": open,
|
|
15046
|
-
children: /* @__PURE__ */ (0,
|
|
15218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15047
15219
|
import_ui22.ScTextField,
|
|
15048
15220
|
{
|
|
15049
15221
|
label: "Specialization",
|
|
@@ -15051,8 +15223,8 @@ function SpecializationDropdown({
|
|
|
15051
15223
|
value: selected?.label ?? "",
|
|
15052
15224
|
placeholderFilled: "Select specialization",
|
|
15053
15225
|
tfGroup: "icon-left-right",
|
|
15054
|
-
tfLeftIcon: /* @__PURE__ */ (0,
|
|
15055
|
-
tfRightIcon: /* @__PURE__ */ (0,
|
|
15226
|
+
tfLeftIcon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SpecializationIcon, { iconUrl: selected?.iconUrl }),
|
|
15227
|
+
tfRightIcon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15056
15228
|
"span",
|
|
15057
15229
|
{
|
|
15058
15230
|
style: {
|
|
@@ -15062,7 +15234,7 @@ function SpecializationDropdown({
|
|
|
15062
15234
|
transform: open ? "rotate(180deg)" : "none",
|
|
15063
15235
|
transition: "transform 120ms ease-out"
|
|
15064
15236
|
},
|
|
15065
|
-
children: /* @__PURE__ */ (0,
|
|
15237
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconDown, {})
|
|
15066
15238
|
}
|
|
15067
15239
|
),
|
|
15068
15240
|
className: "sc-text-field-full-width",
|
|
@@ -15073,7 +15245,7 @@ function SpecializationDropdown({
|
|
|
15073
15245
|
)
|
|
15074
15246
|
}
|
|
15075
15247
|
),
|
|
15076
|
-
open && /* @__PURE__ */ (0,
|
|
15248
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15077
15249
|
"div",
|
|
15078
15250
|
{
|
|
15079
15251
|
role: "listbox",
|
|
@@ -15095,11 +15267,11 @@ function SpecializationDropdown({
|
|
|
15095
15267
|
},
|
|
15096
15268
|
children: options.map((opt) => {
|
|
15097
15269
|
const isActive = opt.id === value;
|
|
15098
|
-
return /* @__PURE__ */ (0,
|
|
15270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15099
15271
|
import_ui21.ScMenuOptions,
|
|
15100
15272
|
{
|
|
15101
15273
|
text: opt.label,
|
|
15102
|
-
icon: /* @__PURE__ */ (0,
|
|
15274
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SpecializationIcon, { iconUrl: opt.iconUrl }),
|
|
15103
15275
|
hover: isActive ? "true" : "false",
|
|
15104
15276
|
variant: "default",
|
|
15105
15277
|
role: "option",
|
|
@@ -15143,15 +15315,15 @@ function LanguageDropdown({
|
|
|
15143
15315
|
document.removeEventListener("keydown", handleKeyDown);
|
|
15144
15316
|
};
|
|
15145
15317
|
}, [open]);
|
|
15146
|
-
return /* @__PURE__ */ (0,
|
|
15318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15147
15319
|
"div",
|
|
15148
15320
|
{
|
|
15149
15321
|
ref: containerRef,
|
|
15150
15322
|
className: "w-full",
|
|
15151
15323
|
style: { position: "relative" },
|
|
15152
15324
|
children: [
|
|
15153
|
-
/* @__PURE__ */ (0,
|
|
15154
|
-
/* @__PURE__ */ (0,
|
|
15325
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15326
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15155
15327
|
"div",
|
|
15156
15328
|
{
|
|
15157
15329
|
className: "spec-dropdown-trigger",
|
|
@@ -15159,7 +15331,7 @@ function LanguageDropdown({
|
|
|
15159
15331
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15160
15332
|
"aria-haspopup": "listbox",
|
|
15161
15333
|
"aria-expanded": open,
|
|
15162
|
-
children: /* @__PURE__ */ (0,
|
|
15334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15163
15335
|
import_ui22.ScTextField,
|
|
15164
15336
|
{
|
|
15165
15337
|
label: "Language",
|
|
@@ -15167,7 +15339,7 @@ function LanguageDropdown({
|
|
|
15167
15339
|
value: userLanguageLabel(value),
|
|
15168
15340
|
placeholderFilled: "Select language",
|
|
15169
15341
|
tfGroup: "icon-right",
|
|
15170
|
-
tfRightIcon: /* @__PURE__ */ (0,
|
|
15342
|
+
tfRightIcon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15171
15343
|
"span",
|
|
15172
15344
|
{
|
|
15173
15345
|
style: {
|
|
@@ -15177,7 +15349,7 @@ function LanguageDropdown({
|
|
|
15177
15349
|
transform: open ? "rotate(180deg)" : "none",
|
|
15178
15350
|
transition: "transform 120ms ease-out"
|
|
15179
15351
|
},
|
|
15180
|
-
children: /* @__PURE__ */ (0,
|
|
15352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconDown, {})
|
|
15181
15353
|
}
|
|
15182
15354
|
),
|
|
15183
15355
|
className: "sc-text-field-full-width",
|
|
@@ -15188,7 +15360,7 @@ function LanguageDropdown({
|
|
|
15188
15360
|
)
|
|
15189
15361
|
}
|
|
15190
15362
|
),
|
|
15191
|
-
open && /* @__PURE__ */ (0,
|
|
15363
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15192
15364
|
"div",
|
|
15193
15365
|
{
|
|
15194
15366
|
role: "listbox",
|
|
@@ -15214,11 +15386,11 @@ function LanguageDropdown({
|
|
|
15214
15386
|
},
|
|
15215
15387
|
children: USER_LANGUAGES.map((lang) => {
|
|
15216
15388
|
const isActive = lang.code === value;
|
|
15217
|
-
return /* @__PURE__ */ (0,
|
|
15389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15218
15390
|
import_ui21.ScMenuOptions,
|
|
15219
15391
|
{
|
|
15220
15392
|
text: lang.label,
|
|
15221
|
-
icon: /* @__PURE__ */ (0,
|
|
15393
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, {}),
|
|
15222
15394
|
hover: isActive ? "true" : "false",
|
|
15223
15395
|
variant: "default",
|
|
15224
15396
|
role: "option",
|
|
@@ -15347,13 +15519,13 @@ function ProfileTab() {
|
|
|
15347
15519
|
}
|
|
15348
15520
|
auth.clearAuth();
|
|
15349
15521
|
};
|
|
15350
|
-
return /* @__PURE__ */ (0,
|
|
15522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15351
15523
|
"div",
|
|
15352
15524
|
{
|
|
15353
15525
|
className: "flex flex-col items-start flex-1 min-w-0 min-h-0 overflow-y-auto",
|
|
15354
15526
|
style: { gap: "var(--spacing-3xl)" },
|
|
15355
15527
|
children: [
|
|
15356
|
-
/* @__PURE__ */ (0,
|
|
15528
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15357
15529
|
"div",
|
|
15358
15530
|
{
|
|
15359
15531
|
className: "sc-profile-card flex flex-col items-start w-full",
|
|
@@ -15366,13 +15538,13 @@ function ProfileTab() {
|
|
|
15366
15538
|
gap: "var(--spacing-6xl)"
|
|
15367
15539
|
},
|
|
15368
15540
|
children: [
|
|
15369
|
-
/* @__PURE__ */ (0,
|
|
15541
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15370
15542
|
"div",
|
|
15371
15543
|
{
|
|
15372
15544
|
className: "flex items-center shrink-0 w-full",
|
|
15373
15545
|
style: { gap: 24, flexWrap: "wrap" },
|
|
15374
15546
|
children: [
|
|
15375
|
-
profileImage ? /* @__PURE__ */ (0,
|
|
15547
|
+
profileImage ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15376
15548
|
"img",
|
|
15377
15549
|
{
|
|
15378
15550
|
src: profileImage,
|
|
@@ -15385,7 +15557,7 @@ function ProfileTab() {
|
|
|
15385
15557
|
flexShrink: 0
|
|
15386
15558
|
}
|
|
15387
15559
|
}
|
|
15388
|
-
) : /* @__PURE__ */ (0,
|
|
15560
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15389
15561
|
"div",
|
|
15390
15562
|
{
|
|
15391
15563
|
"aria-label": "Profile",
|
|
@@ -15398,7 +15570,7 @@ function ProfileTab() {
|
|
|
15398
15570
|
border: "1px solid var(--alias-border-subtle)",
|
|
15399
15571
|
flexShrink: 0
|
|
15400
15572
|
},
|
|
15401
|
-
children: /* @__PURE__ */ (0,
|
|
15573
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15402
15574
|
"span",
|
|
15403
15575
|
{
|
|
15404
15576
|
style: {
|
|
@@ -15413,7 +15585,7 @@ function ProfileTab() {
|
|
|
15413
15585
|
)
|
|
15414
15586
|
}
|
|
15415
15587
|
),
|
|
15416
|
-
/* @__PURE__ */ (0,
|
|
15588
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15417
15589
|
"input",
|
|
15418
15590
|
{
|
|
15419
15591
|
ref: fileInputRef,
|
|
@@ -15423,17 +15595,17 @@ function ProfileTab() {
|
|
|
15423
15595
|
onChange: handleImageChange
|
|
15424
15596
|
}
|
|
15425
15597
|
),
|
|
15426
|
-
/* @__PURE__ */ (0,
|
|
15598
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15427
15599
|
"div",
|
|
15428
15600
|
{
|
|
15429
15601
|
className: "flex items-center",
|
|
15430
15602
|
style: { gap: 12, flexWrap: "wrap" },
|
|
15431
15603
|
children: [
|
|
15432
|
-
/* @__PURE__ */ (0,
|
|
15604
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15433
15605
|
import_ui23.ScButton,
|
|
15434
15606
|
{
|
|
15435
15607
|
text: "Upload photo",
|
|
15436
|
-
icon: /* @__PURE__ */ (0,
|
|
15608
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconUpload, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
15437
15609
|
styleVariant: "icon-left",
|
|
15438
15610
|
variant: "outline",
|
|
15439
15611
|
size: "md",
|
|
@@ -15441,11 +15613,11 @@ function ProfileTab() {
|
|
|
15441
15613
|
onClick: handleUploadClick
|
|
15442
15614
|
}
|
|
15443
15615
|
),
|
|
15444
|
-
/* @__PURE__ */ (0,
|
|
15616
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15445
15617
|
import_ui23.ScButton,
|
|
15446
15618
|
{
|
|
15447
15619
|
text: "Remove photo",
|
|
15448
|
-
icon: /* @__PURE__ */ (0,
|
|
15620
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15449
15621
|
import_icons18.SiconDelete,
|
|
15450
15622
|
{
|
|
15451
15623
|
className: "w-5 h-5",
|
|
@@ -15465,15 +15637,15 @@ function ProfileTab() {
|
|
|
15465
15637
|
]
|
|
15466
15638
|
}
|
|
15467
15639
|
),
|
|
15468
|
-
/* @__PURE__ */ (0,
|
|
15469
|
-
/* @__PURE__ */ (0,
|
|
15640
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ui21.ScHDivider, {}),
|
|
15641
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15470
15642
|
"div",
|
|
15471
15643
|
{
|
|
15472
15644
|
className: "sc-profile-fields flex flex-col min-w-0 w-full",
|
|
15473
15645
|
style: { gap: 24 },
|
|
15474
15646
|
children: [
|
|
15475
|
-
/* @__PURE__ */ (0,
|
|
15476
|
-
/* @__PURE__ */ (0,
|
|
15647
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
|
|
15648
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15477
15649
|
import_ui22.ScTextField,
|
|
15478
15650
|
{
|
|
15479
15651
|
label: "Full Name",
|
|
@@ -15487,7 +15659,7 @@ function ProfileTab() {
|
|
|
15487
15659
|
onChange: (e) => setFullName(e.target.value)
|
|
15488
15660
|
}
|
|
15489
15661
|
) }),
|
|
15490
|
-
/* @__PURE__ */ (0,
|
|
15662
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15491
15663
|
SpecializationDropdown,
|
|
15492
15664
|
{
|
|
15493
15665
|
value: selectedSpec,
|
|
@@ -15496,8 +15668,8 @@ function ProfileTab() {
|
|
|
15496
15668
|
}
|
|
15497
15669
|
) })
|
|
15498
15670
|
] }),
|
|
15499
|
-
/* @__PURE__ */ (0,
|
|
15500
|
-
/* @__PURE__ */ (0,
|
|
15671
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
|
|
15672
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15501
15673
|
LanguageDropdown,
|
|
15502
15674
|
{
|
|
15503
15675
|
value: selectedLanguage,
|
|
@@ -15505,9 +15677,9 @@ function ProfileTab() {
|
|
|
15505
15677
|
disabled: disableAllActions
|
|
15506
15678
|
}
|
|
15507
15679
|
) }),
|
|
15508
|
-
/* @__PURE__ */ (0,
|
|
15680
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-1 min-w-0" })
|
|
15509
15681
|
] }),
|
|
15510
|
-
/* @__PURE__ */ (0,
|
|
15682
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15511
15683
|
import_ui22.ScTextField,
|
|
15512
15684
|
{
|
|
15513
15685
|
label: "Email ID",
|
|
@@ -15516,7 +15688,7 @@ function ProfileTab() {
|
|
|
15516
15688
|
value: user?.email ?? "",
|
|
15517
15689
|
placeholderFilled: user?.email ?? "chris@kepler.com",
|
|
15518
15690
|
tfGroup: "icon-right",
|
|
15519
|
-
tfRightIcon: /* @__PURE__ */ (0,
|
|
15691
|
+
tfRightIcon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15520
15692
|
import_icons18.SiconLock,
|
|
15521
15693
|
{
|
|
15522
15694
|
className: "w-6 h-6",
|
|
@@ -15528,12 +15700,12 @@ function ProfileTab() {
|
|
|
15528
15700
|
readOnly: true
|
|
15529
15701
|
}
|
|
15530
15702
|
) }),
|
|
15531
|
-
/* @__PURE__ */ (0,
|
|
15703
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15532
15704
|
"div",
|
|
15533
15705
|
{
|
|
15534
15706
|
className: "flex items-center w-full",
|
|
15535
15707
|
style: { justifyContent: "flex-end", paddingTop: "var(--spacing-md)" },
|
|
15536
|
-
children: /* @__PURE__ */ (0,
|
|
15708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15537
15709
|
import_ui23.ScButton,
|
|
15538
15710
|
{
|
|
15539
15711
|
text: saving ? "Saving..." : "Save changes",
|
|
@@ -15551,7 +15723,7 @@ function ProfileTab() {
|
|
|
15551
15723
|
]
|
|
15552
15724
|
}
|
|
15553
15725
|
),
|
|
15554
|
-
/* @__PURE__ */ (0,
|
|
15726
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15555
15727
|
"div",
|
|
15556
15728
|
{
|
|
15557
15729
|
className: "flex items-center w-full",
|
|
@@ -15563,8 +15735,8 @@ function ProfileTab() {
|
|
|
15563
15735
|
gap: "var(--spacing-3xl)"
|
|
15564
15736
|
},
|
|
15565
15737
|
children: [
|
|
15566
|
-
/* @__PURE__ */ (0,
|
|
15567
|
-
/* @__PURE__ */ (0,
|
|
15738
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
|
|
15739
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15568
15740
|
"span",
|
|
15569
15741
|
{
|
|
15570
15742
|
style: {
|
|
@@ -15577,7 +15749,7 @@ function ProfileTab() {
|
|
|
15577
15749
|
children: "Session"
|
|
15578
15750
|
}
|
|
15579
15751
|
),
|
|
15580
|
-
/* @__PURE__ */ (0,
|
|
15752
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15581
15753
|
"span",
|
|
15582
15754
|
{
|
|
15583
15755
|
className: "truncate",
|
|
@@ -15592,7 +15764,7 @@ function ProfileTab() {
|
|
|
15592
15764
|
}
|
|
15593
15765
|
)
|
|
15594
15766
|
] }),
|
|
15595
|
-
/* @__PURE__ */ (0,
|
|
15767
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15596
15768
|
import_ui23.ScButton,
|
|
15597
15769
|
{
|
|
15598
15770
|
text: "Log out",
|
|
@@ -15726,13 +15898,13 @@ function WorkspaceListTab({
|
|
|
15726
15898
|
});
|
|
15727
15899
|
}, [fetchPlans, listLoading, visibleKey]);
|
|
15728
15900
|
const planOf = (ws) => fetchPlans ? plans[ws._id] ?? "" : ws.plan ?? "";
|
|
15729
|
-
return /* @__PURE__ */ (0,
|
|
15901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15730
15902
|
"div",
|
|
15731
15903
|
{
|
|
15732
15904
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
15733
15905
|
style: { gap: "var(--spacing-3xl)", height: "100%" },
|
|
15734
15906
|
children: [
|
|
15735
|
-
/* @__PURE__ */ (0,
|
|
15907
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15736
15908
|
"p",
|
|
15737
15909
|
{
|
|
15738
15910
|
className: "shrink-0 w-full",
|
|
@@ -15745,7 +15917,7 @@ function WorkspaceListTab({
|
|
|
15745
15917
|
children: "Switching changes which workspace the rest of Settings acts on."
|
|
15746
15918
|
}
|
|
15747
15919
|
),
|
|
15748
|
-
listLoading && /* @__PURE__ */ (0,
|
|
15920
|
+
listLoading && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15749
15921
|
"p",
|
|
15750
15922
|
{
|
|
15751
15923
|
style: {
|
|
@@ -15756,13 +15928,13 @@ function WorkspaceListTab({
|
|
|
15756
15928
|
children: "Loading workspaces\u2026"
|
|
15757
15929
|
}
|
|
15758
15930
|
),
|
|
15759
|
-
!listLoading && currentWorkspace && /* @__PURE__ */ (0,
|
|
15931
|
+
!listLoading && currentWorkspace && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15760
15932
|
"div",
|
|
15761
15933
|
{
|
|
15762
15934
|
className: "flex flex-col items-start shrink-0 w-full",
|
|
15763
15935
|
style: { gap: 16, padding: "var(--spacing-md) 0" },
|
|
15764
15936
|
children: [
|
|
15765
|
-
/* @__PURE__ */ (0,
|
|
15937
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15766
15938
|
"p",
|
|
15767
15939
|
{
|
|
15768
15940
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
|
|
@@ -15779,7 +15951,7 @@ function WorkspaceListTab({
|
|
|
15779
15951
|
]
|
|
15780
15952
|
}
|
|
15781
15953
|
),
|
|
15782
|
-
/* @__PURE__ */ (0,
|
|
15954
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15783
15955
|
import_ui24.ScWorkspaceSwitchCard,
|
|
15784
15956
|
{
|
|
15785
15957
|
wsName: currentWorkspace.name,
|
|
@@ -15796,7 +15968,7 @@ function WorkspaceListTab({
|
|
|
15796
15968
|
]
|
|
15797
15969
|
}
|
|
15798
15970
|
),
|
|
15799
|
-
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ (0,
|
|
15971
|
+
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15800
15972
|
"div",
|
|
15801
15973
|
{
|
|
15802
15974
|
className: "shrink-0 w-full",
|
|
@@ -15806,19 +15978,19 @@ function WorkspaceListTab({
|
|
|
15806
15978
|
}
|
|
15807
15979
|
}
|
|
15808
15980
|
),
|
|
15809
|
-
!listLoading && listTotal > 0 && /* @__PURE__ */ (0,
|
|
15981
|
+
!listLoading && listTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15810
15982
|
"div",
|
|
15811
15983
|
{
|
|
15812
15984
|
className: "flex flex-col items-start flex-1 min-h-0 w-full",
|
|
15813
15985
|
style: { gap: 16, overflowY: "auto" },
|
|
15814
15986
|
children: [
|
|
15815
|
-
/* @__PURE__ */ (0,
|
|
15987
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15816
15988
|
"div",
|
|
15817
15989
|
{
|
|
15818
15990
|
className: "flex flex-col items-start w-full",
|
|
15819
15991
|
style: { gap: 16 },
|
|
15820
|
-
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ (0,
|
|
15821
|
-
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ (0,
|
|
15992
|
+
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react27.Fragment, { children: [
|
|
15993
|
+
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15822
15994
|
"p",
|
|
15823
15995
|
{
|
|
15824
15996
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap shrink-0",
|
|
@@ -15833,7 +16005,7 @@ function WorkspaceListTab({
|
|
|
15833
16005
|
children: group.label
|
|
15834
16006
|
}
|
|
15835
16007
|
),
|
|
15836
|
-
/* @__PURE__ */ (0,
|
|
16008
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15837
16009
|
import_ui24.ScWorkspaceSwitchCard,
|
|
15838
16010
|
{
|
|
15839
16011
|
wsName: ws.name,
|
|
@@ -15851,13 +16023,13 @@ function WorkspaceListTab({
|
|
|
15851
16023
|
] }, ws._id))
|
|
15852
16024
|
}
|
|
15853
16025
|
),
|
|
15854
|
-
pageCount > 1 && /* @__PURE__ */ (0,
|
|
16026
|
+
pageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15855
16027
|
"div",
|
|
15856
16028
|
{
|
|
15857
16029
|
className: "flex items-center justify-between shrink-0 w-full",
|
|
15858
16030
|
style: { gap: "var(--spacing-md)" },
|
|
15859
16031
|
children: [
|
|
15860
|
-
/* @__PURE__ */ (0,
|
|
16032
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15861
16033
|
"span",
|
|
15862
16034
|
{
|
|
15863
16035
|
style: {
|
|
@@ -15876,8 +16048,8 @@ function WorkspaceListTab({
|
|
|
15876
16048
|
]
|
|
15877
16049
|
}
|
|
15878
16050
|
),
|
|
15879
|
-
/* @__PURE__ */ (0,
|
|
15880
|
-
/* @__PURE__ */ (0,
|
|
16051
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
|
|
16052
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15881
16053
|
import_ui23.ScButton,
|
|
15882
16054
|
{
|
|
15883
16055
|
text: "Previous",
|
|
@@ -15887,7 +16059,7 @@ function WorkspaceListTab({
|
|
|
15887
16059
|
onClick: safePage === 0 ? void 0 : () => setPage(safePage - 1)
|
|
15888
16060
|
}
|
|
15889
16061
|
),
|
|
15890
|
-
/* @__PURE__ */ (0,
|
|
16062
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15891
16063
|
import_ui23.ScButton,
|
|
15892
16064
|
{
|
|
15893
16065
|
text: "Next",
|
|
@@ -15910,75 +16082,91 @@ function WorkspaceListTab({
|
|
|
15910
16082
|
}
|
|
15911
16083
|
var WorkspaceTab = WorkspaceListTab;
|
|
15912
16084
|
function ReferralTab() {
|
|
15913
|
-
const { auth } = useSettingsAdapters();
|
|
15914
|
-
const user = auth.user;
|
|
15915
|
-
const referralCode = (user?.referralCode ?? user?.referral_code ?? user?.referalCode ?? user?.referal_code ?? "").trim();
|
|
16085
|
+
const { auth, toast, api } = useSettingsAdapters();
|
|
15916
16086
|
const domain = typeof window !== "undefined" ? window.location.origin : "";
|
|
15917
|
-
const
|
|
15918
|
-
|
|
16087
|
+
const link = referralLink(referralCodeOf(auth.user), domain);
|
|
16088
|
+
const [copied, setCopied] = (0, import_react27.useState)(false);
|
|
16089
|
+
const copiedTimer = (0, import_react27.useRef)(null);
|
|
16090
|
+
(0, import_react27.useEffect)(() => () => {
|
|
16091
|
+
if (copiedTimer.current) clearTimeout(copiedTimer.current);
|
|
16092
|
+
}, []);
|
|
16093
|
+
const copyLink = async () => {
|
|
16094
|
+
if (!link) return;
|
|
16095
|
+
try {
|
|
16096
|
+
await navigator.clipboard.writeText(link);
|
|
16097
|
+
toast.success("Referral link copied");
|
|
16098
|
+
setCopied(true);
|
|
16099
|
+
if (copiedTimer.current) clearTimeout(copiedTimer.current);
|
|
16100
|
+
copiedTimer.current = setTimeout(() => setCopied(false), 2e3);
|
|
16101
|
+
} catch {
|
|
16102
|
+
toast.error("Couldn't copy the referral link");
|
|
16103
|
+
}
|
|
16104
|
+
};
|
|
16105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15919
16106
|
"div",
|
|
15920
16107
|
{
|
|
15921
16108
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
15922
16109
|
style: { gap: "var(--spacing-3xl)" },
|
|
15923
|
-
children:
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
16110
|
+
children: [
|
|
16111
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16112
|
+
"div",
|
|
16113
|
+
{
|
|
16114
|
+
className: "w-full relative",
|
|
16115
|
+
style: {
|
|
16116
|
+
backgroundColor: "var(--alias-surface-base)",
|
|
16117
|
+
borderRadius: "var(--radius-3xl)",
|
|
16118
|
+
padding: "var(--spacing-6xl)"
|
|
16119
|
+
},
|
|
16120
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16121
|
+
import_ui22.ScTextField,
|
|
16122
|
+
{
|
|
16123
|
+
label: "Your Referral Link",
|
|
16124
|
+
labelGroup: "label",
|
|
16125
|
+
state: "filled",
|
|
16126
|
+
value: link,
|
|
16127
|
+
placeholderFilled: "https://your-domain.com?referral_code=ABC123",
|
|
16128
|
+
tfGroup: "none",
|
|
16129
|
+
rightSlot: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16130
|
+
"button",
|
|
15940
16131
|
{
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
|
|
16132
|
+
type: "button",
|
|
16133
|
+
"aria-label": copied ? "Copied" : "Copy referral link",
|
|
16134
|
+
title: copied ? "Copied" : "Copy referral link",
|
|
16135
|
+
disabled: !link,
|
|
16136
|
+
onClick: () => void copyLink(),
|
|
16137
|
+
className: "flex items-center justify-center shrink-0 cursor-pointer border-none",
|
|
16138
|
+
style: {
|
|
16139
|
+
gap: "var(--spacing-xs)",
|
|
16140
|
+
padding: "0 var(--spacing-md)",
|
|
16141
|
+
height: 32,
|
|
16142
|
+
borderRadius: "var(--radius-lg)",
|
|
16143
|
+
background: "transparent",
|
|
16144
|
+
color: "var(--alias-text---icons-primary)",
|
|
16145
|
+
fontSize: "var(--font-size-font-size-sm)",
|
|
16146
|
+
fontWeight: 500
|
|
16147
|
+
},
|
|
16148
|
+
onMouseEnter: (e) => {
|
|
16149
|
+
e.currentTarget.style.background = "var(--alias-fill-neutral-neutralplus)";
|
|
16150
|
+
},
|
|
16151
|
+
onMouseLeave: (e) => {
|
|
16152
|
+
e.currentTarget.style.background = "transparent";
|
|
16153
|
+
},
|
|
16154
|
+
children: [
|
|
16155
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconCheck, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconCopy, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }),
|
|
16156
|
+
copied ? "Copied" : "Copy"
|
|
16157
|
+
]
|
|
15956
16158
|
}
|
|
15957
16159
|
),
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
import_icons18.SiconSend,
|
|
15969
|
-
{
|
|
15970
|
-
className: "w-6 h-6",
|
|
15971
|
-
color: "var(--alias-text---icons-primary)"
|
|
15972
|
-
}
|
|
15973
|
-
),
|
|
15974
|
-
className: "sc-text-field-full-width flex-1 min-w-0"
|
|
15975
|
-
}
|
|
15976
|
-
)
|
|
15977
|
-
]
|
|
15978
|
-
}
|
|
15979
|
-
)
|
|
15980
|
-
}
|
|
15981
|
-
)
|
|
16160
|
+
desc: "Share this link. When someone opens it and creates a new Streamoid account, it's recorded as your referral.",
|
|
16161
|
+
className: "sc-text-field-full-width w-full min-w-0",
|
|
16162
|
+
readOnly: true,
|
|
16163
|
+
onFocus: (e) => e.currentTarget.select()
|
|
16164
|
+
}
|
|
16165
|
+
)
|
|
16166
|
+
}
|
|
16167
|
+
),
|
|
16168
|
+
api.getReferredUsers && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ReferralHistory, { load: (signal) => api.getReferredUsers(signal) })
|
|
16169
|
+
]
|
|
15982
16170
|
}
|
|
15983
16171
|
);
|
|
15984
16172
|
}
|
|
@@ -15995,7 +16183,7 @@ function SettingsContent({
|
|
|
15995
16183
|
inviteRequested,
|
|
15996
16184
|
onInviteRequestHandled
|
|
15997
16185
|
}) {
|
|
15998
|
-
return /* @__PURE__ */ (0,
|
|
16186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15999
16187
|
SettingsContentInner,
|
|
16000
16188
|
{
|
|
16001
16189
|
activeTab,
|
|
@@ -16039,6 +16227,7 @@ function SettingsContentInner({
|
|
|
16039
16227
|
const isOverview = overviewDetail && showOverview;
|
|
16040
16228
|
const overviewInvite = useWorkspaceInvitePermission(adapters, { enabled: isOverview && !!onInvitePeople });
|
|
16041
16229
|
const showConnectedApps = !!integrations;
|
|
16230
|
+
const showReferral = !!referralCodeOf(adapters.auth.user);
|
|
16042
16231
|
const showIntegrations = !!integrations?.listOrganizationConnections && !!integrations.getOrganizationAccess && organization.current?.role === "admin";
|
|
16043
16232
|
const workspaceId = workspace.current?.id ?? null;
|
|
16044
16233
|
const workspaceOwner = useWorkspaceOrganization({ workspaceId, request: workspace.organizationRequest ?? unavailableOrganizationRequest, enabled: !!workspace.organizationRequest });
|
|
@@ -16447,7 +16636,7 @@ function SettingsContentInner({
|
|
|
16447
16636
|
setConfirmLeaveOpen(true);
|
|
16448
16637
|
return false;
|
|
16449
16638
|
}
|
|
16450
|
-
return /* @__PURE__ */ (0,
|
|
16639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16451
16640
|
"div",
|
|
16452
16641
|
{
|
|
16453
16642
|
"data-streamoid-settings": "",
|
|
@@ -16458,8 +16647,8 @@ function SettingsContentInner({
|
|
|
16458
16647
|
...isOverview ? { display: "block", overflowY: "auto" } : {}
|
|
16459
16648
|
},
|
|
16460
16649
|
children: [
|
|
16461
|
-
!isOverview && /* @__PURE__ */ (0,
|
|
16462
|
-
/* @__PURE__ */ (0,
|
|
16650
|
+
!isOverview && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SettingsAppearance, {}),
|
|
16651
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16463
16652
|
"div",
|
|
16464
16653
|
{
|
|
16465
16654
|
className: "flex flex-col items-start relative h-full overflow-hidden",
|
|
@@ -16470,8 +16659,8 @@ function SettingsContentInner({
|
|
|
16470
16659
|
width: "100%",
|
|
16471
16660
|
...isOverview ? { height: "auto", minHeight: "100%", overflow: "visible", marginInline: "auto" } : {}
|
|
16472
16661
|
},
|
|
16473
|
-
children: /* @__PURE__ */ (0,
|
|
16474
|
-
!overviewDetail && onBack !== null && /* @__PURE__ */ (0,
|
|
16662
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
|
|
16663
|
+
!overviewDetail && onBack !== null && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16475
16664
|
"button",
|
|
16476
16665
|
{
|
|
16477
16666
|
type: "button",
|
|
@@ -16503,19 +16692,19 @@ function SettingsContentInner({
|
|
|
16503
16692
|
else window.history.back();
|
|
16504
16693
|
},
|
|
16505
16694
|
children: [
|
|
16506
|
-
/* @__PURE__ */ (0,
|
|
16695
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconLeft, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
|
|
16507
16696
|
"Back"
|
|
16508
16697
|
]
|
|
16509
16698
|
}
|
|
16510
16699
|
) }),
|
|
16511
|
-
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ (0,
|
|
16700
|
+
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16512
16701
|
import_ui23.ScButton,
|
|
16513
16702
|
{
|
|
16514
16703
|
text: isBillingSubView ? "Back to billing" : "Back to account and workspace settings",
|
|
16515
16704
|
variant: "tertiary",
|
|
16516
16705
|
size: "sm",
|
|
16517
16706
|
styleVariant: "icon-left",
|
|
16518
|
-
icon: /* @__PURE__ */ (0,
|
|
16707
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
|
|
16519
16708
|
onClick: () => {
|
|
16520
16709
|
if (isBillingSubView) {
|
|
16521
16710
|
setBillingShowPlans(false);
|
|
@@ -16527,7 +16716,7 @@ function SettingsContentInner({
|
|
|
16527
16716
|
}
|
|
16528
16717
|
}
|
|
16529
16718
|
) }),
|
|
16530
|
-
/* @__PURE__ */ (0,
|
|
16719
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16531
16720
|
"div",
|
|
16532
16721
|
{
|
|
16533
16722
|
className: "flex items-center shrink-0 w-full",
|
|
@@ -16538,9 +16727,9 @@ function SettingsContentInner({
|
|
|
16538
16727
|
paddingRight: 20
|
|
16539
16728
|
},
|
|
16540
16729
|
children: [
|
|
16541
|
-
/* @__PURE__ */ (0,
|
|
16542
|
-
/* @__PURE__ */ (0,
|
|
16543
|
-
/* @__PURE__ */ (0,
|
|
16730
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
|
|
16731
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconSettings, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16732
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16544
16733
|
"h1",
|
|
16545
16734
|
{
|
|
16546
16735
|
style: {
|
|
@@ -16554,10 +16743,10 @@ function SettingsContentInner({
|
|
|
16554
16743
|
children: overviewDetail ? "Account and workspace settings" : "Settings"
|
|
16555
16744
|
}
|
|
16556
16745
|
),
|
|
16557
|
-
!isOverview && /* @__PURE__ */ (0,
|
|
16558
|
-
scopeCrumb && /* @__PURE__ */ (0,
|
|
16559
|
-
/* @__PURE__ */ (0,
|
|
16560
|
-
/* @__PURE__ */ (0,
|
|
16746
|
+
!isOverview && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
|
|
16747
|
+
scopeCrumb && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
16748
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16749
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16561
16750
|
"span",
|
|
16562
16751
|
{
|
|
16563
16752
|
className: "truncate",
|
|
@@ -16574,8 +16763,8 @@ function SettingsContentInner({
|
|
|
16574
16763
|
}
|
|
16575
16764
|
)
|
|
16576
16765
|
] }),
|
|
16577
|
-
/* @__PURE__ */ (0,
|
|
16578
|
-
/* @__PURE__ */ (0,
|
|
16766
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16767
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16579
16768
|
"span",
|
|
16580
16769
|
{
|
|
16581
16770
|
style: {
|
|
@@ -16588,9 +16777,9 @@ function SettingsContentInner({
|
|
|
16588
16777
|
children: leafLabel
|
|
16589
16778
|
}
|
|
16590
16779
|
),
|
|
16591
|
-
isBillingPlans && /* @__PURE__ */ (0,
|
|
16592
|
-
/* @__PURE__ */ (0,
|
|
16593
|
-
/* @__PURE__ */ (0,
|
|
16780
|
+
isBillingPlans && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
16781
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16782
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16594
16783
|
"span",
|
|
16595
16784
|
{
|
|
16596
16785
|
style: {
|
|
@@ -16604,9 +16793,9 @@ function SettingsContentInner({
|
|
|
16604
16793
|
}
|
|
16605
16794
|
)
|
|
16606
16795
|
] }),
|
|
16607
|
-
isBillingPerUserLimits && /* @__PURE__ */ (0,
|
|
16608
|
-
/* @__PURE__ */ (0,
|
|
16609
|
-
/* @__PURE__ */ (0,
|
|
16796
|
+
isBillingPerUserLimits && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
16797
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16798
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16610
16799
|
"span",
|
|
16611
16800
|
{
|
|
16612
16801
|
style: {
|
|
@@ -16620,9 +16809,9 @@ function SettingsContentInner({
|
|
|
16620
16809
|
}
|
|
16621
16810
|
)
|
|
16622
16811
|
] }),
|
|
16623
|
-
isBillingSharedCredits && /* @__PURE__ */ (0,
|
|
16624
|
-
/* @__PURE__ */ (0,
|
|
16625
|
-
/* @__PURE__ */ (0,
|
|
16812
|
+
isBillingSharedCredits && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
16813
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16814
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16626
16815
|
"span",
|
|
16627
16816
|
{
|
|
16628
16817
|
style: {
|
|
@@ -16638,20 +16827,20 @@ function SettingsContentInner({
|
|
|
16638
16827
|
] })
|
|
16639
16828
|
] })
|
|
16640
16829
|
] }),
|
|
16641
|
-
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */ (0,
|
|
16830
|
+
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16642
16831
|
SettingsTooltip,
|
|
16643
16832
|
{
|
|
16644
16833
|
content: "Start a new workspace with its own team, members and billing",
|
|
16645
16834
|
placement: "bottom",
|
|
16646
16835
|
inline: true,
|
|
16647
|
-
children: /* @__PURE__ */ (0,
|
|
16836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16648
16837
|
import_ui23.ScButton,
|
|
16649
16838
|
{
|
|
16650
16839
|
text: "Create Workspace",
|
|
16651
16840
|
variant: "secondary",
|
|
16652
16841
|
size: "md",
|
|
16653
16842
|
styleVariant: "icon-left",
|
|
16654
|
-
icon: /* @__PURE__ */ (0,
|
|
16843
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16655
16844
|
import_icons18.SiconWorkspace,
|
|
16656
16845
|
{
|
|
16657
16846
|
className: "w-5 h-5",
|
|
@@ -16663,13 +16852,13 @@ function SettingsContentInner({
|
|
|
16663
16852
|
)
|
|
16664
16853
|
}
|
|
16665
16854
|
),
|
|
16666
|
-
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ (0,
|
|
16855
|
+
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16667
16856
|
SettingsTooltip,
|
|
16668
16857
|
{
|
|
16669
16858
|
content: "Send someone an invite to join this workspace",
|
|
16670
16859
|
placement: "bottom",
|
|
16671
16860
|
inline: true,
|
|
16672
|
-
children: /* @__PURE__ */ (0,
|
|
16861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16673
16862
|
import_ui23.ScButton,
|
|
16674
16863
|
{
|
|
16675
16864
|
text: overviewDetail ? "Invite people" : "Invite user",
|
|
@@ -16677,7 +16866,7 @@ function SettingsContentInner({
|
|
|
16677
16866
|
size: "md",
|
|
16678
16867
|
styleVariant: "icon-left",
|
|
16679
16868
|
state: canUseHeaderInvite ? "default" : "disabled",
|
|
16680
|
-
icon: /* @__PURE__ */ (0,
|
|
16869
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16681
16870
|
import_icons18.SiconUserAdd,
|
|
16682
16871
|
{
|
|
16683
16872
|
className: "w-5 h-5",
|
|
@@ -16691,14 +16880,14 @@ function SettingsContentInner({
|
|
|
16691
16880
|
)
|
|
16692
16881
|
}
|
|
16693
16882
|
),
|
|
16694
|
-
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
16695
|
-
/* @__PURE__ */ (0,
|
|
16883
|
+
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
|
|
16884
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16696
16885
|
SettingsTooltip,
|
|
16697
16886
|
{
|
|
16698
16887
|
content: "Include keys you have already revoked in the list below",
|
|
16699
16888
|
placement: "bottom",
|
|
16700
16889
|
inline: true,
|
|
16701
|
-
children: /* @__PURE__ */ (0,
|
|
16890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16702
16891
|
import_ui23.ScButton,
|
|
16703
16892
|
{
|
|
16704
16893
|
text: tokenShowRevoked ? "Hide Revoked" : "Show Revoked",
|
|
@@ -16709,20 +16898,20 @@ function SettingsContentInner({
|
|
|
16709
16898
|
)
|
|
16710
16899
|
}
|
|
16711
16900
|
),
|
|
16712
|
-
/* @__PURE__ */ (0,
|
|
16901
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16713
16902
|
SettingsTooltip,
|
|
16714
16903
|
{
|
|
16715
16904
|
content: "Generate a key for calling the Streamoid APIs from your own code",
|
|
16716
16905
|
placement: "bottom",
|
|
16717
16906
|
inline: true,
|
|
16718
|
-
children: /* @__PURE__ */ (0,
|
|
16907
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16719
16908
|
import_ui23.ScButton,
|
|
16720
16909
|
{
|
|
16721
16910
|
text: "New API Key",
|
|
16722
16911
|
variant: "secondary",
|
|
16723
16912
|
size: "md",
|
|
16724
16913
|
styleVariant: "icon-left",
|
|
16725
|
-
icon: /* @__PURE__ */ (0,
|
|
16914
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16726
16915
|
import_icons18.SiconPlus,
|
|
16727
16916
|
{
|
|
16728
16917
|
className: "w-5 h-5",
|
|
@@ -16735,13 +16924,13 @@ function SettingsContentInner({
|
|
|
16735
16924
|
}
|
|
16736
16925
|
)
|
|
16737
16926
|
] }),
|
|
16738
|
-
overviewDetail && onClose && /* @__PURE__ */ (0,
|
|
16927
|
+
overviewDetail && onClose && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16739
16928
|
import_ui23.ScButton,
|
|
16740
16929
|
{
|
|
16741
16930
|
styleVariant: "icon-only",
|
|
16742
16931
|
variant: "outline",
|
|
16743
16932
|
size: "md",
|
|
16744
|
-
icon: /* @__PURE__ */ (0,
|
|
16933
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconClose, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
16745
16934
|
"aria-label": "Close settings",
|
|
16746
16935
|
style: isOverview ? { width: "2rem", height: "2rem", padding: 0 } : void 0,
|
|
16747
16936
|
onClick: onClose
|
|
@@ -16750,7 +16939,7 @@ function SettingsContentInner({
|
|
|
16750
16939
|
]
|
|
16751
16940
|
}
|
|
16752
16941
|
),
|
|
16753
|
-
isOverview ? /* @__PURE__ */ (0,
|
|
16942
|
+
isOverview ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16754
16943
|
AdministrationOverview,
|
|
16755
16944
|
{
|
|
16756
16945
|
workspaceName: workspaceScopeName,
|
|
@@ -16760,17 +16949,18 @@ function SettingsContentInner({
|
|
|
16760
16949
|
isWorkspaceAdmin,
|
|
16761
16950
|
showConnectedApps,
|
|
16762
16951
|
showIntegrations,
|
|
16952
|
+
showReferral,
|
|
16763
16953
|
canInvite: !overviewInvite.isLoading && overviewInvite.canInvite,
|
|
16764
16954
|
onNavigate: setActiveTab,
|
|
16765
16955
|
onInvitePeople
|
|
16766
16956
|
}
|
|
16767
|
-
) : /* @__PURE__ */ (0,
|
|
16957
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16768
16958
|
"div",
|
|
16769
16959
|
{
|
|
16770
16960
|
className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
|
|
16771
16961
|
style: { gap: 20 },
|
|
16772
16962
|
children: [
|
|
16773
|
-
!overviewDetail && !isBillingSubView && /* @__PURE__ */ (0,
|
|
16963
|
+
!overviewDetail && !isBillingSubView && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16774
16964
|
SettingsNav,
|
|
16775
16965
|
{
|
|
16776
16966
|
isWorkspaceAdmin,
|
|
@@ -16780,11 +16970,12 @@ function SettingsContentInner({
|
|
|
16780
16970
|
organizationName: organizationScopeName,
|
|
16781
16971
|
hasOrganization,
|
|
16782
16972
|
showConnectedApps,
|
|
16783
|
-
showIntegrations
|
|
16973
|
+
showIntegrations,
|
|
16974
|
+
showReferral
|
|
16784
16975
|
}
|
|
16785
16976
|
),
|
|
16786
|
-
activeTab === "profile" && /* @__PURE__ */ (0,
|
|
16787
|
-
activeTab === "workspace" && /* @__PURE__ */ (0,
|
|
16977
|
+
activeTab === "profile" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ProfileTab, {}),
|
|
16978
|
+
activeTab === "workspace" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16788
16979
|
WorkspaceGeneralTab,
|
|
16789
16980
|
{
|
|
16790
16981
|
workspace: currentWorkspaceData,
|
|
@@ -16806,7 +16997,7 @@ function SettingsContentInner({
|
|
|
16806
16997
|
}
|
|
16807
16998
|
}
|
|
16808
16999
|
) }),
|
|
16809
|
-
activeTab === "workspaceMembers" && /* @__PURE__ */ (0,
|
|
17000
|
+
activeTab === "workspaceMembers" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16810
17001
|
TeamsContent,
|
|
16811
17002
|
{
|
|
16812
17003
|
embedded: true,
|
|
@@ -16821,7 +17012,7 @@ function SettingsContentInner({
|
|
|
16821
17012
|
hiddenApps
|
|
16822
17013
|
}
|
|
16823
17014
|
) }),
|
|
16824
|
-
activeTab === "workspaceList" && /* @__PURE__ */ (0,
|
|
17015
|
+
activeTab === "workspaceList" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16825
17016
|
WorkspaceListTab,
|
|
16826
17017
|
{
|
|
16827
17018
|
workspaces: displayWorkspaces,
|
|
@@ -16846,11 +17037,11 @@ function SettingsContentInner({
|
|
|
16846
17037
|
}
|
|
16847
17038
|
}
|
|
16848
17039
|
),
|
|
16849
|
-
activeTab === "referral" && /* @__PURE__ */ (0,
|
|
16850
|
-
activeTab === "connectedApps" && /* @__PURE__ */ (0,
|
|
16851
|
-
activeTab === "organizationIntegrations" && /* @__PURE__ */ (0,
|
|
16852
|
-
activeTab === "organizationList" && /* @__PURE__ */ (0,
|
|
16853
|
-
(activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ (0,
|
|
17040
|
+
activeTab === "referral" && showReferral && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ReferralTab, {}),
|
|
17041
|
+
activeTab === "connectedApps" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ConnectedAppsContent, {}),
|
|
17042
|
+
activeTab === "organizationIntegrations" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(OrganizationIntegrationsContent, {}),
|
|
17043
|
+
activeTab === "organizationList" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(OrganizationListContent, {}),
|
|
17044
|
+
(activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: organization.managementUrl ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16854
17045
|
ManagedOrganizationSummary,
|
|
16855
17046
|
{
|
|
16856
17047
|
name: workspaceOwner.organizationName,
|
|
@@ -16858,14 +17049,14 @@ function SettingsContentInner({
|
|
|
16858
17049
|
status: workspaceOwner.organizationStatus,
|
|
16859
17050
|
managementUrl: organization.managementUrl
|
|
16860
17051
|
}
|
|
16861
|
-
) : /* @__PURE__ */ (0,
|
|
17052
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16862
17053
|
OrganizationContent,
|
|
16863
17054
|
{
|
|
16864
17055
|
embedded: true,
|
|
16865
17056
|
view: activeTab === "organizationWorkspaces" || activeTab === "organizationDomains" ? "workspaces" : "people"
|
|
16866
17057
|
}
|
|
16867
17058
|
) }),
|
|
16868
|
-
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
17059
|
+
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16869
17060
|
BillingContent,
|
|
16870
17061
|
{
|
|
16871
17062
|
embedded: true,
|
|
@@ -16895,14 +17086,14 @@ function SettingsContentInner({
|
|
|
16895
17086
|
}
|
|
16896
17087
|
}
|
|
16897
17088
|
) }),
|
|
16898
|
-
(activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
16899
|
-
/* @__PURE__ */ (0,
|
|
16900
|
-
/* @__PURE__ */ (0,
|
|
16901
|
-
/* @__PURE__ */ (0,
|
|
16902
|
-
/* @__PURE__ */ (0,
|
|
17089
|
+
(activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("section", { role: "status", className: "flex flex-col flex-1 min-w-0", style: { padding: 28, gap: 12, background: "var(--alias-surface-base)", border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)" }, children: [
|
|
17090
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconLock, { size: 24, color: MUTED_COLOR2 }),
|
|
17091
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
|
|
17092
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { style: { margin: 0, fontSize: 14, lineHeight: "22px", color: MUTED_COLOR2, maxWidth: 480 }, children: activeTab === "billing" ? "Your workspace admin manages credit top-ups, plans and billing history. Get in touch with them to add credits or request billing details." : "API Keys are available to workspace Admins only. Get in touch with your workspace admin to manage API access." }),
|
|
17093
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("button", { type: "button", onClick: () => setActiveTab("workspaceMembers"), style: { alignSelf: "flex-start", marginTop: 8, padding: "8px 12px", background: "transparent", color: PRIMARY_COLOR3, border: "1px solid var(--alias-border-default)", borderRadius: 8, cursor: "pointer" }, children: "View workspace members" })
|
|
16903
17094
|
] }),
|
|
16904
|
-
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
16905
|
-
/* @__PURE__ */ (0,
|
|
17095
|
+
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
|
|
17096
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
16906
17097
|
"a",
|
|
16907
17098
|
{
|
|
16908
17099
|
href: "https://docs.streamoid.com",
|
|
@@ -16912,19 +17103,19 @@ function SettingsContentInner({
|
|
|
16912
17103
|
className: "flex items-center shrink-0",
|
|
16913
17104
|
style: { gap: 14, padding: "16px 20px", marginBottom: 16, border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)", background: "var(--alias-surface-base)", color: PRIMARY_COLOR3, textDecoration: "none" },
|
|
16914
17105
|
children: [
|
|
16915
|
-
/* @__PURE__ */ (0,
|
|
16916
|
-
/* @__PURE__ */ (0,
|
|
16917
|
-
/* @__PURE__ */ (0,
|
|
16918
|
-
/* @__PURE__ */ (0,
|
|
17106
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconBookOpen, { size: 24 }),
|
|
17107
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
|
|
17108
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
|
|
17109
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
|
|
16919
17110
|
] }),
|
|
16920
|
-
/* @__PURE__ */ (0,
|
|
17111
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
|
|
16921
17112
|
"View docs ",
|
|
16922
|
-
/* @__PURE__ */ (0,
|
|
17113
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons18.SiconExternalLink, { size: 16 })
|
|
16923
17114
|
] })
|
|
16924
17115
|
]
|
|
16925
17116
|
}
|
|
16926
17117
|
),
|
|
16927
|
-
/* @__PURE__ */ (0,
|
|
17118
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16928
17119
|
TokensContent,
|
|
16929
17120
|
{
|
|
16930
17121
|
embedded: true,
|
|
@@ -16941,7 +17132,7 @@ function SettingsContentInner({
|
|
|
16941
17132
|
] })
|
|
16942
17133
|
}
|
|
16943
17134
|
),
|
|
16944
|
-
/* @__PURE__ */ (0,
|
|
17135
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16945
17136
|
WorkspaceModal,
|
|
16946
17137
|
{
|
|
16947
17138
|
open: wsModalOpen,
|
|
@@ -16960,7 +17151,7 @@ function SettingsContentInner({
|
|
|
16960
17151
|
}
|
|
16961
17152
|
}
|
|
16962
17153
|
),
|
|
16963
|
-
/* @__PURE__ */ (0,
|
|
17154
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16964
17155
|
ConfirmLeaveModal,
|
|
16965
17156
|
{
|
|
16966
17157
|
open: confirmLeaveOpen,
|
|
@@ -16993,7 +17184,7 @@ function SettingsContentInner({
|
|
|
16993
17184
|
}
|
|
16994
17185
|
}
|
|
16995
17186
|
),
|
|
16996
|
-
/* @__PURE__ */ (0,
|
|
17187
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
16997
17188
|
ConfirmDeleteModal,
|
|
16998
17189
|
{
|
|
16999
17190
|
open: confirmDeleteOpen,
|
|
@@ -17026,7 +17217,7 @@ function SettingsContentInner({
|
|
|
17026
17217
|
var import_react28 = require("react");
|
|
17027
17218
|
var import_ui25 = require("@streamoid/ui");
|
|
17028
17219
|
var import_icons19 = require("@streamoid/icons");
|
|
17029
|
-
var
|
|
17220
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
17030
17221
|
var T19 = {
|
|
17031
17222
|
primary: "var(--alias-text---icons-primary)",
|
|
17032
17223
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17109,7 +17300,7 @@ function WorkspacePicker({
|
|
|
17109
17300
|
);
|
|
17110
17301
|
const workspaceRow = (workspace, first) => {
|
|
17111
17302
|
const checked = selected.has(workspace._id);
|
|
17112
|
-
return /* @__PURE__ */ (0,
|
|
17303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
17113
17304
|
"div",
|
|
17114
17305
|
{
|
|
17115
17306
|
role: "checkbox",
|
|
@@ -17130,8 +17321,8 @@ function WorkspacePicker({
|
|
|
17130
17321
|
}
|
|
17131
17322
|
},
|
|
17132
17323
|
children: [
|
|
17133
|
-
/* @__PURE__ */ (0,
|
|
17134
|
-
/* @__PURE__ */ (0,
|
|
17324
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ui25.ScCheckbox, { checked }),
|
|
17325
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17135
17326
|
ProfileAvatar,
|
|
17136
17327
|
{
|
|
17137
17328
|
name: workspace.name,
|
|
@@ -17140,8 +17331,8 @@ function WorkspacePicker({
|
|
|
17140
17331
|
borderRadius: T19.rLg
|
|
17141
17332
|
}
|
|
17142
17333
|
),
|
|
17143
|
-
/* @__PURE__ */ (0,
|
|
17144
|
-
/* @__PURE__ */ (0,
|
|
17334
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
17335
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17145
17336
|
"span",
|
|
17146
17337
|
{
|
|
17147
17338
|
className: "truncate",
|
|
@@ -17149,7 +17340,7 @@ function WorkspacePicker({
|
|
|
17149
17340
|
children: workspace.name
|
|
17150
17341
|
}
|
|
17151
17342
|
),
|
|
17152
|
-
workspace.ownerName && /* @__PURE__ */ (0,
|
|
17343
|
+
workspace.ownerName && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
17153
17344
|
"span",
|
|
17154
17345
|
{
|
|
17155
17346
|
className: "truncate",
|
|
@@ -17170,8 +17361,8 @@ function WorkspacePicker({
|
|
|
17170
17361
|
const isCollapsed = collapsed.has(section.organizationId);
|
|
17171
17362
|
const picked = section.workspaces.filter((w) => selected.has(w._id)).length;
|
|
17172
17363
|
const Chevron = isCollapsed ? import_icons19.SiconChevronRight : import_icons19.SiconChevronDown;
|
|
17173
|
-
return /* @__PURE__ */ (0,
|
|
17174
|
-
/* @__PURE__ */ (0,
|
|
17364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col w-full", children: [
|
|
17365
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
17175
17366
|
"div",
|
|
17176
17367
|
{
|
|
17177
17368
|
role: "button",
|
|
@@ -17195,8 +17386,8 @@ function WorkspacePicker({
|
|
|
17195
17386
|
}
|
|
17196
17387
|
},
|
|
17197
17388
|
children: [
|
|
17198
|
-
/* @__PURE__ */ (0,
|
|
17199
|
-
/* @__PURE__ */ (0,
|
|
17389
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Chevron, { className: "w-4 h-4", color: T19.muted }),
|
|
17390
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17200
17391
|
ProfileAvatar,
|
|
17201
17392
|
{
|
|
17202
17393
|
name: section.organizationName,
|
|
@@ -17205,7 +17396,7 @@ function WorkspacePicker({
|
|
|
17205
17396
|
borderRadius: T19.rLg
|
|
17206
17397
|
}
|
|
17207
17398
|
),
|
|
17208
|
-
/* @__PURE__ */ (0,
|
|
17399
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17209
17400
|
"span",
|
|
17210
17401
|
{
|
|
17211
17402
|
className: "truncate flex-1 min-w-0",
|
|
@@ -17213,11 +17404,11 @@ function WorkspacePicker({
|
|
|
17213
17404
|
children: section.organizationName
|
|
17214
17405
|
}
|
|
17215
17406
|
),
|
|
17216
|
-
/* @__PURE__ */ (0,
|
|
17407
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs, flexShrink: 0 }, children: picked ? `${picked} of ${section.workspaces.length} selected` : `${section.workspaces.length} workspace${section.workspaces.length === 1 ? "" : "s"}` })
|
|
17217
17408
|
]
|
|
17218
17409
|
}
|
|
17219
17410
|
),
|
|
17220
|
-
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ (0,
|
|
17411
|
+
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17221
17412
|
"div",
|
|
17222
17413
|
{
|
|
17223
17414
|
style: {
|
|
@@ -17232,14 +17423,14 @@ function WorkspacePicker({
|
|
|
17232
17423
|
))
|
|
17233
17424
|
] }, section.organizationId);
|
|
17234
17425
|
};
|
|
17235
|
-
return /* @__PURE__ */ (0,
|
|
17426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
17236
17427
|
"div",
|
|
17237
17428
|
{
|
|
17238
17429
|
className: "flex flex-col w-full",
|
|
17239
17430
|
style: { maxWidth: 520, gap: T19.sp5xl, fontFamily: T19.font },
|
|
17240
17431
|
children: [
|
|
17241
|
-
/* @__PURE__ */ (0,
|
|
17242
|
-
/* @__PURE__ */ (0,
|
|
17432
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
|
|
17433
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17243
17434
|
"p",
|
|
17244
17435
|
{
|
|
17245
17436
|
style: {
|
|
@@ -17252,9 +17443,9 @@ function WorkspacePicker({
|
|
|
17252
17443
|
children: "Choose your workspaces"
|
|
17253
17444
|
}
|
|
17254
17445
|
),
|
|
17255
|
-
/* @__PURE__ */ (0,
|
|
17446
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { style: { color: T19.muted, fontSize: T19.fsSm, lineHeight: T19.lhSm, margin: 0 }, children: hasWorkspaces || loading ? canCreate ? `Join one or more workspaces in ${orgLabel} as a member, or create your own.` : `Join one or more workspaces in ${orgLabel} as a member.` : canCreate ? `There are no workspaces to join in ${orgLabel} yet. Create one to get started.` : `There are no workspaces you can join in ${orgLabel} yet. Ask an admin${grouped ? "" : ` of ${orgLabel}`} to invite you to one.` })
|
|
17256
17447
|
] }),
|
|
17257
|
-
(loading || hasWorkspaces) && /* @__PURE__ */ (0,
|
|
17448
|
+
(loading || hasWorkspaces) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17258
17449
|
"div",
|
|
17259
17450
|
{
|
|
17260
17451
|
className: "flex flex-col w-full overflow-y-auto",
|
|
@@ -17264,7 +17455,7 @@ function WorkspacePicker({
|
|
|
17264
17455
|
border: `1px solid ${T19.borderSubtle}`,
|
|
17265
17456
|
borderRadius: T19.r3xl
|
|
17266
17457
|
},
|
|
17267
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
17458
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17268
17459
|
"div",
|
|
17269
17460
|
{
|
|
17270
17461
|
className: "flex items-center justify-center",
|
|
@@ -17274,9 +17465,9 @@ function WorkspacePicker({
|
|
|
17274
17465
|
) : grouped ? sections.map(groupSection) : sections[0].workspaces.map((w, index) => workspaceRow(w, index === 0))
|
|
17275
17466
|
}
|
|
17276
17467
|
),
|
|
17277
|
-
showCreate ? /* @__PURE__ */ (0,
|
|
17278
|
-
creatable.length > 1 && /* @__PURE__ */ (0,
|
|
17279
|
-
/* @__PURE__ */ (0,
|
|
17468
|
+
showCreate ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
|
|
17469
|
+
creatable.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
17470
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17280
17471
|
"label",
|
|
17281
17472
|
{
|
|
17282
17473
|
htmlFor: "workspace-picker-organization",
|
|
@@ -17284,7 +17475,7 @@ function WorkspacePicker({
|
|
|
17284
17475
|
children: "Organization"
|
|
17285
17476
|
}
|
|
17286
17477
|
),
|
|
17287
|
-
/* @__PURE__ */ (0,
|
|
17478
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17288
17479
|
"select",
|
|
17289
17480
|
{
|
|
17290
17481
|
id: "workspace-picker-organization",
|
|
@@ -17301,11 +17492,11 @@ function WorkspacePicker({
|
|
|
17301
17492
|
fontFamily: T19.font,
|
|
17302
17493
|
fontSize: T19.fsSm
|
|
17303
17494
|
},
|
|
17304
|
-
children: creatable.map((s) => /* @__PURE__ */ (0,
|
|
17495
|
+
children: creatable.map((s) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
|
|
17305
17496
|
}
|
|
17306
17497
|
)
|
|
17307
17498
|
] }),
|
|
17308
|
-
/* @__PURE__ */ (0,
|
|
17499
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17309
17500
|
"label",
|
|
17310
17501
|
{
|
|
17311
17502
|
htmlFor: "workspace-picker-name",
|
|
@@ -17313,7 +17504,7 @@ function WorkspacePicker({
|
|
|
17313
17504
|
children: "New workspace name"
|
|
17314
17505
|
}
|
|
17315
17506
|
),
|
|
17316
|
-
/* @__PURE__ */ (0,
|
|
17507
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17317
17508
|
"input",
|
|
17318
17509
|
{
|
|
17319
17510
|
id: "workspace-picker-name",
|
|
@@ -17337,12 +17528,12 @@ function WorkspacePicker({
|
|
|
17337
17528
|
}
|
|
17338
17529
|
}
|
|
17339
17530
|
),
|
|
17340
|
-
/* @__PURE__ */ (0,
|
|
17531
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
|
|
17341
17532
|
["shared", "Shared", `Anyone in ${createLabel} can join`],
|
|
17342
17533
|
["private", "Private", "Invite only"]
|
|
17343
17534
|
].map(([value, label, hint]) => {
|
|
17344
17535
|
const active = visibility === value;
|
|
17345
|
-
return /* @__PURE__ */ (0,
|
|
17536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
17346
17537
|
"div",
|
|
17347
17538
|
{
|
|
17348
17539
|
role: "radio",
|
|
@@ -17363,7 +17554,7 @@ function WorkspacePicker({
|
|
|
17363
17554
|
border: `1px solid ${active ? T19.primary : T19.borderSubtle}`
|
|
17364
17555
|
},
|
|
17365
17556
|
children: [
|
|
17366
|
-
/* @__PURE__ */ (0,
|
|
17557
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17367
17558
|
"span",
|
|
17368
17559
|
{
|
|
17369
17560
|
style: {
|
|
@@ -17375,14 +17566,14 @@ function WorkspacePicker({
|
|
|
17375
17566
|
children: label
|
|
17376
17567
|
}
|
|
17377
17568
|
),
|
|
17378
|
-
/* @__PURE__ */ (0,
|
|
17569
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
|
|
17379
17570
|
]
|
|
17380
17571
|
},
|
|
17381
17572
|
value
|
|
17382
17573
|
);
|
|
17383
17574
|
}) }),
|
|
17384
|
-
/* @__PURE__ */ (0,
|
|
17385
|
-
hasWorkspaces && /* @__PURE__ */ (0,
|
|
17575
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
|
|
17576
|
+
hasWorkspaces && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17386
17577
|
import_ui25.ScButton,
|
|
17387
17578
|
{
|
|
17388
17579
|
text: "Back",
|
|
@@ -17391,7 +17582,7 @@ function WorkspacePicker({
|
|
|
17391
17582
|
onClick: () => setCreating(false)
|
|
17392
17583
|
}
|
|
17393
17584
|
),
|
|
17394
|
-
/* @__PURE__ */ (0,
|
|
17585
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17395
17586
|
import_ui25.ScButton,
|
|
17396
17587
|
{
|
|
17397
17588
|
text: busy ? "Creating\u2026" : "Create workspace",
|
|
@@ -17402,8 +17593,8 @@ function WorkspacePicker({
|
|
|
17402
17593
|
}
|
|
17403
17594
|
)
|
|
17404
17595
|
] })
|
|
17405
|
-
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ (0,
|
|
17406
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
17596
|
+
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
|
|
17597
|
+
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17407
17598
|
import_ui25.ScButton,
|
|
17408
17599
|
{
|
|
17409
17600
|
text: "Create a workspace",
|
|
@@ -17412,8 +17603,8 @@ function WorkspacePicker({
|
|
|
17412
17603
|
state: loading || busy ? "disabled" : "default",
|
|
17413
17604
|
onClick: loading || busy ? void 0 : () => setCreating(true)
|
|
17414
17605
|
}
|
|
17415
|
-
) : /* @__PURE__ */ (0,
|
|
17416
|
-
/* @__PURE__ */ (0,
|
|
17606
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", {}),
|
|
17607
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17417
17608
|
import_ui25.ScButton,
|
|
17418
17609
|
{
|
|
17419
17610
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} workspaces` : "Join workspace",
|
|
@@ -17432,7 +17623,7 @@ function WorkspacePicker({
|
|
|
17432
17623
|
// src/organization-picker.tsx
|
|
17433
17624
|
var import_react29 = require("react");
|
|
17434
17625
|
var import_ui26 = require("@streamoid/ui");
|
|
17435
|
-
var
|
|
17626
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
17436
17627
|
var T20 = {
|
|
17437
17628
|
primary: "var(--alias-text---icons-primary)",
|
|
17438
17629
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17492,18 +17683,18 @@ function OrganizationPicker({
|
|
|
17492
17683
|
const heading = choosing ? "Choose your organization" : "Create your organization";
|
|
17493
17684
|
const subheading = choosing ? `${companyDomain ?? "Your company"} has more than one organization. Pick the ones to join as a member.` : publicDomain ? "Create an organization for your team. Or, if your team already uses Streamoid, ask them to invite you." : `Nobody from ${companyDomain ?? "your company"} has set up an organization you can join yet. Create one; you'll be its admin.`;
|
|
17494
17685
|
const textStyle = { margin: 0, fontFamily: T20.font };
|
|
17495
|
-
return /* @__PURE__ */ (0,
|
|
17686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
17496
17687
|
"div",
|
|
17497
17688
|
{
|
|
17498
17689
|
className: "flex flex-col w-full",
|
|
17499
17690
|
style: { maxWidth: 520, gap: T20.sp5xl, fontFamily: T20.font },
|
|
17500
17691
|
children: [
|
|
17501
|
-
/* @__PURE__ */ (0,
|
|
17502
|
-
/* @__PURE__ */ (0,
|
|
17503
|
-
/* @__PURE__ */ (0,
|
|
17692
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
|
|
17693
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
|
|
17694
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
|
|
17504
17695
|
] }),
|
|
17505
|
-
!loading && choosing && /* @__PURE__ */ (0,
|
|
17506
|
-
/* @__PURE__ */ (0,
|
|
17696
|
+
!loading && choosing && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
17697
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17507
17698
|
"div",
|
|
17508
17699
|
{
|
|
17509
17700
|
role: "group",
|
|
@@ -17516,7 +17707,7 @@ function OrganizationPicker({
|
|
|
17516
17707
|
},
|
|
17517
17708
|
children: organizations.map((org, index) => {
|
|
17518
17709
|
const checked = selected.has(org._id);
|
|
17519
|
-
return /* @__PURE__ */ (0,
|
|
17710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
17520
17711
|
"div",
|
|
17521
17712
|
{
|
|
17522
17713
|
role: "checkbox",
|
|
@@ -17537,11 +17728,11 @@ function OrganizationPicker({
|
|
|
17537
17728
|
}
|
|
17538
17729
|
},
|
|
17539
17730
|
children: [
|
|
17540
|
-
/* @__PURE__ */ (0,
|
|
17541
|
-
/* @__PURE__ */ (0,
|
|
17542
|
-
/* @__PURE__ */ (0,
|
|
17543
|
-
/* @__PURE__ */ (0,
|
|
17544
|
-
org.domain && /* @__PURE__ */ (0,
|
|
17731
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ui26.ScCheckbox, { checked }),
|
|
17732
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
|
|
17733
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
17734
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
|
|
17735
|
+
org.domain && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
|
|
17545
17736
|
] })
|
|
17546
17737
|
]
|
|
17547
17738
|
},
|
|
@@ -17550,7 +17741,7 @@ function OrganizationPicker({
|
|
|
17550
17741
|
})
|
|
17551
17742
|
}
|
|
17552
17743
|
),
|
|
17553
|
-
/* @__PURE__ */ (0,
|
|
17744
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17554
17745
|
import_ui26.ScButton,
|
|
17555
17746
|
{
|
|
17556
17747
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} organizations` : "Join organization",
|
|
@@ -17561,10 +17752,10 @@ function OrganizationPicker({
|
|
|
17561
17752
|
}
|
|
17562
17753
|
) })
|
|
17563
17754
|
] }),
|
|
17564
|
-
!loading && !choosing && /* @__PURE__ */ (0,
|
|
17565
|
-
/* @__PURE__ */ (0,
|
|
17566
|
-
/* @__PURE__ */ (0,
|
|
17567
|
-
/* @__PURE__ */ (0,
|
|
17755
|
+
!loading && !choosing && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
|
|
17756
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
17757
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
|
|
17758
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17568
17759
|
"input",
|
|
17569
17760
|
{
|
|
17570
17761
|
id: "organization-picker-name",
|
|
@@ -17586,14 +17777,14 @@ function OrganizationPicker({
|
|
|
17586
17777
|
}
|
|
17587
17778
|
)
|
|
17588
17779
|
] }),
|
|
17589
|
-
!publicDomain && /* @__PURE__ */ (0,
|
|
17590
|
-
/* @__PURE__ */ (0,
|
|
17591
|
-
/* @__PURE__ */ (0,
|
|
17780
|
+
!publicDomain && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
17781
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
|
|
17782
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
|
|
17592
17783
|
["shared", "Shared"],
|
|
17593
17784
|
["private", "Private"]
|
|
17594
17785
|
].map(([value, label]) => {
|
|
17595
17786
|
const active = type === value;
|
|
17596
|
-
return /* @__PURE__ */ (0,
|
|
17787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17597
17788
|
"div",
|
|
17598
17789
|
{
|
|
17599
17790
|
role: "radio",
|
|
@@ -17612,12 +17803,12 @@ function OrganizationPicker({
|
|
|
17612
17803
|
borderRadius: T20.r3xl,
|
|
17613
17804
|
border: `1px solid ${active ? T20.primary : T20.borderSubtle}`
|
|
17614
17805
|
},
|
|
17615
|
-
children: /* @__PURE__ */ (0,
|
|
17806
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
|
|
17616
17807
|
},
|
|
17617
17808
|
value
|
|
17618
17809
|
);
|
|
17619
17810
|
}) }),
|
|
17620
|
-
/* @__PURE__ */ (0,
|
|
17811
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17621
17812
|
"span",
|
|
17622
17813
|
{
|
|
17623
17814
|
"data-testid": "organization-visibility-message",
|
|
@@ -17627,7 +17818,7 @@ function OrganizationPicker({
|
|
|
17627
17818
|
}
|
|
17628
17819
|
)
|
|
17629
17820
|
] }),
|
|
17630
|
-
/* @__PURE__ */ (0,
|
|
17821
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17631
17822
|
import_ui26.ScButton,
|
|
17632
17823
|
{
|
|
17633
17824
|
text: busy ? "Creating\u2026" : "Create organization",
|
|
@@ -17735,18 +17926,18 @@ var app_settings_page_default = {
|
|
|
17735
17926
|
};
|
|
17736
17927
|
|
|
17737
17928
|
// src/app-settings-page.tsx
|
|
17738
|
-
var
|
|
17929
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
17739
17930
|
function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }) {
|
|
17740
|
-
return /* @__PURE__ */ (0,
|
|
17741
|
-
/* @__PURE__ */ (0,
|
|
17742
|
-
/* @__PURE__ */ (0,
|
|
17743
|
-
/* @__PURE__ */ (0,
|
|
17931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("header", { className: app_settings_page_default.header, children: [
|
|
17932
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h1", { children: "App settings" }),
|
|
17933
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: app_settings_page_default.actions, children: [
|
|
17934
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("a", { href: administrationHref, onClick: (event) => {
|
|
17744
17935
|
if (onOpenAdministration && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17745
17936
|
event.preventDefault();
|
|
17746
17937
|
onOpenAdministration();
|
|
17747
17938
|
}
|
|
17748
17939
|
}, children: "Account and workspace settings" }),
|
|
17749
|
-
onClose ? /* @__PURE__ */ (0,
|
|
17940
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "button", className: app_settings_page_default.close, "aria-label": "Close App settings", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons20.SiconX, { size: 20, "aria-hidden": "true" }) }) : null
|
|
17750
17941
|
] })
|
|
17751
17942
|
] });
|
|
17752
17943
|
}
|
|
@@ -17758,43 +17949,43 @@ function AppSettingsPage({
|
|
|
17758
17949
|
emptyDescription = "Account, workspace and organization settings are available above.",
|
|
17759
17950
|
children
|
|
17760
17951
|
}) {
|
|
17761
|
-
return /* @__PURE__ */ (0,
|
|
17762
|
-
/* @__PURE__ */ (0,
|
|
17763
|
-
children ?? /* @__PURE__ */ (0,
|
|
17764
|
-
/* @__PURE__ */ (0,
|
|
17765
|
-
/* @__PURE__ */ (0,
|
|
17952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: app_settings_page_default.page, children: [
|
|
17953
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
|
|
17954
|
+
children ?? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
|
|
17955
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", { children: emptyTitle }),
|
|
17956
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { children: emptyDescription })
|
|
17766
17957
|
] })
|
|
17767
17958
|
] });
|
|
17768
17959
|
}
|
|
17769
17960
|
function AppSettingsSection({ title, action, children }) {
|
|
17770
|
-
return /* @__PURE__ */ (0,
|
|
17771
|
-
/* @__PURE__ */ (0,
|
|
17772
|
-
/* @__PURE__ */ (0,
|
|
17773
|
-
action ? /* @__PURE__ */ (0,
|
|
17961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("section", { className: app_settings_page_default.section, "aria-label": title, children: [
|
|
17962
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: app_settings_page_default.sectionHeader, children: [
|
|
17963
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", { children: title }),
|
|
17964
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: app_settings_page_default.sectionAction, children: action }) : null
|
|
17774
17965
|
] }),
|
|
17775
|
-
/* @__PURE__ */ (0,
|
|
17966
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children })
|
|
17776
17967
|
] });
|
|
17777
17968
|
}
|
|
17778
17969
|
function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }) {
|
|
17779
17970
|
const reasonId = (0, import_react31.useId)();
|
|
17780
|
-
const content = /* @__PURE__ */ (0,
|
|
17781
|
-
/* @__PURE__ */ (0,
|
|
17782
|
-
/* @__PURE__ */ (0,
|
|
17783
|
-
description ? /* @__PURE__ */ (0,
|
|
17971
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
17972
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: app_settings_page_default.rowCopy, children: [
|
|
17973
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: app_settings_page_default.rowTitle, children: title }),
|
|
17974
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: app_settings_page_default.rowDescription, children: description }) : null
|
|
17784
17975
|
] }),
|
|
17785
|
-
summary || trailing || href || onClick ? /* @__PURE__ */ (0,
|
|
17976
|
+
summary || trailing || href || onClick ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: app_settings_page_default.rowEnd, children: [
|
|
17786
17977
|
summary,
|
|
17787
|
-
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ (0,
|
|
17978
|
+
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons20.SiconArrowRight, { size: 18, "aria-hidden": "true" }) : null)
|
|
17788
17979
|
] }) : null,
|
|
17789
|
-
disabledReason ? /* @__PURE__ */ (0,
|
|
17980
|
+
disabledReason ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
|
|
17790
17981
|
] });
|
|
17791
17982
|
const props = { className: app_settings_page_default.row, "aria-label": ariaLabel, "aria-describedby": disabledReason ? reasonId : void 0 };
|
|
17792
|
-
if (href && !disabled) return /* @__PURE__ */ (0,
|
|
17983
|
+
if (href && !disabled) return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("a", { ...props, href, onClick: (event) => {
|
|
17793
17984
|
if (onClick && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17794
17985
|
event.preventDefault();
|
|
17795
17986
|
onClick();
|
|
17796
17987
|
}
|
|
17797
17988
|
}, children: content });
|
|
17798
|
-
if (onClick || disabled) return /* @__PURE__ */ (0,
|
|
17799
|
-
return /* @__PURE__ */ (0,
|
|
17989
|
+
if (onClick || disabled) return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { ...props, type: "button", disabled, onClick, children: content });
|
|
17990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { ...props, children: content });
|
|
17800
17991
|
}
|