Merge branch 'feature/day-pass-pricing' of github.com:Budibase/budibase into feature/day-pass-pricing
This commit is contained in:
commit
c6155d60ef
8 changed files with 52 additions and 33 deletions
|
@ -6,7 +6,7 @@ exports.UserStatus = {
|
|||
exports.Cookies = {
|
||||
CurrentApp: "budibase:currentapp",
|
||||
Auth: "budibase:auth",
|
||||
Init: "budibase:init",
|
||||
RETURN_URL: "budibase:returnurl",
|
||||
DatasourceAuth: "budibase:datasourceauth",
|
||||
OIDC_CONFIG: "budibase:oidc:config",
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script>
|
||||
import { getContext } from "svelte"
|
||||
const multilevel = getContext("sidenav-type")
|
||||
import Badge from "../Badge/Badge.svelte"
|
||||
export let href = ""
|
||||
export let external = false
|
||||
export let heading = ""
|
||||
|
@ -8,6 +9,7 @@
|
|||
export let selected = false
|
||||
export let disabled = false
|
||||
export let dataCy
|
||||
export let badge = ""
|
||||
</script>
|
||||
|
||||
<li
|
||||
|
@ -38,10 +40,22 @@
|
|||
</svg>
|
||||
{/if}
|
||||
<slot />
|
||||
{#if badge}
|
||||
<div class="badge">
|
||||
<Badge active size="S">{badge}</Badge>
|
||||
</div>
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{#if multilevel && $$slots.subnav}
|
||||
<ul class="spectrum-SideNav">
|
||||
<slot name="subnav" />
|
||||
</ul>
|
||||
{/if}
|
||||
</li>
|
||||
|
||||
<style>
|
||||
.badge {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
{
|
||||
title: "Usage",
|
||||
href: "/builder/portal/settings/usage",
|
||||
badge: "New",
|
||||
},
|
||||
])
|
||||
}
|
||||
|
@ -53,6 +54,13 @@
|
|||
href: "/builder/portal/manage/users",
|
||||
heading: "Manage",
|
||||
},
|
||||
isEnabled(FEATURE_FLAGS.USER_GROUPS)
|
||||
? {
|
||||
title: "User Groups",
|
||||
href: "/builder/portal/manage/groups",
|
||||
badge: "New",
|
||||
}
|
||||
: undefined,
|
||||
{ title: "Auth", href: "/builder/portal/manage/auth" },
|
||||
{ title: "Email", href: "/builder/portal/manage/email" },
|
||||
{
|
||||
|
@ -66,15 +74,6 @@
|
|||
},
|
||||
])
|
||||
|
||||
if (isEnabled(FEATURE_FLAGS.USER_GROUPS)) {
|
||||
let item = {
|
||||
title: "User Groups",
|
||||
href: "/builder/portal/manage/groups",
|
||||
}
|
||||
|
||||
menu.splice(2, 0, item)
|
||||
}
|
||||
|
||||
if (!$adminStore.cloud) {
|
||||
menu = menu.concat([
|
||||
{
|
||||
|
@ -87,6 +86,7 @@
|
|||
menu = menu.concat({
|
||||
title: "Upgrade",
|
||||
href: "/builder/portal/settings/upgrade",
|
||||
badge: "New",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -106,9 +106,21 @@
|
|||
{
|
||||
title: "Account",
|
||||
href: $adminStore.accountPortalUrl,
|
||||
heading: "Account",
|
||||
},
|
||||
])
|
||||
|
||||
if (isEnabled(FEATURE_FLAGS.LICENSING)) {
|
||||
menu = menu.concat([
|
||||
{
|
||||
title: "Upgrade",
|
||||
href: $adminStore.accountPortalUrl + "/portal/upgrade",
|
||||
badge: "New",
|
||||
},
|
||||
])
|
||||
}
|
||||
}
|
||||
menu = menu.filter(item => !!item)
|
||||
return menu
|
||||
}
|
||||
|
||||
|
@ -159,11 +171,12 @@
|
|||
</div>
|
||||
<div class="menu">
|
||||
<Navigation>
|
||||
{#each menu as { title, href, heading }}
|
||||
{#each menu as { title, href, heading, badge }}
|
||||
<Item
|
||||
on:click={hideMobileMenu}
|
||||
selected={$isActive(href)}
|
||||
{href}
|
||||
{badge}
|
||||
{heading}>{title}</Item
|
||||
>
|
||||
{/each}
|
||||
|
|
|
@ -17,6 +17,8 @@ const arg = process.argv.slice(2)[0]
|
|||
*/
|
||||
updateDotEnv({
|
||||
ACCOUNT_PORTAL_URL:
|
||||
arg === "enable" ? "http://local.com:10001" : "http://localhost:10001",
|
||||
arg === "enable"
|
||||
? "http://account.local.com:10001"
|
||||
: "http://localhost:10001",
|
||||
COOKIE_DOMAIN: arg === "enable" ? ".local.com" : "",
|
||||
}).then(() => console.log("Updated worker!"))
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
export interface PutAccountUser {
|
||||
createdAt: number
|
||||
}
|
||||
|
||||
export interface PutAccountUserResponse {
|
||||
userId: string
|
||||
createdAt: number
|
||||
}
|
||||
|
||||
export interface PostAccountUserActivity {
|
||||
timestamp: number
|
||||
}
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
export interface SaveAccountUser {
|
||||
accountId: string
|
||||
userId: string
|
||||
createdAt: number
|
||||
deletedAt?: number
|
||||
}
|
||||
|
||||
export interface AccountUser extends SaveAccountUser {
|
||||
tenantId: string // for backwards compatibility with the accounts table. Really this is a USER#<id>
|
||||
}
|
||||
|
||||
export interface CreateAccountUserActivity {
|
||||
accountId: string
|
||||
userId: string
|
||||
|
|
|
@ -17,7 +17,9 @@ const arg = process.argv.slice(2)[0]
|
|||
*/
|
||||
updateDotEnv({
|
||||
ACCOUNT_PORTAL_URL:
|
||||
arg === "enable" ? "http://local.com:10001" : "http://localhost:10001",
|
||||
arg === "enable"
|
||||
? "http://account.local.com:10001"
|
||||
: "http://localhost:10001",
|
||||
COOKIE_DOMAIN: arg === "enable" ? ".local.com" : "",
|
||||
PLATFORM_URL:
|
||||
arg === "enable" ? "http://local.com:10000" : "http://localhost:10000",
|
||||
|
|
|
@ -18,6 +18,11 @@ cd packages/bbui
|
|||
yarn link
|
||||
cd -
|
||||
|
||||
echo "Linking frontend-core"
|
||||
cd packages/frontend-core
|
||||
yarn link
|
||||
cd -
|
||||
|
||||
if [ -d "../budibase-pro" ]; then
|
||||
cd ../budibase-pro
|
||||
echo "Bootstrapping budibase-pro"
|
||||
|
@ -67,4 +72,7 @@ if [ -d "../account-portal" ]; then
|
|||
cd ../ui
|
||||
echo "Linking bbui to account-portal"
|
||||
yarn link "@budibase/bbui"
|
||||
|
||||
echo "Linking frontend-core to account-portal"
|
||||
yarn link "@budibase/frontend-core"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue