@replicated/portal-components 0.0.19 → 0.0.21

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.
Files changed (244) hide show
  1. package/components/metadata/registry.json +2 -2
  2. package/components/metadata/registry.md +2 -2
  3. package/dist/actions/change-team.js +66 -7
  4. package/dist/actions/change-team.js.map +1 -1
  5. package/dist/actions/index.d.mts +3 -1
  6. package/dist/actions/index.d.ts +3 -1
  7. package/dist/actions/index.js +182 -465
  8. package/dist/actions/index.js.map +1 -1
  9. package/dist/actions/install-actions.d.mts +3 -1
  10. package/dist/actions/install-actions.d.ts +3 -1
  11. package/dist/actions/install-actions.js +58 -5
  12. package/dist/actions/install-actions.js.map +1 -1
  13. package/dist/actions/service-account.d.mts +3 -1
  14. package/dist/actions/service-account.d.ts +3 -1
  15. package/dist/actions/service-account.js +58 -5
  16. package/dist/actions/service-account.js.map +1 -1
  17. package/dist/actions/support-bundles.d.mts +3 -1
  18. package/dist/actions/support-bundles.d.ts +3 -1
  19. package/dist/actions/support-bundles.js +58 -5
  20. package/dist/actions/support-bundles.js.map +1 -1
  21. package/dist/actions/team-settings.d.mts +3 -1
  22. package/dist/actions/team-settings.d.ts +3 -1
  23. package/dist/actions/team-settings.js +91 -27
  24. package/dist/actions/team-settings.js.map +1 -1
  25. package/dist/actions/trial-signup.d.mts +24 -0
  26. package/dist/actions/trial-signup.d.ts +24 -0
  27. package/dist/actions/trial-signup.js +482 -0
  28. package/dist/actions/trial-signup.js.map +1 -0
  29. package/dist/actions/user-settings.d.mts +3 -1
  30. package/dist/actions/user-settings.d.ts +3 -1
  31. package/dist/actions/user-settings.js +58 -5
  32. package/dist/actions/user-settings.js.map +1 -1
  33. package/dist/airgap-instances.d.mts +3 -1
  34. package/dist/airgap-instances.d.ts +3 -1
  35. package/dist/airgap-instances.js +41 -112
  36. package/dist/airgap-instances.js.map +1 -1
  37. package/dist/branding-BsMSywts.d.mts +36 -0
  38. package/dist/branding-BsMSywts.d.ts +36 -0
  39. package/dist/error-page.js +10 -2
  40. package/dist/error-page.js.map +1 -1
  41. package/dist/error.js +10 -2
  42. package/dist/error.js.map +1 -1
  43. package/dist/esm/actions/change-team.js +66 -7
  44. package/dist/esm/actions/change-team.js.map +1 -1
  45. package/dist/esm/actions/index.js +181 -462
  46. package/dist/esm/actions/index.js.map +1 -1
  47. package/dist/esm/actions/install-actions.js +58 -5
  48. package/dist/esm/actions/install-actions.js.map +1 -1
  49. package/dist/esm/actions/service-account.js +58 -5
  50. package/dist/esm/actions/service-account.js.map +1 -1
  51. package/dist/esm/actions/support-bundles.js +58 -5
  52. package/dist/esm/actions/support-bundles.js.map +1 -1
  53. package/dist/esm/actions/team-settings.js +91 -27
  54. package/dist/esm/actions/team-settings.js.map +1 -1
  55. package/dist/esm/actions/trial-signup.js +478 -0
  56. package/dist/esm/actions/trial-signup.js.map +1 -0
  57. package/dist/esm/actions/user-settings.js +58 -5
  58. package/dist/esm/actions/user-settings.js.map +1 -1
  59. package/dist/esm/airgap-instances.js +40 -112
  60. package/dist/esm/airgap-instances.js.map +1 -1
  61. package/dist/esm/error-page.js +10 -2
  62. package/dist/esm/error-page.js.map +1 -1
  63. package/dist/esm/error.js +10 -2
  64. package/dist/esm/error.js.map +1 -1
  65. package/dist/esm/helm-install-wizard.js +118 -79
  66. package/dist/esm/helm-install-wizard.js.map +1 -1
  67. package/dist/esm/index.js +706 -438
  68. package/dist/esm/index.js.map +1 -1
  69. package/dist/esm/install-actions.js +40 -5
  70. package/dist/esm/install-actions.js.map +1 -1
  71. package/dist/esm/install-card.js +9 -6
  72. package/dist/esm/install-card.js.map +1 -1
  73. package/dist/esm/install-targets.js +9 -2
  74. package/dist/esm/install-targets.js.map +1 -1
  75. package/dist/esm/instance-card.js +39 -111
  76. package/dist/esm/instance-card.js.map +1 -1
  77. package/dist/esm/join-team.js +9 -3
  78. package/dist/esm/join-team.js.map +1 -1
  79. package/dist/esm/license-card.js +24 -22
  80. package/dist/esm/license-card.js.map +1 -1
  81. package/dist/esm/license-details.js +128 -334
  82. package/dist/esm/license-details.js.map +1 -1
  83. package/dist/esm/linux-install-wizard.js +95 -41
  84. package/dist/esm/linux-install-wizard.js.map +1 -1
  85. package/dist/esm/login.js +20 -4
  86. package/dist/esm/login.js.map +1 -1
  87. package/dist/esm/middleware.js +33 -0
  88. package/dist/esm/middleware.js.map +1 -0
  89. package/dist/esm/online-instance-list.js +40 -112
  90. package/dist/esm/online-instance-list.js.map +1 -1
  91. package/dist/esm/release-history-panel.js +27 -14
  92. package/dist/esm/release-history-panel.js.map +1 -1
  93. package/dist/esm/saml-callback-client.js +82 -0
  94. package/dist/esm/saml-callback-client.js.map +1 -0
  95. package/dist/esm/saml-handlers.js +138 -0
  96. package/dist/esm/saml-handlers.js.map +1 -0
  97. package/dist/esm/security-card.js +53 -38
  98. package/dist/esm/security-card.js.map +1 -1
  99. package/dist/esm/service-accounts-tab.js +800 -0
  100. package/dist/esm/service-accounts-tab.js.map +1 -0
  101. package/dist/esm/support-bundle-collection-card.js +48 -24
  102. package/dist/esm/support-bundle-collection-card.js.map +1 -1
  103. package/dist/esm/support-bundles-card.js +10 -5
  104. package/dist/esm/support-bundles-card.js.map +1 -1
  105. package/dist/esm/support-card.js +37 -5
  106. package/dist/esm/support-card.js.map +1 -1
  107. package/dist/esm/team-selection.js +5 -1
  108. package/dist/esm/team-selection.js.map +1 -1
  109. package/dist/esm/team-settings-card.js +5 -2
  110. package/dist/esm/team-settings-card.js.map +1 -1
  111. package/dist/esm/team-settings.js +7 -2
  112. package/dist/esm/team-settings.js.map +1 -1
  113. package/dist/esm/top-nav-user-menu.js +5 -1
  114. package/dist/esm/top-nav-user-menu.js.map +1 -1
  115. package/dist/esm/top-nav.js +175 -62
  116. package/dist/esm/top-nav.js.map +1 -1
  117. package/dist/esm/trial-signup.js +256 -0
  118. package/dist/esm/trial-signup.js.map +1 -0
  119. package/dist/esm/update-layout.js +175 -62
  120. package/dist/esm/update-layout.js.map +1 -1
  121. package/dist/esm/updates-card.js +15 -4
  122. package/dist/esm/updates-card.js.map +1 -1
  123. package/dist/esm/upload-support-bundle-modal.js +9 -4
  124. package/dist/esm/upload-support-bundle-modal.js.map +1 -1
  125. package/dist/esm/user-settings-card.js +5 -2
  126. package/dist/esm/user-settings-card.js.map +1 -1
  127. package/dist/esm/user-settings.js +12 -6
  128. package/dist/esm/user-settings.js.map +1 -1
  129. package/dist/esm/utils/index.js +204 -13
  130. package/dist/esm/utils/index.js.map +1 -1
  131. package/dist/fetch-license-iTyF7_GY.d.mts +81 -0
  132. package/dist/fetch-license-iTyF7_GY.d.ts +81 -0
  133. package/dist/helm-install-wizard.d.mts +11 -3
  134. package/dist/helm-install-wizard.d.ts +11 -3
  135. package/dist/helm-install-wizard.js +118 -79
  136. package/dist/helm-install-wizard.js.map +1 -1
  137. package/dist/{index-BAiVrSSR.d.mts → index-DyzJ0yKD.d.mts} +48 -50
  138. package/dist/{index-DWt-N5od.d.ts → index-sMbq94M7.d.ts} +48 -50
  139. package/dist/index.d.mts +8 -2
  140. package/dist/index.d.ts +8 -2
  141. package/dist/index.js +726 -438
  142. package/dist/index.js.map +1 -1
  143. package/dist/install-actions.d.mts +4 -2
  144. package/dist/install-actions.d.ts +4 -2
  145. package/dist/install-actions.js +40 -5
  146. package/dist/install-actions.js.map +1 -1
  147. package/dist/install-card.d.mts +2 -3
  148. package/dist/install-card.d.ts +2 -3
  149. package/dist/install-card.js +9 -6
  150. package/dist/install-card.js.map +1 -1
  151. package/dist/install-targets.js +9 -2
  152. package/dist/install-targets.js.map +1 -1
  153. package/dist/instance-card.d.mts +3 -1
  154. package/dist/instance-card.d.ts +3 -1
  155. package/dist/instance-card.js +40 -111
  156. package/dist/instance-card.js.map +1 -1
  157. package/dist/join-team.js +9 -3
  158. package/dist/join-team.js.map +1 -1
  159. package/dist/license-card.d.mts +2 -3
  160. package/dist/license-card.d.ts +2 -3
  161. package/dist/license-card.js +24 -22
  162. package/dist/license-card.js.map +1 -1
  163. package/dist/license-details.js +128 -334
  164. package/dist/license-details.js.map +1 -1
  165. package/dist/linux-install-wizard.d.mts +9 -3
  166. package/dist/linux-install-wizard.d.ts +9 -3
  167. package/dist/linux-install-wizard.js +95 -41
  168. package/dist/linux-install-wizard.js.map +1 -1
  169. package/dist/login.d.mts +4 -0
  170. package/dist/login.d.ts +4 -0
  171. package/dist/login.js +20 -4
  172. package/dist/login.js.map +1 -1
  173. package/dist/middleware.d.mts +13 -0
  174. package/dist/middleware.d.ts +13 -0
  175. package/dist/middleware.js +35 -0
  176. package/dist/middleware.js.map +1 -0
  177. package/dist/online-instance-list.d.mts +3 -1
  178. package/dist/online-instance-list.d.ts +3 -1
  179. package/dist/online-instance-list.js +41 -112
  180. package/dist/online-instance-list.js.map +1 -1
  181. package/dist/pending-installations.d.mts +3 -1
  182. package/dist/pending-installations.d.ts +3 -1
  183. package/dist/release-history-panel.js +27 -14
  184. package/dist/release-history-panel.js.map +1 -1
  185. package/dist/saml-callback-client.d.mts +36 -0
  186. package/dist/saml-callback-client.d.ts +36 -0
  187. package/dist/saml-callback-client.js +88 -0
  188. package/dist/saml-callback-client.js.map +1 -0
  189. package/dist/saml-handlers.d.mts +50 -0
  190. package/dist/saml-handlers.d.ts +50 -0
  191. package/dist/saml-handlers.js +141 -0
  192. package/dist/saml-handlers.js.map +1 -0
  193. package/dist/security-card.d.mts +3 -1
  194. package/dist/security-card.d.ts +3 -1
  195. package/dist/security-card.js +53 -38
  196. package/dist/security-card.js.map +1 -1
  197. package/dist/service-accounts-tab.d.mts +51 -0
  198. package/dist/service-accounts-tab.d.ts +51 -0
  199. package/dist/service-accounts-tab.js +802 -0
  200. package/dist/service-accounts-tab.js.map +1 -0
  201. package/dist/styles.css +375 -127
  202. package/dist/support-bundle-collection-card.d.mts +1 -1
  203. package/dist/support-bundle-collection-card.d.ts +1 -1
  204. package/dist/support-bundle-collection-card.js +47 -23
  205. package/dist/support-bundle-collection-card.js.map +1 -1
  206. package/dist/support-bundles-card.d.mts +4 -2
  207. package/dist/support-bundles-card.d.ts +4 -2
  208. package/dist/support-bundles-card.js +10 -5
  209. package/dist/support-bundles-card.js.map +1 -1
  210. package/dist/support-card.js +37 -5
  211. package/dist/support-card.js.map +1 -1
  212. package/dist/team-selection.js +5 -1
  213. package/dist/team-selection.js.map +1 -1
  214. package/dist/team-settings-card.js +5 -2
  215. package/dist/team-settings-card.js.map +1 -1
  216. package/dist/team-settings.js +7 -2
  217. package/dist/team-settings.js.map +1 -1
  218. package/dist/{top-nav-IRIn66wS.d.ts → top-nav-BUQAGoG1.d.mts} +14 -2
  219. package/dist/{top-nav-IRIn66wS.d.mts → top-nav-CEqw0KpO.d.ts} +14 -2
  220. package/dist/top-nav-user-menu.js +5 -1
  221. package/dist/top-nav-user-menu.js.map +1 -1
  222. package/dist/top-nav.d.mts +2 -1
  223. package/dist/top-nav.d.ts +2 -1
  224. package/dist/top-nav.js +175 -62
  225. package/dist/top-nav.js.map +1 -1
  226. package/dist/trial-signup.d.mts +31 -0
  227. package/dist/trial-signup.d.ts +31 -0
  228. package/dist/trial-signup.js +258 -0
  229. package/dist/trial-signup.js.map +1 -0
  230. package/dist/update-layout.js +175 -62
  231. package/dist/update-layout.js.map +1 -1
  232. package/dist/updates-card.js +15 -4
  233. package/dist/updates-card.js.map +1 -1
  234. package/dist/upload-support-bundle-modal.js +9 -4
  235. package/dist/upload-support-bundle-modal.js.map +1 -1
  236. package/dist/user-settings-card.js +5 -2
  237. package/dist/user-settings-card.js.map +1 -1
  238. package/dist/user-settings.js +12 -6
  239. package/dist/user-settings.js.map +1 -1
  240. package/dist/utils/index.d.mts +74 -16
  241. package/dist/utils/index.d.ts +74 -16
  242. package/dist/utils/index.js +215 -12
  243. package/dist/utils/index.js.map +1 -1
  244. package/package.json +37 -2
