|
|
@ -9,7 +9,7 @@ |
|
|
Checkbox, |
|
|
Checkbox, |
|
|
} from "@budibase/bbui" |
|
|
} from "@budibase/bbui" |
|
|
import { store, automationStore, hostingStore } from "builderStore" |
|
|
import { store, automationStore, hostingStore } from "builderStore" |
|
|
import { admin } from "stores/portal" |
|
|
import { admin, auth } from "stores/portal" |
|
|
import { string, mixed, object } from "yup" |
|
|
import { string, mixed, object } from "yup" |
|
|
import api, { get, post } from "builderStore/api" |
|
|
import api, { get, post } from "builderStore/api" |
|
|
import analytics, { Events } from "analytics" |
|
|
import analytics, { Events } from "analytics" |
|
|
@ -139,6 +139,7 @@ |
|
|
} |
|
|
} |
|
|
const userResp = await api.post(`/api/users/metadata/self`, user) |
|
|
const userResp = await api.post(`/api/users/metadata/self`, user) |
|
|
await userResp.json() |
|
|
await userResp.json() |
|
|
|
|
|
await auth.setInitInfo({}) |
|
|
$goto(`/builder/app/${appJson.instance._id}`) |
|
|
$goto(`/builder/app/${appJson.instance._id}`) |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error(error) |
|
|
console.error(error) |
|
|
@ -146,6 +147,16 @@ |
|
|
submitting = false |
|
|
submitting = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getModalTitle() { |
|
|
|
|
|
let title = "Create App" |
|
|
|
|
|
if (template.fromFile) { |
|
|
|
|
|
title = "Import App" |
|
|
|
|
|
} else if (template.key) { |
|
|
|
|
|
title = "Create app from template" |
|
|
|
|
|
} |
|
|
|
|
|
return title |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
{#if showTemplateSelection} |
|
|
{#if showTemplateSelection} |
|
|
@ -172,7 +183,7 @@ |
|
|
</ModalContent> |
|
|
</ModalContent> |
|
|
{:else} |
|
|
{:else} |
|
|
<ModalContent |
|
|
<ModalContent |
|
|
title={template?.fromFile ? "Import app" : "Create app"} |
|
|
title={getModalTitle()} |
|
|
confirmText={template?.fromFile ? "Import app" : "Create app"} |
|
|
confirmText={template?.fromFile ? "Import app" : "Create app"} |
|
|
onConfirm={createNewApp} |
|
|
onConfirm={createNewApp} |
|
|
onCancel={inline ? () => (template = null) : null} |
|
|
onCancel={inline ? () => (template = null) : null} |
|
|
|