@bevel-software/platform-core-frontend 0.26.0 → 0.27.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/package.json +2 -2
- package/src/core/CoreAppShell.tsx +87 -25
- package/src/core/ProductName.tsx +49 -0
- package/src/core/__tests__/ShellRoutes.test.tsx +22 -0
- package/src/core/__tests__/core-contributions.test.ts +16 -0
- package/src/core/core-contributions.ts +17 -0
- package/src/core/registry.ts +51 -1
- package/src/index.css +23 -5
- package/src/index.ts +5 -0
- package/src/modules/access/__tests__/ManageAccessDialog.proposal.test.tsx +1 -1
- package/src/modules/access/components/ManageAccessDialog.tsx +1 -1
- package/src/modules/admin/__tests__/RolesCorruptedBanner.test.tsx +70 -0
- package/src/modules/admin/components/RolesCorruptedBanner.tsx +9 -4
- package/src/modules/auth/components/LoginScreen.tsx +4 -1
- package/src/modules/auth/services/account.api.ts +28 -1
- package/src/modules/auth/services/sso.ts +1 -2
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.sync-banner.test.tsx +176 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.unreadable.test.tsx +68 -0
- package/src/modules/change-requests/__tests__/ChangeRequestLink.test.tsx +182 -0
- package/src/modules/change-requests/__tests__/FileChangeBoxes.test.tsx +1 -1
- package/src/modules/change-requests/__tests__/readFileOnBranch.test.ts +79 -0
- package/src/modules/change-requests/components/ChangeBox.tsx +6 -1
- package/src/modules/change-requests/components/ChangeRequestDialog.tsx +45 -15
- package/src/modules/change-requests/components/ChangeRequestLink.tsx +151 -0
- package/src/modules/change-requests/components/CrFileTree.tsx +2 -1
- package/src/modules/change-requests/components/FileChangeBoxes.tsx +4 -2
- package/src/modules/change-requests/hooks/useApplyChangeRequest.ts +6 -3
- package/src/modules/change-requests/services/change-requests.api.ts +15 -2
- package/src/modules/change-requests/utils/readFailure.ts +22 -0
- package/src/modules/embed/__tests__/EmbedLinkPage.test.tsx +74 -0
- package/src/modules/embed/__tests__/EmbedView.test.tsx +473 -0
- package/src/modules/embed/__tests__/embed-config.test.ts +128 -0
- package/src/modules/embed/__tests__/embed-host.test.ts +111 -0
- package/src/modules/embed/__tests__/mcp-app-view.test.ts +295 -0
- package/src/modules/embed/__tests__/mount.test.tsx +157 -0
- package/src/modules/embed/components/EmbedLinkPage.tsx +109 -0
- package/src/modules/embed/components/EmbedView.tsx +545 -0
- package/src/modules/embed/embed-config.ts +132 -0
- package/src/modules/embed/embed-host.ts +120 -0
- package/src/modules/embed/mount.tsx +80 -0
- package/src/modules/embed/services/embed-token.ts +22 -0
- package/src/modules/embed/services/embed.api.ts +158 -0
- package/src/modules/git/__tests__/BranchSwitcher.test.tsx +202 -4
- package/src/modules/git/__tests__/GitSyncFailedBanner.test.tsx +59 -1
- package/src/modules/git/__tests__/PullNeededBanner.test.tsx +39 -22
- package/src/modules/git/__tests__/useAutoPullUpdates.test.tsx +7 -2
- package/src/modules/git/branch-delete-menu-item.tsx +24 -0
- package/src/modules/git/components/BranchSwitcher.tsx +29 -5
- package/src/modules/git/components/GitSyncFailedBanner.tsx +53 -15
- package/src/modules/git/components/HistoryVersionPreview.tsx +5 -3
- package/src/modules/git/components/PullNeededBanner.tsx +15 -49
- package/src/modules/git/hooks/useAutoPullUpdates.ts +9 -5
- package/src/modules/git/index.ts +15 -0
- package/src/modules/git/services/__tests__/error-messages.test.ts +67 -0
- package/src/modules/git/services/__tests__/pull-failure.test.ts +36 -0
- package/src/modules/git/services/error-messages.ts +58 -1
- package/src/modules/git/services/pull-failure.ts +68 -0
- package/src/modules/git/state/branch-delete-confirm.ts +46 -0
- package/src/modules/layout/__tests__/HeaderAlignment.test.tsx +1 -0
- package/src/modules/layout/__tests__/breakpoints.test.ts +7 -1
- package/src/modules/layout/breakpoints.ts +8 -0
- package/src/modules/library/__tests__/PluginExtras.test.tsx +9 -9
- package/src/modules/library/__tests__/PluginPage.test.tsx +8 -1
- package/src/modules/library/__tests__/SkillsTree.test.tsx +13 -4
- package/src/modules/library/components/LibraryPage.tsx +22 -0
- package/src/modules/library/components/PluginExtras.tsx +23 -6
- package/src/modules/library/components/PluginPage.tsx +6 -1
- package/src/modules/library/routes/LibraryRoutes.tsx +8 -7
- package/src/modules/library/services/plugins.api.ts +4 -1
- package/src/modules/library/state/plugins-revision.ts +28 -0
- package/src/modules/onboarding/__tests__/agent-connection-api.test.ts +55 -0
- package/src/modules/onboarding/__tests__/creator-welcome.test.tsx +87 -82
- package/src/modules/onboarding/__tests__/first-page-prompt.test.ts +109 -0
- package/src/modules/onboarding/__tests__/get-started-column.test.tsx +1001 -0
- package/src/modules/onboarding/__tests__/invite-dialog.test.tsx +392 -0
- package/src/modules/onboarding/__tests__/onboarding.test.tsx +226 -193
- package/src/modules/onboarding/__tests__/starter-pack-card.test.tsx +136 -0
- package/src/modules/onboarding/components/CreatorWelcomePage.tsx +7 -11
- package/src/modules/onboarding/components/EmailChipsInput.tsx +138 -0
- package/src/modules/onboarding/components/GetStartedColumn.tsx +651 -0
- package/src/modules/onboarding/components/InviteButton.tsx +35 -0
- package/src/modules/onboarding/components/InviteDialog.tsx +424 -0
- package/src/modules/onboarding/components/RootLanding.tsx +8 -24
- package/src/modules/onboarding/components/StarterPackCard.tsx +98 -0
- package/src/modules/onboarding/components/WelcomePage.tsx +65 -154
- package/src/modules/onboarding/first-page-prompt.ts +89 -0
- package/src/modules/onboarding/invite-emails.ts +175 -0
- package/src/modules/onboarding/services/agent-connection.api.ts +53 -0
- package/src/modules/onboarding/services/starter-packs.api.ts +83 -0
- package/src/modules/onboarding/state/agent-connection.ts +167 -0
- package/src/modules/onboarding/state/invite-dialog.context.ts +32 -0
- package/src/modules/onboarding/state/invite-dialog.tsx +31 -0
- package/src/modules/onboarding/state/onboarding.ts +133 -59
- package/src/modules/onboarding/state/starter-packs.ts +169 -0
- package/src/modules/settings/settings-nav-items.tsx +8 -3
- package/src/modules/setup/__tests__/setup.first-run-storage.test.tsx +389 -0
- package/src/modules/setup/__tests__/setup.github.test.tsx +5 -5
- package/src/modules/setup/__tests__/setup.kept-draft.test.tsx +1 -1
- package/src/modules/setup/__tests__/setup.repository-change.test.tsx +1 -1
- package/src/modules/setup/__tests__/setup.repository.test.tsx +21 -21
- package/src/modules/setup/__tests__/setup.test.tsx +56 -15
- package/src/modules/setup/__tests__/useConnectionProbe.test.tsx +123 -0
- package/src/modules/setup/components/FirstRunStorage.tsx +560 -0
- package/src/modules/setup/components/SetupGate.tsx +46 -1
- package/src/modules/setup/components/SetupScreen.tsx +81 -84
- package/src/modules/setup/hooks/useConnectionProbe.ts +93 -0
- package/src/modules/setup/services/setup.api.ts +3 -3
- package/src/modules/setup/utils/suggested-branch.ts +27 -0
- package/src/modules/toolbar/commands/__tests__/actions.test.tsx +210 -0
- package/src/modules/toolbar/commands/actions.tsx +324 -0
- package/src/modules/toolbar/commands/command-menu.ts +44 -0
- package/src/modules/toolbar/commands/useCommandActions.ts +69 -0
- package/src/modules/toolbar/commands/useCommandShortcuts.ts +121 -0
- package/src/modules/toolbar/components/AppSwitcher.tsx +106 -22
- package/src/modules/toolbar/components/ExternalAgentAccessPage.tsx +1 -1
- package/src/modules/toolbar/components/ProfileMenu.tsx +9 -4
- package/src/modules/toolbar/components/SearchPalette.tsx +540 -0
- package/src/modules/toolbar/components/Toolbar.tsx +10 -0
- package/src/modules/toolbar/components/__tests__/AppSwitcher.test.tsx +187 -54
- package/src/modules/toolbar/components/__tests__/ProfileMenu.test.tsx +64 -0
- package/src/modules/toolbar/components/__tests__/SearchPalette.test.tsx +832 -0
- package/src/modules/toolbar/components/__tests__/Toolbar.test.tsx +57 -2
- package/src/modules/toolbar/search/__tests__/rank.test.ts +93 -0
- package/src/modules/toolbar/search/__tests__/sources.test.ts +131 -0
- package/src/modules/toolbar/search/rank.ts +111 -0
- package/src/modules/toolbar/search/sources.ts +169 -0
- package/src/modules/workflow/hooks/useFileLock.ts +10 -7
- package/src/modules/workflow/services/__tests__/lock.api.test.ts +41 -0
- package/src/modules/workflow/services/lock.api.ts +17 -2
- package/src/modules/workspace/__tests__/useWorkspaceState.test.ts +49 -1
- package/src/modules/workspace/components/EditorTabs.tsx +39 -15
- package/src/modules/workspace/components/FileExplorer.tsx +39 -6
- package/src/modules/workspace/components/FilePaneCard.tsx +6 -2
- package/src/modules/workspace/components/FileRoute.tsx +12 -7
- package/src/modules/workspace/components/FileViewer.tsx +271 -74
- package/src/modules/workspace/components/KbPageHeader.tsx +13 -6
- package/src/modules/workspace/components/__tests__/EditorTabs.test.tsx +88 -21
- package/src/modules/workspace/components/__tests__/FileExplorer.test.tsx +92 -4
- package/src/modules/workspace/components/__tests__/FileRoute.test.tsx +23 -3
- package/src/modules/workspace/components/__tests__/FileViewer.test.tsx +330 -6
- package/src/modules/workspace/components/__tests__/KbPageHeader.test.tsx +17 -2
- package/src/modules/workspace/components/renderers/DocxRenderer.tsx +11 -16
- package/src/modules/workspace/components/renderers/DownloadFileButton.tsx +6 -0
- package/src/modules/workspace/components/renderers/EmailRenderer.tsx +23 -21
- package/src/modules/workspace/components/renderers/ImageRenderer.tsx +13 -29
- package/src/modules/workspace/components/renderers/KbMarkdownView.tsx +9 -2
- package/src/modules/workspace/components/renderers/MarkdownRenderer.tsx +8 -0
- package/src/modules/workspace/components/renderers/PdfRenderer.tsx +14 -19
- package/src/modules/workspace/components/renderers/PptxRenderer.tsx +11 -17
- package/src/modules/workspace/components/renderers/ToolRenderer.tsx +35 -7
- package/src/modules/workspace/components/renderers/XlsxRenderer.tsx +11 -17
- package/src/modules/workspace/components/renderers/__tests__/EmailRenderer.links.test.tsx +73 -0
- package/src/modules/workspace/components/renderers/__tests__/ToolRenderer.scaffold.test.tsx +64 -0
- package/src/modules/workspace/components/renderers/__tests__/ToolRenderer.surface.test.tsx +82 -0
- package/src/modules/workspace/components/renderers/__tests__/bridgeHarness.ts +99 -0
- package/src/modules/workspace/components/renderers/__tests__/htmlSandbox.test.ts +129 -35
- package/src/modules/workspace/components/renderers/__tests__/htmlViewsGuide.test.ts +149 -0
- package/src/modules/workspace/components/renderers/__tests__/kbMarkdownLinkPolicy.test.tsx +100 -0
- package/src/modules/workspace/components/renderers/htmlSandbox.ts +76 -20
- package/src/modules/workspace/components/renderers/index.ts +26 -0
- package/src/modules/workspace/components/renderers/kbMarkdownPipeline.tsx +51 -1
- package/src/modules/workspace/components/renderers/rendererRawRead.ts +53 -0
- package/src/modules/workspace/components/renderers/rendererSurface.ts +109 -0
- package/src/modules/workspace/components/renderers/rendererWorkspace.ts +8 -2
- package/src/modules/workspace/hooks/__tests__/useWorkspaceState.test.tsx +126 -21
- package/src/modules/workspace/hooks/useCreatePage.ts +116 -0
- package/src/modules/workspace/hooks/useWorkspaceImageResolver.ts +24 -7
- package/src/modules/workspace/hooks/useWorkspaceState.ts +42 -8
- package/src/modules/workspace/routing/__tests__/kb-routes.test.tsx +10 -0
- package/src/modules/workspace/routing/__tests__/md-links-parity.test.tsx +113 -0
- package/src/modules/workspace/routing/kb-routes.ts +66 -12
- package/src/modules/workspace/state/editable-page.ts +42 -0
- package/src/modules/workspace/state/workspace.context.ts +13 -4
- package/src/modules/workspace/utils/__tests__/display-file-name.test.ts +60 -0
- package/src/modules/workspace/utils/__tests__/fileTree.test.ts +75 -0
- package/src/modules/workspace/utils/__tests__/treeConfirm.test.ts +16 -0
- package/src/modules/workspace/utils/display-file-name.ts +102 -0
- package/src/modules/workspace/utils/fileTree.ts +49 -14
- package/src/modules/workspace/utils/treeConfirm.ts +15 -0
- package/src/shared/__tests__/no-builtin-confirm.test.ts +102 -0
- package/src/shared/components/ConfirmProvider.tsx +156 -0
- package/src/shared/components/Dialog.tsx +7 -0
- package/src/shared/components/__tests__/ConfirmProvider.test.tsx +198 -0
- package/src/shared/components/confirm-context.ts +94 -0
- package/src/shared/components/index.ts +3 -0
- package/src/modules/onboarding/components/WelcomeRoute.tsx +0 -57
- package/src/modules/onboarding/welcome-state.ts +0 -36
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
import { useId, useRef, useState, type FormEvent, type KeyboardEvent, type ReactNode } from 'react';
|
|
2
|
+
import { Check, GitBranch, Server } from 'lucide-react';
|
|
3
|
+
import { Badge, Banner, Button, TextField } from '../../../shared/components';
|
|
4
|
+
import { ProductName } from '../../../core/ProductName';
|
|
5
|
+
import { cn } from '../../../lib/utils';
|
|
6
|
+
import { useAppRegistry } from '../../../core/registry';
|
|
7
|
+
import { GitHubRepositoryPanel } from './GitHubRepositoryPanel';
|
|
8
|
+
import { forgetDraft } from '../utils/kept-draft';
|
|
9
|
+
import { tokenUsernameForHost } from '../utils/git-host';
|
|
10
|
+
import { suggestedBranch } from '../utils/suggested-branch';
|
|
11
|
+
import { KB_ROUTE_PREFIX } from '../../workspace/routing/kb-routes';
|
|
12
|
+
import { ConnectionProbeFailed, useConnectionProbe } from '../hooks/useConnectionProbe';
|
|
13
|
+
import {
|
|
14
|
+
saveSettings,
|
|
15
|
+
KbInitFailed,
|
|
16
|
+
SettingsProblems,
|
|
17
|
+
type ConnectionTest,
|
|
18
|
+
type RepositoryStatus,
|
|
19
|
+
} from '../services/setup.api';
|
|
20
|
+
|
|
21
|
+
/** Core's words for the repository the deployment keeps; a distribution names itself (`managedStorage`). */
|
|
22
|
+
const MANAGED_DEFAULT = {
|
|
23
|
+
title: 'Hexis takes care of it',
|
|
24
|
+
description: 'Ready right away. There is nothing to connect and nothing to enter.',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type Choice = 'managed' | 'github-app';
|
|
28
|
+
|
|
29
|
+
/** Where on this screen the admin is: the question, or one of the ways that needs details. */
|
|
30
|
+
type Step = 'choose' | 'github' | 'address';
|
|
31
|
+
|
|
32
|
+
interface Props {
|
|
33
|
+
/** The ways offered. The gate only sends a deployment here that has chosen none and is not pinned. */
|
|
34
|
+
repository: RepositoryStatus;
|
|
35
|
+
/** Re-read the status: the gate then shows whatever the deployment still needs. */
|
|
36
|
+
onSaved(): void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The first screen a fresh deployment shows its admin: one question, where
|
|
41
|
+
* the knowledge base lives, answered by picking a card.
|
|
42
|
+
*
|
|
43
|
+
* WHY NOT THE FULL FORM. Almost every new deployment ends up on the
|
|
44
|
+
* repository it keeps for itself, which needs no answers at all. The full
|
|
45
|
+
* form put that choice behind a tab among address fields, sign-in settings
|
|
46
|
+
* and folder names, so the one-press path looked like the hardest one. This
|
|
47
|
+
* screen asks the question on its own and leaves everything else for later.
|
|
48
|
+
*
|
|
49
|
+
* ONE SCREEN FOR THE WHOLE CHOICE. All three ways are answered here: the
|
|
50
|
+
* repository the deployment keeps, GitHub, and an address and a token for
|
|
51
|
+
* any other host. Each way that needs details opens as a step of this
|
|
52
|
+
* screen, with a way back to the cards, rather than handing over to the full
|
|
53
|
+
* form, which would ask the same question again among everything else.
|
|
54
|
+
* Single sign-on and the rest are on the full form at Settings → Deployment.
|
|
55
|
+
* Once a way is chosen the gate goes back to that form for whatever is still
|
|
56
|
+
* missing, so a save that leaves something to fix lands where it can be
|
|
57
|
+
* fixed.
|
|
58
|
+
*/
|
|
59
|
+
export function FirstRunStorage({ repository, onSaved }: Props) {
|
|
60
|
+
const { managedStorage } = useAppRegistry();
|
|
61
|
+
const managed = managedStorage ?? MANAGED_DEFAULT;
|
|
62
|
+
const offersGitHub = repository.modes.includes('github-app');
|
|
63
|
+
|
|
64
|
+
const [choice, setChoice] = useState<Choice>('managed');
|
|
65
|
+
/**
|
|
66
|
+
* The step on screen. The GitHub step opens straight away on a return from
|
|
67
|
+
* GitHub, which the address says: the trip started here, and what came of it
|
|
68
|
+
* is said in the panel.
|
|
69
|
+
*/
|
|
70
|
+
const [step, setStep] = useState<Step>(() =>
|
|
71
|
+
offersGitHub && new URLSearchParams(window.location.search ?? '').has('github') ? 'github' : 'choose',
|
|
72
|
+
);
|
|
73
|
+
const connecting = step === 'github';
|
|
74
|
+
const [githubRepository, setGitHubRepository] = useState('');
|
|
75
|
+
const [saving, setSaving] = useState(false);
|
|
76
|
+
const [error, setError] = useState<string | null>(null);
|
|
77
|
+
const [repositoryProblem, setRepositoryProblem] = useState<string | undefined>();
|
|
78
|
+
/** Saved, but the running process needs a restart before it can use what was saved. */
|
|
79
|
+
const [needsRestart, setNeedsRestart] = useState(false);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Store the choice, and then do what the full form does after the save
|
|
83
|
+
* that finishes setup: load the app afresh on completion (the browser's
|
|
84
|
+
* branch model predates it), say so when a restart is owed, otherwise
|
|
85
|
+
* re-read the status.
|
|
86
|
+
*
|
|
87
|
+
* The fresh load opens the knowledge base. Choosing where it lives is the
|
|
88
|
+
* one step that has to come first; connecting an agent and the rest wait
|
|
89
|
+
* in the Get set up list beside it, so nothing else stands in the way.
|
|
90
|
+
*/
|
|
91
|
+
async function save(settings: Record<string, string>) {
|
|
92
|
+
if (saving) return;
|
|
93
|
+
setSaving(true);
|
|
94
|
+
setError(null);
|
|
95
|
+
setRepositoryProblem(undefined);
|
|
96
|
+
try {
|
|
97
|
+
const result = await saveSettings(settings);
|
|
98
|
+
if (result.awaitingRestart) {
|
|
99
|
+
setNeedsRestart(true);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (result.complete) {
|
|
103
|
+
window.location.assign(KB_ROUTE_PREFIX);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
onSaved();
|
|
107
|
+
} catch (err) {
|
|
108
|
+
if (err instanceof KbInitFailed) {
|
|
109
|
+
// The choice IS stored; only the initialization failed. The full form
|
|
110
|
+
// owns that failure and its retry, and the next status read sends the
|
|
111
|
+
// gate there, since a way has now been chosen.
|
|
112
|
+
onSaved();
|
|
113
|
+
} else if (err instanceof SettingsProblems) {
|
|
114
|
+
const { githubRepository: aboutRepository, ...rest } = err.problems;
|
|
115
|
+
if (aboutRepository && connecting) setRepositoryProblem(aboutRepository);
|
|
116
|
+
const elsewhere = Object.values(aboutRepository && connecting ? rest : err.problems);
|
|
117
|
+
if (elsewhere.length > 0) setError(elsewhere.join(' '));
|
|
118
|
+
} else {
|
|
119
|
+
setError(err instanceof Error ? err.message : 'Could not save this choice.');
|
|
120
|
+
}
|
|
121
|
+
} finally {
|
|
122
|
+
setSaving(false);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const choices: Choice[] = offersGitHub ? ['managed', 'github-app'] : ['managed'];
|
|
127
|
+
const radios = useRef<(HTMLButtonElement | null)[]>([]);
|
|
128
|
+
|
|
129
|
+
/** Arrows move the choice, as a radiogroup promises; Tab leaves it. */
|
|
130
|
+
function onRadioKeyDown(event: KeyboardEvent, index: number) {
|
|
131
|
+
const step =
|
|
132
|
+
event.key === 'ArrowRight' || event.key === 'ArrowDown'
|
|
133
|
+
? 1
|
|
134
|
+
: event.key === 'ArrowLeft' || event.key === 'ArrowUp'
|
|
135
|
+
? -1
|
|
136
|
+
: 0;
|
|
137
|
+
if (step === 0) return;
|
|
138
|
+
event.preventDefault();
|
|
139
|
+
const next = (index + step + choices.length) % choices.length;
|
|
140
|
+
setChoice(choices[next]!);
|
|
141
|
+
radios.current[next]?.focus();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function proceed() {
|
|
145
|
+
if (choice === 'github-app') open('github');
|
|
146
|
+
else void save({ gitMode: 'managed' });
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** Move between the question and a step, leaving what the last one said behind. */
|
|
150
|
+
function open(next: Step) {
|
|
151
|
+
setError(null);
|
|
152
|
+
setStep(next);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ── An address and a token ──────────────────────────────────────────────
|
|
156
|
+
const [repoUrl, setRepoUrl] = useState('');
|
|
157
|
+
const [token, setToken] = useState('');
|
|
158
|
+
/** Only asked for when the host is not one whose token username is known. */
|
|
159
|
+
const [username, setUsername] = useState('');
|
|
160
|
+
/**
|
|
161
|
+
* The last test of exactly what is typed. Any edit clears it, and an answer
|
|
162
|
+
* that lands after an edit is about values no longer on screen, so it is
|
|
163
|
+
* neither shown nor saved with — the one mechanism the full form keeps too
|
|
164
|
+
* (`useConnectionProbe`).
|
|
165
|
+
*/
|
|
166
|
+
const probe = useConnectionProbe();
|
|
167
|
+
const { result: test, testing } = probe;
|
|
168
|
+
const knownHost = tokenUsernameForHost(repoUrl);
|
|
169
|
+
const askUsername = repoUrl.trim() !== '' && !knownHost;
|
|
170
|
+
|
|
171
|
+
function edit(set: (value: string) => void, value: string) {
|
|
172
|
+
set(value);
|
|
173
|
+
probe.invalidate();
|
|
174
|
+
setError(null);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** What the full form sends for the same answers, so the server reads them alike. */
|
|
178
|
+
function connection(): Record<string, string> {
|
|
179
|
+
const gitUsername = knownHost?.username ?? username.trim();
|
|
180
|
+
return {
|
|
181
|
+
kbRepoUrl: repoUrl.trim(),
|
|
182
|
+
gitToken: token,
|
|
183
|
+
...(gitUsername ? { gitUsername } : {}),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Ask the host. A refusal is an answer and is shown. Never throws: null
|
|
189
|
+
* when there is no answer about what is typed now — the request failed
|
|
190
|
+
* (said in the banner), or the answers were edited while it was out — and
|
|
191
|
+
* then a Save waiting on it stops, and the next press tests what is on
|
|
192
|
+
* screen.
|
|
193
|
+
*/
|
|
194
|
+
async function runTest(): Promise<ConnectionTest | null> {
|
|
195
|
+
setError(null);
|
|
196
|
+
try {
|
|
197
|
+
const { result, stale } = await probe.ask(connection());
|
|
198
|
+
return stale ? null : result;
|
|
199
|
+
} catch (err) {
|
|
200
|
+
// A failure goes stale the same way: it would complain about values
|
|
201
|
+
// the admin has already changed.
|
|
202
|
+
if (!(err instanceof ConnectionProbeFailed) || !err.stale) {
|
|
203
|
+
setError(err instanceof Error ? err.message : 'Could not test the connection.');
|
|
204
|
+
}
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Save, proving the connection first when what is typed has not been
|
|
211
|
+
* tested, as the full form does: nothing behind this screen works until the
|
|
212
|
+
* repository answers. The branches come from the test, the same way the
|
|
213
|
+
* full form fills them in.
|
|
214
|
+
*/
|
|
215
|
+
async function saveByAddress(event: FormEvent) {
|
|
216
|
+
event.preventDefault();
|
|
217
|
+
const result = test?.ok ? test : await runTest();
|
|
218
|
+
if (!result?.ok) return;
|
|
219
|
+
const branch = suggestedBranch(result);
|
|
220
|
+
await save({
|
|
221
|
+
gitMode: 'token',
|
|
222
|
+
...connection(),
|
|
223
|
+
...(branch ? { defaultBranch: branch, protectedBranches: branch } : {}),
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const notices = (
|
|
228
|
+
<>
|
|
229
|
+
{error && (
|
|
230
|
+
<Banner tone="danger" role="alert">
|
|
231
|
+
{error}
|
|
232
|
+
</Banner>
|
|
233
|
+
)}
|
|
234
|
+
{needsRestart && (
|
|
235
|
+
<Banner tone="wait" role="status">
|
|
236
|
+
Saved. This deployment needs a restart to pick the branch settings up; everything else is in place.
|
|
237
|
+
</Banner>
|
|
238
|
+
)}
|
|
239
|
+
</>
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
return (
|
|
243
|
+
// `h-full` and its own scroll, as the full form does: `#root` clips, so a
|
|
244
|
+
// page that only grew past it would scroll nothing.
|
|
245
|
+
<div className="h-full overflow-y-auto bg-canvas">
|
|
246
|
+
<main className="mx-auto px-4 pt-8 pb-16 md:pt-16 md:pb-24 max-w-[692px]">
|
|
247
|
+
<div className="grid gap-7">
|
|
248
|
+
<ProductName className="text-ui font-semibold tracking-wide text-ink" />
|
|
249
|
+
{connecting ? (
|
|
250
|
+
<>
|
|
251
|
+
<Heading title="Connect your GitHub">
|
|
252
|
+
This deployment reads and writes the one repository you pick.
|
|
253
|
+
</Heading>
|
|
254
|
+
<GitHubRepositoryPanel
|
|
255
|
+
repository={githubRepository}
|
|
256
|
+
onChoose={(name) => {
|
|
257
|
+
setGitHubRepository(name);
|
|
258
|
+
setRepositoryProblem(undefined);
|
|
259
|
+
}}
|
|
260
|
+
problem={repositoryProblem}
|
|
261
|
+
disabled={saving || needsRestart}
|
|
262
|
+
// Nothing typed here needs keeping across the trip. What an
|
|
263
|
+
// earlier, abandoned trip from the full form kept would send
|
|
264
|
+
// the gate there on return, so it goes.
|
|
265
|
+
onLeaving={forgetDraft}
|
|
266
|
+
/>
|
|
267
|
+
{notices}
|
|
268
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
269
|
+
<Button
|
|
270
|
+
type="button"
|
|
271
|
+
variant="primary"
|
|
272
|
+
onClick={() => void save({ gitMode: 'github-app', githubRepository })}
|
|
273
|
+
disabled={!githubRepository || saving || needsRestart}
|
|
274
|
+
>
|
|
275
|
+
{saving ? 'Saving…' : 'Save and continue'}
|
|
276
|
+
</Button>
|
|
277
|
+
<Button
|
|
278
|
+
type="button"
|
|
279
|
+
variant="quiet"
|
|
280
|
+
onClick={() => open('choose')}
|
|
281
|
+
disabled={saving}
|
|
282
|
+
>
|
|
283
|
+
Back
|
|
284
|
+
</Button>
|
|
285
|
+
</div>
|
|
286
|
+
</>
|
|
287
|
+
) : step === 'address' ? (
|
|
288
|
+
<form className="grid gap-7" onSubmit={(e) => void saveByAddress(e)} noValidate>
|
|
289
|
+
<Heading title="Connect your repository">
|
|
290
|
+
Any git host works: GitLab, Bitbucket, Azure DevOps or your own server. This deployment reads and
|
|
291
|
+
writes the one repository you name.
|
|
292
|
+
</Heading>
|
|
293
|
+
<div className="grid max-w-[520px] gap-5">
|
|
294
|
+
<Field
|
|
295
|
+
label="Repository address"
|
|
296
|
+
hint="Copy it from your repository's page. A brand-new empty repository is fine."
|
|
297
|
+
>
|
|
298
|
+
{(id, describedBy) => (
|
|
299
|
+
<TextField
|
|
300
|
+
id={id}
|
|
301
|
+
aria-describedby={describedBy}
|
|
302
|
+
aria-invalid={test?.ok === false && test.field === 'kbRepoUrl' ? true : undefined}
|
|
303
|
+
value={repoUrl}
|
|
304
|
+
onChange={(e) => edit(setRepoUrl, e.target.value)}
|
|
305
|
+
placeholder="https://gitlab.com/acme/knowledge-base.git"
|
|
306
|
+
autoComplete="off"
|
|
307
|
+
spellCheck={false}
|
|
308
|
+
disabled={saving || needsRestart}
|
|
309
|
+
/>
|
|
310
|
+
)}
|
|
311
|
+
</Field>
|
|
312
|
+
<Field
|
|
313
|
+
label="Access token"
|
|
314
|
+
hint="Create one in your git host with read and write access to this repository. Stored encrypted, and never shown again."
|
|
315
|
+
>
|
|
316
|
+
{(id, describedBy) => (
|
|
317
|
+
<TextField
|
|
318
|
+
id={id}
|
|
319
|
+
type="password"
|
|
320
|
+
aria-describedby={describedBy}
|
|
321
|
+
aria-invalid={test?.ok === false && test.field === 'gitToken' ? true : undefined}
|
|
322
|
+
value={token}
|
|
323
|
+
onChange={(e) => edit(setToken, e.target.value)}
|
|
324
|
+
placeholder="Paste the token"
|
|
325
|
+
autoComplete="off"
|
|
326
|
+
disabled={saving || needsRestart}
|
|
327
|
+
/>
|
|
328
|
+
)}
|
|
329
|
+
</Field>
|
|
330
|
+
{askUsername && (
|
|
331
|
+
<Field
|
|
332
|
+
label="Username for the token"
|
|
333
|
+
hint="Some self-hosted servers ask for one beside the token. Leave it empty unless yours does."
|
|
334
|
+
>
|
|
335
|
+
{(id, describedBy) => (
|
|
336
|
+
<TextField
|
|
337
|
+
id={id}
|
|
338
|
+
aria-describedby={describedBy}
|
|
339
|
+
value={username}
|
|
340
|
+
onChange={(e) => edit(setUsername, e.target.value)}
|
|
341
|
+
autoComplete="off"
|
|
342
|
+
spellCheck={false}
|
|
343
|
+
disabled={saving || needsRestart}
|
|
344
|
+
/>
|
|
345
|
+
)}
|
|
346
|
+
</Field>
|
|
347
|
+
)}
|
|
348
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
349
|
+
<Button
|
|
350
|
+
type="button"
|
|
351
|
+
variant="outline"
|
|
352
|
+
size="sm"
|
|
353
|
+
onClick={() => void runTest()}
|
|
354
|
+
disabled={!repoUrl.trim() || !token || testing || saving || needsRestart}
|
|
355
|
+
>
|
|
356
|
+
{testing ? 'Checking…' : 'Test connection'}
|
|
357
|
+
</Button>
|
|
358
|
+
{test && <ConnectionAnswer result={test} />}
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
{notices}
|
|
362
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
363
|
+
<Button
|
|
364
|
+
type="submit"
|
|
365
|
+
variant="primary"
|
|
366
|
+
disabled={!repoUrl.trim() || !token || testing || saving || needsRestart}
|
|
367
|
+
>
|
|
368
|
+
{saving ? 'Saving…' : 'Save and continue'}
|
|
369
|
+
</Button>
|
|
370
|
+
<Button type="button" variant="quiet" onClick={() => open('choose')} disabled={saving || testing}>
|
|
371
|
+
Back
|
|
372
|
+
</Button>
|
|
373
|
+
</div>
|
|
374
|
+
</form>
|
|
375
|
+
) : (
|
|
376
|
+
<>
|
|
377
|
+
<Heading title="Where should your knowledge base live?">
|
|
378
|
+
Your knowledge, skills and tools are kept together in one git repository. Choose who looks after it.
|
|
379
|
+
</Heading>
|
|
380
|
+
<div role="radiogroup" aria-label="Where the knowledge base lives" className="grid gap-3 lg:grid-cols-2">
|
|
381
|
+
{choices.map((c, i) => (
|
|
382
|
+
<ChoiceCard
|
|
383
|
+
key={c}
|
|
384
|
+
ref={(el) => {
|
|
385
|
+
radios.current[i] = el;
|
|
386
|
+
}}
|
|
387
|
+
selected={choice === c}
|
|
388
|
+
onSelect={() => setChoice(c)}
|
|
389
|
+
onKeyDown={(e) => onRadioKeyDown(e, i)}
|
|
390
|
+
disabled={saving || needsRestart}
|
|
391
|
+
{...(c === 'managed'
|
|
392
|
+
? {
|
|
393
|
+
icon: <Server className="size-[18px]" aria-hidden />,
|
|
394
|
+
badge: 'Recommended',
|
|
395
|
+
title: managed.title,
|
|
396
|
+
description: managed.description,
|
|
397
|
+
points: [
|
|
398
|
+
'Every change is a commit, reviewed as a change request',
|
|
399
|
+
'Stored with this deployment’s backups',
|
|
400
|
+
'Movable to a repository of your own later',
|
|
401
|
+
],
|
|
402
|
+
}
|
|
403
|
+
: {
|
|
404
|
+
icon: <GitBranch className="size-[18px]" aria-hidden />,
|
|
405
|
+
title: 'My own GitHub',
|
|
406
|
+
description: 'Keep it in a repository your organisation owns.',
|
|
407
|
+
points: [
|
|
408
|
+
'Install the GitHub app, then pick a repository',
|
|
409
|
+
'Edits made here show up as commits',
|
|
410
|
+
'A brand-new empty repository is fine',
|
|
411
|
+
],
|
|
412
|
+
})}
|
|
413
|
+
/>
|
|
414
|
+
))}
|
|
415
|
+
</div>
|
|
416
|
+
{notices}
|
|
417
|
+
<div className="flex flex-wrap items-center gap-x-4 gap-y-2">
|
|
418
|
+
<Button type="button" variant="primary" onClick={proceed} disabled={saving || needsRestart}>
|
|
419
|
+
{saving ? 'Saving…' : 'Continue'}
|
|
420
|
+
</Button>
|
|
421
|
+
{/* Its own flex row with a line height of one, so the text's
|
|
422
|
+
centre, not a taller line box around it, lines up with the
|
|
423
|
+
middle of the Continue button. */}
|
|
424
|
+
<span className="flex flex-wrap items-center gap-x-1 text-detail leading-none text-ink-faint">
|
|
425
|
+
<span>Using GitLab, Bitbucket or Azure DevOps?</span>
|
|
426
|
+
<button
|
|
427
|
+
type="button"
|
|
428
|
+
onClick={() => open('address')}
|
|
429
|
+
disabled={saving}
|
|
430
|
+
className="leading-none text-accent underline underline-offset-2 hover:text-accent-hover"
|
|
431
|
+
>
|
|
432
|
+
Use an address and token
|
|
433
|
+
</button>
|
|
434
|
+
</span>
|
|
435
|
+
</div>
|
|
436
|
+
<p className="text-meta text-ink-faint">
|
|
437
|
+
To add single sign-on and the audit log, go to Settings → Deployment later.
|
|
438
|
+
</p>
|
|
439
|
+
</>
|
|
440
|
+
)}
|
|
441
|
+
</div>
|
|
442
|
+
</main>
|
|
443
|
+
</div>
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function Heading({ title, children }: { title: string; children: ReactNode }) {
|
|
448
|
+
return (
|
|
449
|
+
<div className="grid gap-2">
|
|
450
|
+
<h1 className="text-display font-semibold text-ink">{title}</h1>
|
|
451
|
+
<p className="max-w-[58ch] text-lede text-ink-muted">{children}</p>
|
|
452
|
+
</div>
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
interface ChoiceCardProps {
|
|
457
|
+
ref: (el: HTMLButtonElement | null) => void;
|
|
458
|
+
selected: boolean;
|
|
459
|
+
onSelect(): void;
|
|
460
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
461
|
+
disabled: boolean;
|
|
462
|
+
icon: ReactNode;
|
|
463
|
+
badge?: string;
|
|
464
|
+
title: string;
|
|
465
|
+
description: string;
|
|
466
|
+
points: string[];
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/** One way of keeping the repository, as a radio: its own heading, what it means, and what it asks. */
|
|
470
|
+
function ChoiceCard({ ref, selected, onSelect, onKeyDown, disabled, icon, badge, title, description, points }: ChoiceCardProps) {
|
|
471
|
+
// Named by its title and described by the rest, so a screen reader says
|
|
472
|
+
// "Hexis takes care of it, radio, checked" rather than the whole card.
|
|
473
|
+
const id = useId();
|
|
474
|
+
return (
|
|
475
|
+
<button
|
|
476
|
+
ref={ref}
|
|
477
|
+
type="button"
|
|
478
|
+
role="radio"
|
|
479
|
+
aria-checked={selected}
|
|
480
|
+
// Roving: the group is one Tab stop, on the card that is chosen.
|
|
481
|
+
tabIndex={selected ? 0 : -1}
|
|
482
|
+
onClick={onSelect}
|
|
483
|
+
onKeyDown={onKeyDown}
|
|
484
|
+
disabled={disabled}
|
|
485
|
+
aria-labelledby={`${id}-title`}
|
|
486
|
+
aria-describedby={`${id}-description ${id}-points`}
|
|
487
|
+
className={cn(
|
|
488
|
+
'relative grid content-start gap-3 rounded-xl border-[1.5px] bg-surface p-5 text-left transition-[border-color,box-shadow] hover:border-accent disabled:cursor-not-allowed disabled:opacity-60',
|
|
489
|
+
selected ? 'border-accent ring-3 ring-accent/15' : 'border-line-strong',
|
|
490
|
+
)}
|
|
491
|
+
>
|
|
492
|
+
{badge && (
|
|
493
|
+
<Badge size="sm" className="absolute top-4 right-4 bg-accent/10 font-semibold text-accent">
|
|
494
|
+
{badge}
|
|
495
|
+
</Badge>
|
|
496
|
+
)}
|
|
497
|
+
<span className="grid size-[34px] place-items-center rounded-md bg-sunken text-ink">{icon}</span>
|
|
498
|
+
<span id={`${id}-title`} className="text-head font-semibold text-ink">
|
|
499
|
+
{title}
|
|
500
|
+
</span>
|
|
501
|
+
<span id={`${id}-description`} className="text-ui text-ink-muted">
|
|
502
|
+
{description}
|
|
503
|
+
</span>
|
|
504
|
+
{/* Spans, not a list: a button holds phrasing content only. */}
|
|
505
|
+
<span id={`${id}-points`} className="grid gap-1.5">
|
|
506
|
+
{points.map((point) => (
|
|
507
|
+
<span key={point} className="flex gap-2 text-detail text-ink">
|
|
508
|
+
<Check className="mt-[3px] size-[13px] shrink-0 text-ok" aria-hidden />
|
|
509
|
+
{point}
|
|
510
|
+
</span>
|
|
511
|
+
))}
|
|
512
|
+
</span>
|
|
513
|
+
</button>
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/** A labelled field with its hint, the hint read out as the field's description. */
|
|
518
|
+
function Field({
|
|
519
|
+
label,
|
|
520
|
+
hint,
|
|
521
|
+
children,
|
|
522
|
+
}: {
|
|
523
|
+
label: string;
|
|
524
|
+
hint: string;
|
|
525
|
+
children: (id: string, describedBy: string) => ReactNode;
|
|
526
|
+
}) {
|
|
527
|
+
const id = useId();
|
|
528
|
+
return (
|
|
529
|
+
<div className="grid gap-1.5">
|
|
530
|
+
<label htmlFor={id} className="text-detail font-medium text-ink">
|
|
531
|
+
{label}
|
|
532
|
+
</label>
|
|
533
|
+
{children(id, `${id}-hint`)}
|
|
534
|
+
<p id={`${id}-hint`} className="text-meta text-ink-faint">
|
|
535
|
+
{hint}
|
|
536
|
+
</p>
|
|
537
|
+
</div>
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/** What the host said to the last test, in the words the full form uses. */
|
|
542
|
+
function ConnectionAnswer({ result }: { result: ConnectionTest }) {
|
|
543
|
+
if (result.ok) {
|
|
544
|
+
return (
|
|
545
|
+
<span role="status" className="flex items-center gap-1.5 text-detail text-ok">
|
|
546
|
+
<Check className="size-3.5" aria-hidden />
|
|
547
|
+
{result.empty ? 'Connected. The repository is empty; it will be set up for you.' : 'Connected.'}
|
|
548
|
+
</span>
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
const said =
|
|
552
|
+
result.outcome === 'read-only'
|
|
553
|
+
? 'This token can read the repository but cannot write to it. Give it write access and test again.'
|
|
554
|
+
: (result.error ?? 'The repository did not answer with these details.');
|
|
555
|
+
return (
|
|
556
|
+
<span role="alert" className="text-detail text-danger">
|
|
557
|
+
{said}
|
|
558
|
+
</span>
|
|
559
|
+
);
|
|
560
|
+
}
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { useState, type ReactNode } from 'react';
|
|
2
2
|
import { useSetupStatus } from '../hooks/useSetupStatus';
|
|
3
|
+
import { keptDraft } from '../utils/kept-draft';
|
|
4
|
+
import type { RepositoryStatus } from '../services/setup.api';
|
|
5
|
+
import { FirstRunStorage } from './FirstRunStorage';
|
|
3
6
|
import { SetupScreen } from './SetupScreen';
|
|
4
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Whether the deployment is at the very start: no way of having a repository
|
|
10
|
+
* chosen, by the settings or by the environment, and the one that needs no
|
|
11
|
+
* answers on offer. Only then is "where should it live?" the whole question.
|
|
12
|
+
* `chosen` is absent from a server that does not tell it apart from `mode`,
|
|
13
|
+
* which then says the same thing.
|
|
14
|
+
*/
|
|
15
|
+
function choosingStorage(repository: RepositoryStatus | undefined): repository is RepositoryStatus {
|
|
16
|
+
return (
|
|
17
|
+
!!repository &&
|
|
18
|
+
!repository.pinned &&
|
|
19
|
+
(repository.chosen ?? repository.mode) == null &&
|
|
20
|
+
repository.modes.includes('managed')
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Back from GitHub with what was typed on the full form kept for the trip:
|
|
26
|
+
* the trip started there, and that form is where it is put back.
|
|
27
|
+
*/
|
|
28
|
+
function backToTheFullForm(): boolean {
|
|
29
|
+
if (!new URLSearchParams(window.location.search ?? '').has('github')) return false;
|
|
30
|
+
const kept = keptDraft(() => false);
|
|
31
|
+
return Object.keys(kept.draft).length > 0 || kept.dropped.length > 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
5
34
|
/**
|
|
6
35
|
* Stands between a signed-in session and the application, and only lets it
|
|
7
36
|
* through once the deployment can reach its knowledge base.
|
|
@@ -27,6 +56,11 @@ export function SetupGate({ children }: { children: ReactNode }) {
|
|
|
27
56
|
// The status is read the shared way (`useSetupStatus`): only the latest
|
|
28
57
|
// read lands, so a late answer cannot undo what a newer one said.
|
|
29
58
|
const { status, failed, loaded, refresh } = useSetupStatus();
|
|
59
|
+
/**
|
|
60
|
+
* Back from a trip to GitHub that started on the full form: that form put
|
|
61
|
+
* away what was typed, and is where it is given back. Read once, on arrival.
|
|
62
|
+
*/
|
|
63
|
+
const [fullForm] = useState(backToTheFullForm);
|
|
30
64
|
|
|
31
65
|
// Nothing is claimed until the answer is in. Rendering the app here and
|
|
32
66
|
// replacing it a moment later would flash a broken workspace at exactly the
|
|
@@ -55,6 +89,17 @@ export function SetupGate({ children }: { children: ReactNode }) {
|
|
|
55
89
|
);
|
|
56
90
|
}
|
|
57
91
|
|
|
92
|
+
// A fresh deployment is asked one question first. Everything else, and
|
|
93
|
+
// every deployment past that point, gets the full form as it always has.
|
|
94
|
+
if (!fullForm && choosingStorage(status.repository)) {
|
|
95
|
+
return (
|
|
96
|
+
<FirstRunStorage
|
|
97
|
+
repository={status.repository}
|
|
98
|
+
onSaved={refresh}
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
58
103
|
return (
|
|
59
104
|
<SetupScreen
|
|
60
105
|
settings={status.settings}
|