@@ -6,7 +6,40 @@ import { Buffer } from 'buffer';
6
6
  * Enterprise Portal Components
7
7
  * This file is generated by tsup. Do not edit manually.
8
8
  */
9
+ var __defProp = Object.defineProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+
15
+ // datadog/tracer.ts
16
+ var tracer_exports = {};
17
+ __export(tracer_exports, {
18
+ default: () => tracer_default
19
+ });
20
+ var tracer_default;
9
21
 
22
+ // src/utils/constants.ts
23
+ var DEFAULT_SECONDARY_COLOR = "#6366f1";
24
+ function useCopyToClipboard(resetDelay = 2e3) {
25
+ const [copied, setCopied] = useState(false);
26
+ const copy = useCallback(async (text) => {
27
+ if (!navigator.clipboard) {
28
+ console.warn("[useCopyToClipboard] Clipboard API not available");
29
+ return false;
30
+ }
31
+ try {
32
+ await navigator.clipboard.writeText(text);
33
+ setCopied(true);
34
+ setTimeout(() => setCopied(false), resetDelay);
35
+ return true;
36
+ } catch (error) {
37
+ console.error("[useCopyToClipboard] Failed to copy:", error);
38
+ return false;
39
+ }
40
+ }, [resetDelay]);
41
+ return { copy, copied };
42
+ }
10
43
  var LINUX_INSTALL_SERVICE_ACCOUNT_KEY = "linux_install_service_account";
