diff --git a/hosting/envoy.dev.yaml.hbs b/hosting/envoy.dev.yaml.hbs index 98b554165c..3a7e73c89c 100644 --- a/hosting/envoy.dev.yaml.hbs +++ b/hosting/envoy.dev.yaml.hbs @@ -33,7 +33,7 @@ static_resources: route: cluster: server-dev - - match: { prefix: "/builder/" } + - match: { prefix: "/" } route: cluster: builder-dev @@ -41,10 +41,6 @@ static_resources: route: cluster: builder-dev prefix_rewrite: "/builder/" - - # special case in dev to redirect no path to builder - - match: { path: "/" } - redirect: { path_redirect: "/builder/" } # minio is on the default route because this works # best, minio + AWS SDK doesn't handle path proxy diff --git a/packages/auth/src/db/utils.js b/packages/auth/src/db/utils.js index 105e038907..4bc0427976 100644 --- a/packages/auth/src/db/utils.js +++ b/packages/auth/src/db/utils.js @@ -132,29 +132,32 @@ const determineScopedConfig = async function (db, { type, user, group }) { } ) ) - const configs = response.rows.map(row => { + + function determineScore(row) { const config = row.doc // Config is specific to a user and a group if (config._id.includes(generateConfigID({ type, user, group }))) { - config.score = 4 + return 4 } else if (config._id.includes(generateConfigID({ type, user }))) { // Config is specific to a user only - config.score = 3 + return 3 } else if (config._id.includes(generateConfigID({ type, group }))) { // Config is specific to a group only - config.score = 2 + return 2 } else if (config._id.includes(generateConfigID({ type }))) { // Config is specific to a type only - config.score = 1 + return 1 } - return config - }) + return 0 + } // Find the config with the most granular scope based on context - const scopedConfig = configs.sort((a, b) => b.score - a.score)[0] + const scopedConfig = response.rows.sort( + (a, b) => determineScore(a) - determineScore(b) + )[0] - return scopedConfig + return scopedConfig.doc } exports.generateConfigID = generateConfigID diff --git a/packages/bbui/src/Avatar/Avatar.svelte b/packages/bbui/src/Avatar/Avatar.svelte index d2aef72446..141b7c1b37 100644 --- a/packages/bbui/src/Avatar/Avatar.svelte +++ b/packages/bbui/src/Avatar/Avatar.svelte @@ -1,12 +1,58 @@ -Avatar +{#if url} + Avatar +{:else} +
+ {getInitials(name)} +
+{/if} + + diff --git a/packages/bbui/src/ProgressCircle/ProgressCircle.svelte b/packages/bbui/src/ProgressCircle/ProgressCircle.svelte index c3c0fb39d6..711517ec7b 100644 --- a/packages/bbui/src/ProgressCircle/ProgressCircle.svelte +++ b/packages/bbui/src/ProgressCircle/ProgressCircle.svelte @@ -1,31 +1,60 @@
-
+
-
+
diff --git a/packages/builder/index.html b/packages/builder/index.html index d6f19a2d43..de8f8a6beb 100644 --- a/packages/builder/index.html +++ b/packages/builder/index.html @@ -3,7 +3,7 @@ - Budibase Builder + Budibase diff --git a/packages/builder/src/builderStore/index.js b/packages/builder/src/builderStore/index.js index 6fecda84c0..bd849c834f 100644 --- a/packages/builder/src/builderStore/index.js +++ b/packages/builder/src/builderStore/index.js @@ -2,6 +2,7 @@ import { getFrontendStore } from "./store/frontend" import { getAutomationStore } from "./store/automation" import { getHostingStore } from "./store/hosting" import { getThemeStore } from "./store/theme" +import { getAdminStore } from "./store/admin" import { derived, writable } from "svelte/store" import analytics from "analytics" import { FrontendTypes, LAYOUT_NAMES } from "../constants" @@ -11,6 +12,7 @@ export const store = getFrontendStore() export const automationStore = getAutomationStore() export const themeStore = getThemeStore() export const hostingStore = getHostingStore() +export const adminPanelStore = getAdminStore() export const currentAsset = derived(store, $store => { const type = $store.currentFrontEndType diff --git a/packages/builder/src/builderStore/store/admin.js b/packages/builder/src/builderStore/store/admin.js new file mode 100644 index 0000000000..dcf7fef485 --- /dev/null +++ b/packages/builder/src/builderStore/store/admin.js @@ -0,0 +1,11 @@ +import { writable } from "svelte/store" + +const INITIAL_ADMIN_STATE = { + oauth: [], +} + +export const getAdminStore = () => { + const store = writable({ ...INITIAL_ADMIN_STATE }) + store.actions = {} + return store +} diff --git a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte index 36e0d1661c..de5400d0ba 100644 --- a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte +++ b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte @@ -119,10 +119,6 @@ top: var(--spacing-l); right: var(--spacing-xl); } - .title i:hover { - cursor: pointer; - color: var(--blue); - } .role-select { display: flex; diff --git a/packages/builder/src/pages/builder/_layout.svelte b/packages/builder/src/pages/builder/_layout.svelte index c01de46334..de657a63ac 100644 --- a/packages/builder/src/pages/builder/_layout.svelte +++ b/packages/builder/src/pages/builder/_layout.svelte @@ -16,11 +16,14 @@ {#if $auth.user}
- +