@adminide-stack/yantra-mobile 12.0.179 → 12.0.181
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/lib/features/computer/computerChat.js +4 -1
- package/lib/features/computer/computerChat.js.map +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js +205 -31
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/components/GithubConnectSheet.js +159 -0
- package/lib/features/webbuilder/components/GithubConnectSheet.js.map +1 -0
- package/lib/features/webbuilder/components/ProjectSheets.js +3 -1
- package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectsScreen.js +122 -23
- package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -1
- package/lib/features/webbuilder/components/ShareSheet.js +144 -4
- package/lib/features/webbuilder/components/ShareSheet.js.map +1 -1
- package/lib/features/webbuilder/components/SiteUploadSheet.js +92 -3
- package/lib/features/webbuilder/components/SiteUploadSheet.js.map +1 -1
- package/lib/features/webbuilder/components/TemplateCard.js +33 -3
- package/lib/features/webbuilder/components/TemplateCard.js.map +1 -1
- package/lib/features/webbuilder/components/TemplatesSheet.js +54 -15
- package/lib/features/webbuilder/components/TemplatesSheet.js.map +1 -1
- package/lib/features/webbuilder/projectsList.js +117 -0
- package/lib/features/webbuilder/projectsList.js.map +1 -0
- package/lib/features/webbuilder/templateCatalog.js +13 -1
- package/lib/features/webbuilder/templateCatalog.js.map +1 -1
- package/lib/features/webbuilder/uploadCard.js +169 -0
- package/lib/features/webbuilder/uploadCard.js.map +1 -0
- package/lib/features/webbuilder/web/github/autoSync.js +1 -1
- package/lib/features/webbuilder/web/github/autoSync.js.map +1 -1
- package/lib/features/webbuilder/web/github/githubConnect.js +179 -0
- package/lib/features/webbuilder/web/github/githubConnect.js.map +1 -0
- package/lib/features/webbuilder/web/github/githubConnectApi.js +102 -0
- package/lib/features/webbuilder/web/github/githubConnectApi.js.map +1 -0
- package/lib/features/webbuilder/web/history/versions.js.map +1 -1
- package/lib/features/webbuilder/web/sharing/roles.js +50 -4
- package/lib/features/webbuilder/web/sharing/roles.js.map +1 -1
- package/lib/features/webbuilder/web/sharing/sharingApi.js +97 -6
- package/lib/features/webbuilder/web/sharing/sharingApi.js.map +1 -1
- package/lib/features/webbuilder/web/state/storageKeys.js +2 -0
- package/lib/features/webbuilder/web/state/storageKeys.js.map +1 -1
- package/lib/features/webbuilder/web/upload/sitePhotos.js +256 -2
- package/lib/features/webbuilder/web/upload/sitePhotos.js.map +1 -1
- package/lib/features/webbuilder/web/webServices.js +13 -1
- package/lib/features/webbuilder/web/webServices.js.map +1 -1
- package/lib/screens/ChatHistory/index.js +2 -2
- package/lib/screens/ChatHistory/index.js.map +1 -1
- package/lib/screens/ComputerNative/useComputerHostChat.js +7 -3
- package/lib/screens/ComputerNative/useComputerHostChat.js.map +1 -1
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js +11 -3
- package/lib/screens/WebBuilder/nativeWebBuilderRedirect.js.map +1 -1
- package/lib/screens/WebBuilderNative/index.js +43 -10
- package/lib/screens/WebBuilderNative/index.js.map +1 -1
- package/lib/screens/WebBuilderNative/runningBuilds.js +44 -2
- package/lib/screens/WebBuilderNative/runningBuilds.js.map +1 -1
- package/lib/screens/WebBuilderNative/useConnectorTemplates.js +12 -3
- package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -1
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js +2 -0
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {useState,useEffect}from'react';import {StyleSheet,View,Text,Linking,TextInput}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {GITHUB_TOKEN_PAGE_URL}from'../web/github/githubConnect.js';import {Sheet,PrimaryButton,SecondaryButton}from'./ui.js';function GithubConnectSheet({
|
|
2
|
+
visible,
|
|
3
|
+
service,
|
|
4
|
+
connectedLogin,
|
|
5
|
+
replacing,
|
|
6
|
+
request,
|
|
7
|
+
onConnected,
|
|
8
|
+
onClose,
|
|
9
|
+
theme
|
|
10
|
+
}) {
|
|
11
|
+
const [token, setToken] = useState("");
|
|
12
|
+
const [busy, setBusy] = useState(false);
|
|
13
|
+
const [error, setError] = useState(null);
|
|
14
|
+
const [login, setLogin] = useState(null);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (visible) return;
|
|
17
|
+
setToken("");
|
|
18
|
+
setBusy(false);
|
|
19
|
+
setError(null);
|
|
20
|
+
setLogin(null);
|
|
21
|
+
}, [visible]);
|
|
22
|
+
const submit = async () => {
|
|
23
|
+
if (busy || !token.trim()) return;
|
|
24
|
+
setBusy(true);
|
|
25
|
+
setError(null);
|
|
26
|
+
const r = await service.connectGithub(token).catch(() => ({
|
|
27
|
+
ok: false,
|
|
28
|
+
message: "Couldn't save the connection. Try again."
|
|
29
|
+
}));
|
|
30
|
+
setBusy(false);
|
|
31
|
+
if (!r.ok) {
|
|
32
|
+
setError(r.message);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
setToken("");
|
|
36
|
+
setLogin(r.value.login);
|
|
37
|
+
onConnected(r.value.login);
|
|
38
|
+
};
|
|
39
|
+
const done = () => {
|
|
40
|
+
const next = request == null ? void 0 : request.onConnected;
|
|
41
|
+
const who = login;
|
|
42
|
+
onClose();
|
|
43
|
+
if (next && who) next(who);
|
|
44
|
+
};
|
|
45
|
+
if (login) {
|
|
46
|
+
return /* @__PURE__ */ jsx(Sheet, { visible, title: "GitHub connected", onClose: done, theme, testID: "webbuilder-github-connect", children: /* @__PURE__ */ jsxs(View, { style: styles.body, children: [
|
|
47
|
+
/* @__PURE__ */ jsxs(View, { style: styles.row, accessibilityLiveRegion: "polite", children: [
|
|
48
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "check-circle", size: 20, color: theme.good }),
|
|
49
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles.lead, {
|
|
50
|
+
color: theme.ink
|
|
51
|
+
}], children: [
|
|
52
|
+
"Connected as @",
|
|
53
|
+
login
|
|
54
|
+
] })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.help, {
|
|
57
|
+
color: theme.muted
|
|
58
|
+
}], children: "Push to GitHub, Keep in sync and Code in Codezen now use your own GitHub account." }),
|
|
59
|
+
/* @__PURE__ */ jsx(PrimaryButton, { label: (request == null ? void 0 : request.continueLabel) || "Done", onPress: done, theme, testID: "webbuilder-github-connect-done" })
|
|
60
|
+
] }) });
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */ jsx(Sheet, { visible, title: replacing ? "Use a different GitHub token" : "Connect GitHub", onClose: busy ? () => void 0 : onClose, theme, testID: "webbuilder-github-connect", children: /* @__PURE__ */ jsxs(View, { style: styles.body, children: [
|
|
63
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.help, {
|
|
64
|
+
color: theme.muted
|
|
65
|
+
}], children: replacing ? `${connectedLogin ? `Connected as @${connectedLogin}` : "GitHub is connected"}. Paste a new token to replace it.` : "Paste a GitHub token so the builder can create repositories and push your code to your own account." }),
|
|
66
|
+
/* @__PURE__ */ jsxs(View, { style: styles.step, children: [
|
|
67
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.stepNo, {
|
|
68
|
+
color: theme.ink
|
|
69
|
+
}], children: "1." }),
|
|
70
|
+
/* @__PURE__ */ jsxs(View, { style: styles.stepText, children: [
|
|
71
|
+
/* @__PURE__ */ jsxs(Tap, { onPress: () => {
|
|
72
|
+
Linking.openURL(GITHUB_TOKEN_PAGE_URL).catch(() => void 0);
|
|
73
|
+
}, accessibilityRole: "link", pressedStyle: DIM, style: styles.row, testID: "webbuilder-github-token-link", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.link, {
|
|
75
|
+
color: theme.accent
|
|
76
|
+
}], children: "Create a token on GitHub" }),
|
|
77
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "open-in-new", size: 15, color: theme.accent })
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.help, {
|
|
80
|
+
color: theme.muted
|
|
81
|
+
}], children: 'The "repo" box is already ticked. Pick an expiry, then press Generate token.' })
|
|
82
|
+
] })
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ jsxs(View, { style: styles.step, children: [
|
|
85
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.stepNo, {
|
|
86
|
+
color: theme.ink
|
|
87
|
+
}], children: "2." }),
|
|
88
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.lead, {
|
|
89
|
+
color: theme.ink
|
|
90
|
+
}], children: "Copy the token and paste it here." })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ jsx(TextInput, { value: token, onChangeText: (t) => {
|
|
93
|
+
setToken(t);
|
|
94
|
+
if (error) setError(null);
|
|
95
|
+
}, placeholder: "ghp_\u2026 or github_pat_\u2026", placeholderTextColor: theme.faint, secureTextEntry: true, autoCapitalize: "none", autoCorrect: false, editable: !busy, onSubmitEditing: () => {
|
|
96
|
+
submit().catch(() => void 0);
|
|
97
|
+
}, style: [styles.input, {
|
|
98
|
+
color: theme.ink,
|
|
99
|
+
borderColor: theme.border,
|
|
100
|
+
backgroundColor: theme.screen
|
|
101
|
+
}], accessibilityLabel: "GitHub token", testID: "webbuilder-github-token" }),
|
|
102
|
+
error ? /* @__PURE__ */ jsx(Text, { style: [styles.help, {
|
|
103
|
+
color: theme.crit
|
|
104
|
+
}], accessibilityRole: "alert", children: error }) : /* @__PURE__ */ jsx(Text, { style: [styles.help, {
|
|
105
|
+
color: theme.muted
|
|
106
|
+
}], children: "The token is checked with GitHub, then kept in your Yantra vault. It is never shown again." }),
|
|
107
|
+
/* @__PURE__ */ jsx(PrimaryButton, { label: busy ? "Connecting\u2026" : "Connect", onPress: () => {
|
|
108
|
+
submit().catch(() => void 0);
|
|
109
|
+
}, busy, disabled: !token.trim(), theme, testID: "webbuilder-github-connect-submit" }),
|
|
110
|
+
busy ? null : /* @__PURE__ */ jsx(SecondaryButton, { label: "Cancel", onPress: onClose, theme })
|
|
111
|
+
] }) });
|
|
112
|
+
}
|
|
113
|
+
const styles = StyleSheet.create({
|
|
114
|
+
body: {
|
|
115
|
+
gap: 14,
|
|
116
|
+
paddingBottom: 8
|
|
117
|
+
},
|
|
118
|
+
row: {
|
|
119
|
+
flexDirection: "row",
|
|
120
|
+
alignItems: "center",
|
|
121
|
+
gap: 8
|
|
122
|
+
},
|
|
123
|
+
lead: {
|
|
124
|
+
fontSize: 16,
|
|
125
|
+
lineHeight: 22,
|
|
126
|
+
flexShrink: 1
|
|
127
|
+
},
|
|
128
|
+
help: {
|
|
129
|
+
fontSize: 14,
|
|
130
|
+
lineHeight: 20
|
|
131
|
+
},
|
|
132
|
+
link: {
|
|
133
|
+
fontSize: 16,
|
|
134
|
+
fontWeight: "600"
|
|
135
|
+
},
|
|
136
|
+
step: {
|
|
137
|
+
flexDirection: "row",
|
|
138
|
+
gap: 8,
|
|
139
|
+
alignItems: "flex-start"
|
|
140
|
+
},
|
|
141
|
+
stepNo: {
|
|
142
|
+
fontSize: 16,
|
|
143
|
+
lineHeight: 22,
|
|
144
|
+
fontWeight: "600",
|
|
145
|
+
width: 18
|
|
146
|
+
},
|
|
147
|
+
stepText: {
|
|
148
|
+
flex: 1,
|
|
149
|
+
gap: 4
|
|
150
|
+
},
|
|
151
|
+
input: {
|
|
152
|
+
borderWidth: 1,
|
|
153
|
+
borderRadius: 12,
|
|
154
|
+
paddingHorizontal: 14,
|
|
155
|
+
paddingVertical: 12,
|
|
156
|
+
fontSize: 15,
|
|
157
|
+
fontFamily: "Courier"
|
|
158
|
+
}
|
|
159
|
+
});export{GithubConnectSheet};//# sourceMappingURL=GithubConnectSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GithubConnectSheet.js","sources":["../../../../src/features/webbuilder/components/GithubConnectSheet.tsx"],"sourcesContent":["/**\n * Connect GitHub (web 0.20.0 `github/GithubConnectDialog`): paste a GitHub token so pushes, Keep in sync and\n * Code in Codezen use the person's own GitHub account. The token is checked with GitHub (`/user`, the `repo`\n * scope), then saved as their own GitHub credential in the Yantra vault; it is never shown again. Opened from the\n * GitHub menu and from every \"connect your GitHub\" error, where the success button continues what was asked.\n */\nimport React, { useEffect, useState } from 'react';\nimport { Linking, StyleSheet, Text, TextInput, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { DIM, Tap } from '../../inbox/components/Tap';\nimport { GITHUB_TOKEN_PAGE_URL } from '../web/github/githubConnect';\nimport type { GithubConnectService } from '../web/github/githubConnectApi';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\nimport { PrimaryButton, SecondaryButton, Sheet } from './ui';\n\nexport interface GithubConnectRequest {\n /** The success button's label when an action continues after connecting (\"Push again\"). */\n continueLabel?: string;\n onConnected?: (login: string) => void;\n}\n\nexport function GithubConnectSheet({\n visible,\n service,\n connectedLogin,\n replacing,\n request,\n onConnected,\n onClose,\n theme,\n}: {\n visible: boolean;\n service: GithubConnectService;\n /** Already connected: the sheet replaces the token. */\n replacing: boolean;\n connectedLogin: string | null;\n request: GithubConnectRequest | null;\n /** The connection was saved (the host keeps the state). */\n onConnected: (login: string) => void;\n onClose: () => void;\n theme: WebBuilderTheme;\n}) {\n const [token, setToken] = useState('');\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [login, setLogin] = useState<string | null>(null);\n\n useEffect(() => {\n if (visible) return;\n setToken('');\n setBusy(false);\n setError(null);\n setLogin(null);\n }, [visible]);\n\n const submit = async () => {\n if (busy || !token.trim()) return;\n setBusy(true);\n setError(null);\n const r = await service.connectGithub(token).catch(() => ({\n ok: false as const,\n message: \"Couldn't save the connection. Try again.\",\n }));\n setBusy(false);\n if (!r.ok) {\n setError(r.message);\n return;\n }\n // Nothing keeps the token once it is saved.\n setToken('');\n setLogin(r.value.login);\n onConnected(r.value.login);\n };\n\n const done = () => {\n const next = request?.onConnected;\n const who = login;\n onClose();\n if (next && who) next(who);\n };\n\n if (login) {\n return (\n <Sheet\n visible={visible}\n title=\"GitHub connected\"\n onClose={done}\n theme={theme}\n testID=\"webbuilder-github-connect\"\n >\n <View style={styles.body}>\n <View style={styles.row} accessibilityLiveRegion=\"polite\">\n <MaterialCommunityIcons name=\"check-circle\" size={20} color={theme.good} />\n <Text style={[styles.lead, { color: theme.ink }]}>Connected as @{login}</Text>\n </View>\n <Text style={[styles.help, { color: theme.muted }]}>\n Push to GitHub, Keep in sync and Code in Codezen now use your own GitHub account.\n </Text>\n <PrimaryButton\n label={request?.continueLabel || 'Done'}\n onPress={done}\n theme={theme}\n testID=\"webbuilder-github-connect-done\"\n />\n </View>\n </Sheet>\n );\n }\n\n return (\n <Sheet\n visible={visible}\n title={replacing ? 'Use a different GitHub token' : 'Connect GitHub'}\n onClose={busy ? () => undefined : onClose}\n theme={theme}\n testID=\"webbuilder-github-connect\"\n >\n <View style={styles.body}>\n <Text style={[styles.help, { color: theme.muted }]}>\n {replacing\n ? `${connectedLogin ? `Connected as @${connectedLogin}` : 'GitHub is connected'}. Paste a new token to replace it.`\n : 'Paste a GitHub token so the builder can create repositories and push your code to your own account.'}\n </Text>\n <View style={styles.step}>\n <Text style={[styles.stepNo, { color: theme.ink }]}>1.</Text>\n <View style={styles.stepText}>\n <Tap\n onPress={() => {\n Linking.openURL(GITHUB_TOKEN_PAGE_URL).catch(() => undefined);\n }}\n accessibilityRole=\"link\"\n pressedStyle={DIM}\n style={styles.row}\n testID=\"webbuilder-github-token-link\"\n >\n <Text style={[styles.link, { color: theme.accent }]}>Create a token on GitHub</Text>\n <MaterialCommunityIcons name=\"open-in-new\" size={15} color={theme.accent} />\n </Tap>\n <Text style={[styles.help, { color: theme.muted }]}>\n The "repo" box is already ticked. Pick an expiry, then press Generate token.\n </Text>\n </View>\n </View>\n <View style={styles.step}>\n <Text style={[styles.stepNo, { color: theme.ink }]}>2.</Text>\n <Text style={[styles.lead, { color: theme.ink }]}>Copy the token and paste it here.</Text>\n </View>\n <TextInput\n value={token}\n onChangeText={(t) => {\n setToken(t);\n if (error) setError(null);\n }}\n placeholder=\"ghp_… or github_pat_…\"\n placeholderTextColor={theme.faint}\n secureTextEntry\n autoCapitalize=\"none\"\n autoCorrect={false}\n editable={!busy}\n onSubmitEditing={() => {\n submit().catch(() => undefined);\n }}\n style={[\n styles.input,\n { color: theme.ink, borderColor: theme.border, backgroundColor: theme.screen },\n ]}\n accessibilityLabel=\"GitHub token\"\n testID=\"webbuilder-github-token\"\n />\n {error ? (\n <Text style={[styles.help, { color: theme.crit }]} accessibilityRole=\"alert\">\n {error}\n </Text>\n ) : (\n <Text style={[styles.help, { color: theme.muted }]}>\n The token is checked with GitHub, then kept in your Yantra vault. It is never shown again.\n </Text>\n )}\n <PrimaryButton\n label={busy ? 'Connecting…' : 'Connect'}\n onPress={() => {\n submit().catch(() => undefined);\n }}\n busy={busy}\n disabled={!token.trim()}\n theme={theme}\n testID=\"webbuilder-github-connect-submit\"\n />\n {busy ? null : <SecondaryButton label=\"Cancel\" onPress={onClose} theme={theme} />}\n </View>\n </Sheet>\n );\n}\n\nconst styles = StyleSheet.create({\n body: { gap: 14, paddingBottom: 8 },\n row: { flexDirection: 'row', alignItems: 'center', gap: 8 },\n lead: { fontSize: 16, lineHeight: 22, flexShrink: 1 },\n help: { fontSize: 14, lineHeight: 20 },\n link: { fontSize: 16, fontWeight: '600' },\n step: { flexDirection: 'row', gap: 8, alignItems: 'flex-start' },\n stepNo: { fontSize: 16, lineHeight: 22, fontWeight: '600', width: 18 },\n stepText: { flex: 1, gap: 4 },\n input: {\n borderWidth: 1,\n borderRadius: 12,\n paddingHorizontal: 14,\n paddingVertical: 12,\n fontSize: 15,\n fontFamily: 'Courier',\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View,Text,TextInput,ActivityIndicator,Alert,Image}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {CopyGraphicsChoice}from'./ReferenceModeChoice.js';import {websiteImportUrl}from'../web/import/websiteImport.js';import {parseProjectSettings,PROJECT_KNOWLEDGE_MAX,DEFAULT_SYNC_BRANCH,repoSlug,isValidRepoName,normalizeBranch,groupCatalog,importTurn,normalizeProjectTitle,normalizeProjectKnowledge,readSettingsUpdateReply,githubSyncPatch,parseCatalog,withIntegration,aiRequest,integrationRequest,parseRepoInput,readRepoCheck}from'../projectTools.js';import {isGenericTitle}from'../buildFragments.js';import {Sheet,PrimaryButton,SecondaryButton}from'./ui.js';function Row({
|
|
1
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState,useEffect,useMemo}from'react';import {StyleSheet,ScrollView,View,Text,TextInput,ActivityIndicator,Alert,Image}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {CopyGraphicsChoice}from'./ReferenceModeChoice.js';import {websiteImportUrl}from'../web/import/websiteImport.js';import {parseProjectSettings,PROJECT_KNOWLEDGE_MAX,DEFAULT_SYNC_BRANCH,repoSlug,isValidRepoName,normalizeBranch,groupCatalog,importTurn,normalizeProjectTitle,normalizeProjectKnowledge,readSettingsUpdateReply,githubSyncPatch,parseCatalog,withIntegration,aiRequest,integrationRequest,parseRepoInput,readRepoCheck}from'../projectTools.js';import {isGenericTitle}from'../buildFragments.js';import {needsGithubConnection}from'../web/github/githubConnect.js';import {Sheet,PrimaryButton,SecondaryButton}from'./ui.js';function Row({
|
|
2
2
|
item,
|
|
3
3
|
onPick,
|
|
4
4
|
open,
|
|
@@ -227,6 +227,7 @@ function GithubPushSheet({
|
|
|
227
227
|
tools,
|
|
228
228
|
onStarted,
|
|
229
229
|
onClose,
|
|
230
|
+
onConnectGithub,
|
|
230
231
|
theme
|
|
231
232
|
}) {
|
|
232
233
|
const [repo, setRepo] = useState("");
|
|
@@ -327,6 +328,7 @@ function GithubPushSheet({
|
|
|
327
328
|
error ? /* @__PURE__ */ jsx(Text, { style: [styles.help, {
|
|
328
329
|
color: theme.crit
|
|
329
330
|
}], children: error }) : null,
|
|
331
|
+
error && onConnectGithub && needsGithubConnection(error) ? /* @__PURE__ */ jsx(SecondaryButton, { label: "Connect GitHub", icon: "key-variant", onPress: onConnectGithub, theme, testID: "webbuilder-github-push-connect" }) : null,
|
|
330
332
|
/* @__PURE__ */ jsx(PrimaryButton, { label: repoUrl ? "Push" : "Create & Push", icon: "github", onPress: () => {
|
|
331
333
|
push().catch(() => void 0);
|
|
332
334
|
}, theme, busy: working, disabled: !canSubmit, testID: "webbuilder-github-submit" })
|