11
44
  var LINUX_INSTALL_OPTIONS_KEY = "linux_install_options";
12
45
  var navigateTo = (href) => {
@@ -19,19 +52,12 @@ var navigateTo = (href) => {
19
52
  console.error("[linux-install-wizard] navigation failed", error);
20
53
  }
21
54
  };
22
- var copyToClipboard = async (text) => {
23
- try {
24
- await navigator.clipboard.writeText(text);
25
- return true;
26
- } catch {
27
- return false;
28
- }
29
- };
30
- var StepIndicator = ({ step }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3", children: [
55
+ var StepIndicator = ({ step, primaryColor = DEFAULT_SECONDARY_COLOR }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3", children: [
31
56
  /* @__PURE__ */ jsx(
32
57
  "div",
33
58
  {
34
- className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step > 1 ? "border-gray-900 bg-gray-900 text-white" : "border-indigo-500"}`,
59
+ className: `flex h-10 w-10 items-center justify-center rounded-full border-2 ${step > 1 ? "border-gray-900 bg-gray-900 text-white" : ""}`,
60
+ style: step === 1 ? { borderColor: primaryColor } : void 0,
35
61
  children: step > 1 ? /* @__PURE__ */ jsx(
36
62
  "svg",
37
63
  {
@@ -43,7 +69,7 @@ var StepIndicator = ({ step }) => /* @__PURE__ */ jsxs("div", { className: "flex
43
69
  strokeWidth: "2",
44
70
  children: /* @__PURE__ */ jsx("path", { d: "m3.5 8 3 3 6-6" })
45
71
  }
46
- ) : /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full bg-indigo-500" })
72
+ ) : /* @__PURE__ */ jsx("span", { className: "h-2.5 w-2.5 rounded-full", style: { backgroundColor: primaryColor } })
47
73
  }
48
74
  ),
49
75
  /* @__PURE__ */ jsx("div", { className: `h-0.5 w-12 ${step > 1 ? "bg-gray-900" : "bg-gray-200"}` }),
@@ -59,13 +85,11 @@ var CodeBlock = ({
59
85
  command,
60
86
  onCopy
61
87
  }) => {
62
- const [copied, setCopied] = useState(false);
88
+ const { copy, copied } = useCopyToClipboard();
63
89
  const handleCopy = async () => {
64
- const success = await copyToClipboard(command);
90
+ const success = await copy(command);
65
91
  if (success) {
66
- setCopied(true);
67
92
  onCopy?.();
68
- setTimeout(() => setCopied(false), 2e3);
69
93
  }
70
94
  };
71
95
  return /* @__PURE__ */ jsxs("div", { className: "group relative ml-8 mt-2 min-w-0", children: [
@@ -87,11 +111,12 @@ var VersionDropdown = ({
87
111
  selectedRelease,
88
112
  onSelect,
89
113
  isLoading,
90
- error
114
+ error,
115
+ primaryColor = DEFAULT_SECONDARY_COLOR
91
116
  }) => {
92
117
  if (isLoading) {
93
118
  return /* @__PURE__ */ jsxs("div", { className: "ml-8 flex items-center gap-2 text-sm text-gray-500", children: [
94
- /* @__PURE__ */ jsx("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-indigo-500" }),
119
+ /* @__PURE__ */ jsx("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-gray-300", style: { borderTopColor: primaryColor } }),
95
120
  "Loading versions..."
96
121
  ] });
97
122
  }
@@ -131,13 +156,14 @@ var InstallationInstructions = ({
131
156
  instructions,
132
157
  isLoading,
133
158
  completedSteps = {},
134
- isProxy = false
159
+ isProxy = false,
160
+ primaryColor = DEFAULT_SECONDARY_COLOR
135
161
  }) => {
136
162
  if (isLoading && !instructions?.steps?.length) {
137
163
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
138
164
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-gray-900", children: "Installation Instructions" }),
139
165
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-500", children: [
140
- /* @__PURE__ */ jsx("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-indigo-500" }),
166
+ /* @__PURE__ */ jsx("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-gray-300", style: { borderTopColor: primaryColor } }),
141
167
  "Loading instructions..."
142
168
  ] })
143
169
  ] });
@@ -147,10 +173,10 @@ var InstallationInstructions = ({
147
173
  }
148
174
  const stepOffset = isProxy ? 3 : 2;
149
175
  console.debug("[InstallationInstructions] Rendering with stepOffset", { isProxy, stepOffset, stepsCount: instructions?.steps?.length });
150
- return /* @__PURE__ */ jsxs("div", { className: `min-w-0 space-y-4 transition-opacity duration-150 ${isLoading ? "opacity-60" : ""}`, children: [
176
+ return /* @__PURE__ */ jsxs("div", { className: `min-w-0 space-y-4 transition-opacity duration-200 ${isLoading ? "opacity-60" : ""}`, children: [
151
177
  /* @__PURE__ */ jsxs("h3", { className: "text-lg font-semibold text-gray-900", children: [
152
178
  "Installation Instructions",
153
- isLoading && /* @__PURE__ */ jsx("span", { className: "ml-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-indigo-500" })
179
+ isLoading && /* @__PURE__ */ jsx("span", { className: "ml-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300", style: { borderTopColor: primaryColor } })
154
180
  ] }),
155
181
  /* @__PURE__ */ jsx("ol", { className: "min-w-0 space-y-6 text-sm text-gray-700", children: instructions.steps.map((step, index) => {
156
182
  const completableStepNames = ["download_assets", "install"];
@@ -158,7 +184,7 @@ var InstallationInstructions = ({
158
184
  const isCompleted = canComplete && completedSteps[step.step_name];
159
185
  return /* @__PURE__ */ jsxs("li", { className: "space-y-2", children: [
160
186
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
161
- /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-100 font-semibold text-indigo-500", children: index + stepOffset }),
187
+ /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full font-semibold", style: { backgroundColor: `${primaryColor}20`, color: primaryColor }, children: index + stepOffset }),
162
188
  /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: step.title }),
163
189
  canComplete && /* @__PURE__ */ jsx(
164
190
  "span",
@@ -177,6 +203,8 @@ var InstallationInstructions = ({
177
203
  };
178
204
  var LinuxInstallWizard = ({
179
205
  token,
206
+ primaryColor = DEFAULT_SECONDARY_COLOR,
207
+ secondaryColor = DEFAULT_SECONDARY_COLOR,
180
208
  createServiceAccountAction,
181
209
  fetchChannelReleasesAction,
182
210
  createInstallOptionsAction,
@@ -608,7 +636,7 @@ var LinuxInstallWizard = ({
608
636
  console.error("[linux-install-wizard] Failed to save admin console URL", error);
609
637
  }
610
638
  }
611
- navigateTo("/update");
639
+ navigateTo("/updates/checking");
612
640
  }, [installOptionsId, updateInstallOptionsAction, adminConsoleUrl, token]);
613
641
  const handleReleaseSelect = useCallback((release) => {
614
642
  setSelectedRelease(release);
@@ -616,14 +644,14 @@ var LinuxInstallWizard = ({
616
644
  const isProxy = networkAvailability === "proxy";
617
645
  if (step === 2) {
618
646
  return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
619
- /* @__PURE__ */ jsx(StepIndicator, { step: 2 }),
647
+ /* @__PURE__ */ jsx(StepIndicator, { step: 2, primaryColor }),
620
648
  /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-2xl border border-gray-100 bg-gray-50 p-6", children: /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-6", children: [
621
649
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
622
650
  /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-gray-900", children: isProxy ? "Linux Single Node Proxy Install" : "Linux Single Node Online Install" }),
623
651
  /* @__PURE__ */ jsxs("div", { className: "mt-6 space-y-6", children: [
624
652
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
625
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-indigo-500", children: [
626
- /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-100 font-semibold", children: "1" }),
653
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", style: { color: primaryColor }, children: [
654
+ /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full font-semibold", style: { backgroundColor: `${primaryColor}20` }, children: "1" }),
627
655
  /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: "Select a version" })
628
656
  ] }),
629
657
  /* @__PURE__ */ jsx(
@@ -633,13 +661,14 @@ var LinuxInstallWizard = ({
633
661
  selectedRelease,
634
662
  onSelect: handleReleaseSelect,
635
663
  isLoading: isLoadingReleases,
636
- error: releasesError
664
+ error: releasesError,
665
+ primaryColor
637
666
  }
638
667
  )
639
668
  ] }),
640
669
  isProxy && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
641
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-indigo-500", children: [
642
- /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-100 font-semibold", children: "2" }),
670
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", style: { color: primaryColor }, children: [
671
+ /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full font-semibold", style: { backgroundColor: `${primaryColor}20` }, children: "2" }),
643
672
  /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: "Configure proxy URL" })
644
673
  ] }),
645
674
  /* @__PURE__ */ jsx(
@@ -658,12 +687,13 @@ var LinuxInstallWizard = ({
658
687
  instructions,
659
688
  isLoading: isLoadingInstructions,
660
689
  completedSteps,
661
- isProxy
690
+ isProxy,
691
+ primaryColor
662
692
  }
663
693
  ),
664
694
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
665
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-indigo-500", children: [
666
- /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-indigo-100 font-semibold", children: (instructions?.steps?.length ?? 0) + (isProxy ? 3 : 2) }),
695
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", style: { color: primaryColor }, children: [
696
+ /* @__PURE__ */ jsx("span", { className: "flex h-6 w-6 items-center justify-center rounded-full font-semibold", style: { backgroundColor: `${primaryColor}20` }, children: (instructions?.steps?.length ?? 0) + (isProxy ? 3 : 2) }),
667
697
  /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: "(Optional) Add the Admin Console URL" })
668
698
  ] }),
669
699
  /* @__PURE__ */ jsx(
@@ -695,7 +725,8 @@ var LinuxInstallWizard = ({
695
725
  {
696
726
  type: "button",
697
727
  onClick: handleFinish,
698
- className: "rounded-xl bg-indigo-500 px-4 py-2 font-medium text-white transition hover:bg-indigo-600",
728
+ className: "rounded-xl px-4 py-2 font-medium text-white transition hover:brightness-90",
729
+ style: { backgroundColor: primaryColor },
699
730
  children: "Finish"
700
731
  }
701
732
  )
@@ -706,7 +737,8 @@ var LinuxInstallWizard = ({
706
737
  /* @__PURE__ */ jsx(
707
738
  "a",
708
739
  {
709
- className: "text-indigo-500 hover:text-indigo-600",
740
+ className: "hover:opacity-80",
741
+ style: { color: secondaryColor },
710
742
  href: supportPortalLink,
711
743
  target: "_blank",
712
744
  rel: "noopener noreferrer",
@@ -718,7 +750,7 @@ var LinuxInstallWizard = ({
718
750
  ] });
719
751
  }
720
752
  return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
721
- /* @__PURE__ */ jsx(StepIndicator, { step: 1 }),
753
+ /* @__PURE__ */ jsx(StepIndicator, { step: 1, primaryColor }),
722
754
  /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-gray-100 bg-gray-50 p-6", children: [
723
755
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
724
756
  /* @__PURE__ */ jsxs("label", { className: "block text-sm font-medium text-gray-700", children: [
@@ -787,7 +819,8 @@ var LinuxInstallWizard = ({
787
819
  type: "button",
788
820
  onClick: handleContinue,
789
821
  disabled: isCreatingServiceAccount,
790
- className: "rounded-xl bg-indigo-500 px-4 py-2 font-medium text-white transition hover:bg-indigo-600 disabled:cursor-not-allowed disabled:opacity-50",
822
+ className: "rounded-xl px-4 py-2 font-medium text-white transition-opacity duration-200 hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
823
+ style: { backgroundColor: primaryColor },
791
824
  children: isCreatingServiceAccount ? "Creating..." : "Continue"
792
825
  }
793
826
  )
@@ -820,8 +853,17 @@ async function handle401() {
820
853
  const { redirect } = await import('next/navigation');
821
854
  return redirect("/?expired=1");
822
855
  }
856
+ function isErrorPage(url) {
857
+ try {
858
+ const urlObj = new URL(url);
859
+ return urlObj.pathname === "/error";
860
+ } catch {
861
+ return url === "/error" || url.startsWith("/error?");
862
+ }
863
+ }
823
864
  async function handleServerError(statusCode) {
824
865
  const { redirect } = await import('next/navigation');
866
+ const { cookies } = await import('next/headers');
825
867
  let sourceUrl;
826
868
  try {
827
869
  const { headers } = await import('next/headers');
@@ -829,12 +871,20 @@ async function handleServerError(statusCode) {
829
871
  const referer = headersList.get("referer");
830
872
  const host = headersList.get("host");
831
873
  const pathname = headersList.get("x-invoke-path") || headersList.get("x-forwarded-path");
832
- if (referer) {
874
+ if (referer && !isErrorPage(referer)) {
833
875
  sourceUrl = referer;
834
876
  } else if (host && pathname) {
835
877
  const protocol = headersList.get("x-forwarded-proto") || "https";
836
878
  sourceUrl = `${protocol}://${host}${pathname}`;
837
879
  }
880
+ if (!sourceUrl || isErrorPage(sourceUrl)) {
881
+ const cookieStore = await cookies();
882
+ const preservedSource = cookieStore.get("portal_error_source");
883
+ if (preservedSource?.value) {
884
+ sourceUrl = decodeURIComponent(preservedSource.value);
885
+ cookieStore.delete("portal_error_source");
886
+ }
887
+ }
838
888
  } catch (error) {
839
889
  console.debug("[portal-components] Could not determine source URL", error);
840
890
  }
@@ -1150,11 +1200,15 @@ var fetchCustomBrandingImpl = async () => {
1150
1200
  const payload = await response.json();
1151
1201
  const brandingObject = {
1152
1202
  logo: payload.logoUrl,
1153
- title: payload.appName,
1154
- customColor1: payload.primaryColor,
1155
- customColor2: payload.secondaryColor,
1203
+ title: payload.title,
1204
+ primaryColor: payload.primaryColor,
1205
+ secondaryColor: payload.secondaryColor,
1156
1206
  favicon: payload.faviconUrl,
1157
- supportPortalLink: payload.supportPortalLink || ""
1207
+ supportPortalLink: payload.supportPortalLink || "",
1208
+ background: payload.background,
1209
+ backgroundImage: payload.backgroundImage,
1210
+ customColor1: payload.customColor1,
1211
+ customColor2: payload.customColor2
1158
1212
  };
1159
1213
  const brandingData = Buffer.from(JSON.stringify(brandingObject)).toString("base64");
1160
1214
  return {