This commit is contained in:
Martin McKeaveney 2021-10-07 21:05:39 +01:00
commit 816d06d9e9
9 changed files with 74 additions and 14 deletions

View File

@ -68,5 +68,5 @@
{/if}
<ManageAccessButton resourceId={decodeURI(name)} />
<HideAutocolumnButton bind:hideAutocolumns />
<ExportButton {view} />
<ExportButton view={view.name} />
</Table>

View File

@ -64,7 +64,7 @@ export default `
appId,
theme,
customTheme,
previewDevice
previewDevice,
} = parsed
// Set some flags so the app knows we're in the builder

View File

@ -33,7 +33,10 @@
</div>
{/each}
<div class="template start-from-scratch" on:click={() => onSelect(null)}>
<div class="background-icon" style={`background: var(--background);`}>
<div
class="background-icon"
style={`background: rgb(50, 50, 50); color: white;`}
>
<Icon name="Add" />
</div>
<Heading size="XS">Start from scratch</Heading>
@ -74,7 +77,7 @@
align-items: center;
cursor: pointer;
border-radius: 4px;
background: #1a1a1a;
background: var(--background-alt);
padding: 8px 16px;
}

View File

@ -46,11 +46,16 @@
title: "Theming",
href: "/builder/portal/settings/theming",
},
{
title: "Updates",
href: "/builder/portal/settings/update",
},
])
if (!$adminStore.cloud) {
menu = menu.concat([
{
title: "Updates",
href: "/builder/portal/settings/update",
},
])
}
} else {
menu = menu.concat([
{

View File

@ -10,14 +10,14 @@
Label,
} from "@budibase/bbui"
import api from "builderStore/api"
import { auth } from "stores/portal"
import { auth, admin } from "stores/portal"
import { redirect } from "@roxi/routify"
let version
// Only admins allowed here
$: {
if (!$auth.isAdmin) {
if (!$auth.isAdmin || $admin.cloud) {
$redirect("../../portal")
}
}

View File

@ -56,7 +56,7 @@ export function createAuthStore() {
analytics.identify(user._id, user)
analytics.showChat({
email: user.email,
created_at: user.createdAt || Date.now(),
created_at: (user.createdAt || Date.now()) / 1000,
name: user.name,
user_id: user._id,
tenant: user.tenantId,

View File

@ -0,0 +1,42 @@
<a
href="https://www.budibase.com/?utm_source=budibase-apps-public-screens&utm_medium=badge&utm_campaign=made-in-budibase"
>
<div>
<img src="https://i.imgur.com/Xhdt1YP.png" alt="Budibase" />
<p>Made In Budibase</p>
</div>
</a>
<style>
div {
position: absolute;
right: 20px;
bottom: 20px;
padding: 10px;
border-radius: 5px;
background: var(--spectrum-alias-background-color-primary);
z-index: 999999 !important;
visibility: visible !important;
display: flex;
justify-content: center;
align-items: center;
border: 1px solid;
border-color: var(--spectrum-global-color-gray-300) !important;
height: 45px;
}
p {
text-decoration: none;
color: var(--spectrum-heading-m-text-color);
}
a:visited {
text-decoration: none;
color: var(--spectrum-heading-m-text-color);
}
img {
height: 20px;
margin-right: 10px;
}
</style>

View File

@ -21,9 +21,12 @@ exports.endUserPing = async ctx => {
return
}
posthogClient.capture("budibase:end_user_ping", {
userId: ctx.user && ctx.user._id,
appId: ctx.appId,
posthogClient.capture({
event: "budibase:end_user_ping",
distinctId: ctx.user && ctx.user._id,
properties: {
appId: ctx.appId,
},
})
ctx.body = {

View File

@ -2,6 +2,8 @@ const {
ViewNames,
generateMemoryViewID,
getMemoryViewParams,
DocumentTypes,
SEPARATOR,
} = require("../../../db/utils")
const env = require("../../../environment")
@ -10,6 +12,11 @@ exports.getView = async (db, viewName) => {
const designDoc = await db.get("_design/database")
return designDoc.views[viewName]
} else {
// This is a table view, don't read the view from the DB
if (viewName.startsWith(DocumentTypes.TABLE + SEPARATOR)) {
return null
}
const viewDoc = await db.get(generateMemoryViewID(viewName))
return viewDoc.view
}