@shipfox/client-auth 21.0.0 → 22.0.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/pages/workspace-onboarding-page.d.ts.map +1 -1
- package/dist/pages/workspace-onboarding-page.js +98 -240
- package/dist/pages/workspace-onboarding-page.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/pages/workspace-onboarding-page.tsx +5 -83
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/client-auth",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "22.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@shipfox/api-auth-dto": "12.0.0",
|
|
40
40
|
"@shipfox/api-workspaces-dto": "12.0.0",
|
|
41
41
|
"@shipfox/client-api": "6.0.1",
|
|
42
|
-
"@shipfox/client-invitations": "
|
|
43
|
-
"@shipfox/client-shell": "
|
|
44
|
-
"@shipfox/client-ui": "
|
|
45
|
-
"@shipfox/react-ui": "2.
|
|
42
|
+
"@shipfox/client-invitations": "22.0.0",
|
|
43
|
+
"@shipfox/client-shell": "22.0.0",
|
|
44
|
+
"@shipfox/client-ui": "22.0.0",
|
|
45
|
+
"@shipfox/react-ui": "2.1.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@tanstack/react-query": "^5.101.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {slugifyName, slugSchema} from '@shipfox/api-common-dto';
|
|
2
2
|
import {createWorkspaceBodySchema} from '@shipfox/api-workspaces-dto';
|
|
3
|
+
import {FocusedFrame} from '@shipfox/client-shell/runtime';
|
|
3
4
|
import {displayNameFieldError, SlugField} from '@shipfox/client-ui';
|
|
4
5
|
import {Button} from '@shipfox/react-ui/button';
|
|
5
6
|
import {Callout} from '@shipfox/react-ui/callout';
|
|
@@ -17,23 +18,6 @@ import {useAuthState} from '#hooks/use-auth-state.js';
|
|
|
17
18
|
import {lastWorkspaceIdAtom, rememberLastWorkspaceId} from '#state/last-workspace.js';
|
|
18
19
|
import {workspaceOnboardingErrorToFormError} from './form-errors.js';
|
|
19
20
|
|
|
20
|
-
const previewMetrics = [
|
|
21
|
-
{label: 'Runs', value: '--'},
|
|
22
|
-
{label: 'Passed', value: '--'},
|
|
23
|
-
{label: 'Failed', value: '--'},
|
|
24
|
-
{label: 'Duration', value: '--'},
|
|
25
|
-
];
|
|
26
|
-
const previewBars = [
|
|
27
|
-
{id: 'runs-start', height: 32},
|
|
28
|
-
{id: 'runs-mid-low', height: 48},
|
|
29
|
-
{id: 'runs-dip', height: 28},
|
|
30
|
-
{id: 'runs-mid-high', height: 66},
|
|
31
|
-
{id: 'runs-mid', height: 54},
|
|
32
|
-
{id: 'runs-peak', height: 82},
|
|
33
|
-
{id: 'runs-late-low', height: 44},
|
|
34
|
-
{id: 'runs-late-high', height: 74},
|
|
35
|
-
];
|
|
36
|
-
|
|
37
21
|
function isSlugValid(value: string): boolean {
|
|
38
22
|
return slugSchema.safeParse(value).success;
|
|
39
23
|
}
|
|
@@ -79,7 +63,7 @@ export function WorkspaceOnboardingPage() {
|
|
|
79
63
|
|
|
80
64
|
return (
|
|
81
65
|
<main className="min-h-screen px-frame py-frame max-[520px]:px-row">
|
|
82
|
-
<
|
|
66
|
+
<FocusedFrame className="flex min-h-[calc(100vh-64px)] flex-col gap-section">
|
|
83
67
|
<header className="flex items-center justify-between">
|
|
84
68
|
<div className="flex items-center gap-inline">
|
|
85
69
|
<div className="flex size-36 items-center justify-center rounded-8 border border-border-neutral-base bg-background-neutral-base shadow-button-neutral">
|
|
@@ -91,9 +75,9 @@ export function WorkspaceOnboardingPage() {
|
|
|
91
75
|
</div>
|
|
92
76
|
</header>
|
|
93
77
|
|
|
94
|
-
<section className="
|
|
78
|
+
<section className="flex flex-1 items-center">
|
|
95
79
|
<form
|
|
96
|
-
className="
|
|
80
|
+
className="w-full"
|
|
97
81
|
noValidate
|
|
98
82
|
aria-labelledby="workspace-onboarding-title"
|
|
99
83
|
onSubmit={(event) => {
|
|
@@ -208,70 +192,8 @@ export function WorkspaceOnboardingPage() {
|
|
|
208
192
|
</PanelBody>
|
|
209
193
|
</Panel>
|
|
210
194
|
</form>
|
|
211
|
-
|
|
212
|
-
<div className="hidden flex-col gap-group lg:flex" aria-hidden="true">
|
|
213
|
-
<div className="grid grid-cols-4 gap-cluster">
|
|
214
|
-
{previewMetrics.map((metric) => (
|
|
215
|
-
<div
|
|
216
|
-
className="rounded-8 border border-border-neutral-base bg-background-neutral-base p-panel-compact shadow-button-neutral"
|
|
217
|
-
key={metric.label}
|
|
218
|
-
>
|
|
219
|
-
<Text size="xs" className="text-foreground-neutral-muted">
|
|
220
|
-
{metric.label}
|
|
221
|
-
</Text>
|
|
222
|
-
<Text size="xl" bold>
|
|
223
|
-
{metric.value}
|
|
224
|
-
</Text>
|
|
225
|
-
</div>
|
|
226
|
-
))}
|
|
227
|
-
</div>
|
|
228
|
-
<div className="grid grid-cols-2 gap-group">
|
|
229
|
-
<PreviewPanel title="Performance over time" />
|
|
230
|
-
<PreviewPanel title="Duration distribution" bars />
|
|
231
|
-
</div>
|
|
232
|
-
<div className="flex flex-col gap-cluster rounded-8 border border-border-neutral-base bg-background-neutral-base p-panel-compact shadow-button-neutral">
|
|
233
|
-
<Text size="sm" bold>
|
|
234
|
-
Jobs breakdown
|
|
235
|
-
</Text>
|
|
236
|
-
<div className="flex flex-col gap-inline">
|
|
237
|
-
{[0, 1, 2, 3].map((row) => (
|
|
238
|
-
<div
|
|
239
|
-
className="grid grid-cols-[1fr_80px_80px] gap-cluster border-t border-border-neutral-base pt-[10px]"
|
|
240
|
-
key={row}
|
|
241
|
-
>
|
|
242
|
-
<div className="h-12 rounded-full bg-background-neutral-disabled" />
|
|
243
|
-
<div className="h-12 rounded-full bg-background-neutral-disabled" />
|
|
244
|
-
<div className="h-12 rounded-full bg-background-neutral-disabled" />
|
|
245
|
-
</div>
|
|
246
|
-
))}
|
|
247
|
-
</div>
|
|
248
|
-
</div>
|
|
249
|
-
</div>
|
|
250
195
|
</section>
|
|
251
|
-
</
|
|
196
|
+
</FocusedFrame>
|
|
252
197
|
</main>
|
|
253
198
|
);
|
|
254
199
|
}
|
|
255
|
-
|
|
256
|
-
function PreviewPanel({title, bars = false}: {title: string; bars?: boolean}) {
|
|
257
|
-
return (
|
|
258
|
-
<div className="flex flex-col gap-group rounded-8 border border-border-neutral-base bg-background-neutral-base p-panel-compact shadow-button-neutral">
|
|
259
|
-
<Text size="sm" bold>
|
|
260
|
-
{title}
|
|
261
|
-
</Text>
|
|
262
|
-
<div className="flex h-[220px] items-end gap-inline border-b border-l border-border-neutral-base px-row pb-[10px]">
|
|
263
|
-
{previewBars.map((bar) => (
|
|
264
|
-
<div
|
|
265
|
-
className={
|
|
266
|
-
bars
|
|
267
|
-
? 'w-full rounded-t-4 bg-background-neutral-disabled'
|
|
268
|
-
: 'w-full rounded-full bg-background-neutral-disabled'
|
|
269
|
-
}
|
|
270
|
-
key={`${title}-${bar.id}`}
|
|
271
|
-
style={{height: `${bar.height}%`}}
|
|
272
|
-
/>
|
|
273
|
-
))}
|
|
274
|
-
</div>
|
|
275
|
-
</div>
|
|
276
|
-
);
|
|
277
|
-
}
|