diff --git a/hosting/update.sh b/hosting/update.sh new file mode 100644 index 0000000000..3ccd5e59d0 --- /dev/null +++ b/hosting/update.sh @@ -0,0 +1 @@ +docker-compose --env-file hosting.properties pull && ./start.sh diff --git a/packages/builder/package.json b/packages/builder/package.json index 440215d65c..f8a2f6b60d 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -74,6 +74,7 @@ "codemirror": "^5.59.0", "d3-selection": "^1.4.1", "deepmerge": "^4.2.2", + "downloadjs": "^1.4.7", "fast-sort": "^2.2.0", "lodash": "^4.17.13", "posthog-js": "1.4.5", diff --git a/packages/builder/src/components/start/AppCard.svelte b/packages/builder/src/components/start/AppCard.svelte index 6a6941b67d..a64b0527ff 100644 --- a/packages/builder/src/components/start/AppCard.svelte +++ b/packages/builder/src/components/start/AppCard.svelte @@ -2,7 +2,26 @@ import { TextButton } from "@budibase/bbui" import { Heading } from "@budibase/bbui" import { Spacer } from "@budibase/bbui" + import api from "builderStore/api" + import { notifier } from "builderStore/store/notifications" + import Spinner from "components/common/Spinner.svelte" + import download from "downloadjs" + export let name, _id + + let appExportLoading = false + + async function exportApp() { + appExportLoading = true + try { + download(`/api/backups/export?appId=${_id}`) + notifier.success("App Export Complete.") + } catch (err) { + notifier.danger("App Export Failed.") + } finally { + appExportLoading = false + } + }
@@ -14,6 +33,9 @@ {name} → + {#if appExportLoading} + + {:else}{/if}
@@ -31,7 +53,17 @@ .card-footer { display: flex; flex-direction: row; - align-items: baseline; + align-items: center; justify-content: space-between; } + + i { + font-size: var(--font-size-l); + cursor: pointer; + transition: 0.2s all; + } + + i:hover { + color: var(--blue); + } diff --git a/packages/builder/src/components/start/Steps/Info.svelte b/packages/builder/src/components/start/Steps/Info.svelte index 6cb4d94168..e14e327bce 100644 --- a/packages/builder/src/components/start/Steps/Info.svelte +++ b/packages/builder/src/components/start/Steps/Info.svelte @@ -1,14 +1,51 @@ -

Create your Web App

+{#if template?.fromFile} +

Import Your Web App From A File

+{:else} +

Create your Web App

+{/if}
- {#if template} + {#if template?.fromFile} +
+ +
+ + +
+
+ {:else if template}
{template.name} @@ -33,4 +70,48 @@ /* Fix layout due to LH 0 on heading */ margin-bottom: 16px; } + + .dropzone { + text-align: center; + display: flex; + align-items: center; + flex-direction: column; + border-radius: 10px; + transition: all 0.3s; + } + + .uploaded { + color: var(--blue); + } + + input[type="file"] { + display: none; + } + + label { + font-family: var(--font-sans); + cursor: pointer; + font-weight: 500; + box-sizing: border-box; + overflow: hidden; + border-radius: var(--border-radius-s); + color: var(--ink); + padding: var(--spacing-m) var(--spacing-l); + transition: all 0.2s ease 0s; + display: inline-flex; + text-rendering: optimizeLegibility; + min-width: auto; + outline: none; + font-feature-settings: "case" 1, "rlig" 1, "calt" 0; + -webkit-box-align: center; + user-select: none; + flex-shrink: 0; + align-items: center; + justify-content: center; + width: 100%; + background-color: var(--grey-2); + font-size: var(--font-size-xs); + line-height: normal; + border: var(--border-transparent); + } diff --git a/packages/builder/src/pages/index.svelte b/packages/builder/src/pages/index.svelte index 7de3a2bb35..5aa99be35b 100644 --- a/packages/builder/src/pages/index.svelte +++ b/packages/builder/src/pages/index.svelte @@ -4,7 +4,7 @@ import AppList from "components/start/AppList.svelte" import { get } from "builderStore/api" import CreateAppModal from "components/start/CreateAppModal.svelte" - import { Button, Heading, Modal } from "@budibase/bbui" + import { Button, Heading, Modal, Spacer } from "@budibase/bbui" import TemplateList from "components/start/TemplateList.svelte" import analytics from "analytics" @@ -43,13 +43,22 @@ modal.show() } + function initiateAppImport() { + template = { fromFile: true } + modal.show() + } + checkIfKeysAndApps()
Welcome to the Budibase Beta - +
+ + + +