diff --git a/.all-contributorsrc b/.all-contributorsrc index 9841a9047b..a0fc11c438 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -103,6 +103,33 @@ "contributions": [ "code" ] + }, + { + "login": "victoriasloan", + "name": "victoriasloan", + "avatar_url": "https://avatars.githubusercontent.com/u/9913651?v=4", + "profile": "https://github.com/victoriasloan", + "contributions": [ + "code" + ] + }, + { + "login": "yashank09", + "name": "yashank09", + "avatar_url": "https://avatars.githubusercontent.com/u/37672190?v=4", + "profile": "https://github.com/yashank09", + "contributions": [ + "code" + ] + }, + { + "login": "SOVLOOKUP", + "name": "SOVLOOKUP", + "avatar_url": "https://avatars.githubusercontent.com/u/53158137?v=4", + "profile": "https://github.com/SOVLOOKUP", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.md b/README.md index 2cc352607b..7aa5146b9a 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,10 @@ Watch "releases" of this repo to get notified of major updates, and give the sta

+### Stargazers over time + +[![Stargazers over time](https://starchart.cc/Budibase/budibase.svg)](https://starchart.cc/Budibase/budibase) + If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/master/CONTRIBUTING.md#troubleshooting) to clear down your environment. @@ -107,6 +111,8 @@ Budibase wants to make sure anyone can use the tools we develop and we know a lo Currently, you can host your apps using Docker or Digital Ocean. The documentation for self-hosting can be found [here](https://docs.budibase.com/self-hosting/introduction-to-self-hosting). +[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/droplets/new?onboarding_origin=marketplace&i=09038e&fleetUuid=bb04f9c8-1de8-4687-b2ae-1d5177a0535b&appId=77729671&type=applications&size=s-4vcpu-8gb®ion=nyc1&refcode=0caaa6085a82&image=budibase-20-04) + ## 🎓 Learning Budibase @@ -154,6 +160,7 @@ If you have a question or would like to talk with other Budibase users, please h ![Discord Shield](https://discordapp.com/api/guilds/733030666647765003/widget.png?style=shield) + ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): @@ -174,6 +181,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
pngwn

💻 ⚠️
HugoLd

💻 +
victoriasloan

💻 +
yashank09

💻 +
SOVLOOKUP

💻 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/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 299f11f0a7..79785f4e8d 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -3,6 +3,7 @@ import { get } from "svelte/store" import { backendUiStore, store } from "builderStore" import { findAllMatchingComponents, findComponentPath } from "./storeUtils" import { makePropSafe } from "@budibase/string-templates" +import { TableNames } from "../constants" // Regex to match all instances of template strings const CAPTURE_VAR_INSIDE_TEMPLATE = /{{([^}]+)}}/g @@ -117,6 +118,37 @@ export const getContextBindings = (rootComponent, componentId) => { }) }) }) + + // Add logged in user bindings + const tables = get(backendUiStore).tables + const userTable = tables.find(table => table._id === TableNames.USERS) + const schema = { + ...userTable.schema, + _id: { type: "string" }, + _rev: { type: "string" }, + } + const keys = Object.keys(schema).sort() + keys.forEach(key => { + const fieldSchema = schema[key] + // Replace certain bindings with a new property to help display components + let runtimeBoundKey = key + if (fieldSchema.type === "link") { + runtimeBoundKey = `${key}_count` + } else if (fieldSchema.type === "attachment") { + runtimeBoundKey = `${key}_first` + } + + contextBindings.push({ + type: "context", + runtimeBinding: `user.${runtimeBoundKey}`, + readableBinding: `Current User.${key}`, + fieldSchema, + providerId: "user", + tableId: TableNames.USERS, + field: key, + }) + }) + return contextBindings } diff --git a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte index 3b97f6d61b..981c1297e6 100644 --- a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte @@ -9,6 +9,7 @@ let permissions = [] let selectedRole = {} let errors = [] + let builtInRoles = ['Admin', 'Power', 'Basic', 'Public'] $: selectedRoleId = selectedRole._id $: otherRoles = $backendUiStore.roles.filter( role => role._id !== selectedRoleId @@ -102,7 +103,7 @@ {/each} {#if selectedRole} - + + + + + {: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 - +
+ + + +