Navigation updates, cookie constant, update link-dependencies and localdomain scripts
This commit is contained in:
parent
490735bff6
commit
d72494e44b
|
@ -6,7 +6,7 @@ exports.UserStatus = {
|
||||||
exports.Cookies = {
|
exports.Cookies = {
|
||||||
CurrentApp: "budibase:currentapp",
|
CurrentApp: "budibase:currentapp",
|
||||||
Auth: "budibase:auth",
|
Auth: "budibase:auth",
|
||||||
Init: "budibase:init",
|
RETURN_URL: "budibase:returnurl",
|
||||||
DatasourceAuth: "budibase:datasourceauth",
|
DatasourceAuth: "budibase:datasourceauth",
|
||||||
OIDC_CONFIG: "budibase:oidc:config",
|
OIDC_CONFIG: "budibase:oidc:config",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
const multilevel = getContext("sidenav-type")
|
const multilevel = getContext("sidenav-type")
|
||||||
|
import Badge from "../Badge/Badge.svelte"
|
||||||
export let href = ""
|
export let href = ""
|
||||||
export let external = false
|
export let external = false
|
||||||
export let heading = ""
|
export let heading = ""
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
export let selected = false
|
export let selected = false
|
||||||
export let disabled = false
|
export let disabled = false
|
||||||
export let dataCy
|
export let dataCy
|
||||||
|
export let badge = ""
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<li
|
<li
|
||||||
|
@ -38,10 +40,22 @@
|
||||||
</svg>
|
</svg>
|
||||||
{/if}
|
{/if}
|
||||||
<slot />
|
<slot />
|
||||||
|
{#if badge}
|
||||||
|
<div class="badge">
|
||||||
|
<Badge active size="S">{badge}</Badge>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{#if multilevel && $$slots.subnav}
|
{#if multilevel && $$slots.subnav}
|
||||||
<ul class="spectrum-SideNav">
|
<ul class="spectrum-SideNav">
|
||||||
<slot name="subnav" />
|
<slot name="subnav" />
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.badge {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
{
|
{
|
||||||
title: "Usage",
|
title: "Usage",
|
||||||
href: "/builder/portal/settings/usage",
|
href: "/builder/portal/settings/usage",
|
||||||
|
badge: "New",
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
@ -53,6 +54,13 @@
|
||||||
href: "/builder/portal/manage/users",
|
href: "/builder/portal/manage/users",
|
||||||
heading: "Manage",
|
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: "Auth", href: "/builder/portal/manage/auth" },
|
||||||
{ title: "Email", href: "/builder/portal/manage/email" },
|
{ 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) {
|
if (!$adminStore.cloud) {
|
||||||
menu = menu.concat([
|
menu = menu.concat([
|
||||||
{
|
{
|
||||||
|
@ -87,6 +86,7 @@
|
||||||
menu = menu.concat({
|
menu = menu.concat({
|
||||||
title: "Upgrade",
|
title: "Upgrade",
|
||||||
href: "/builder/portal/settings/upgrade",
|
href: "/builder/portal/settings/upgrade",
|
||||||
|
badge: "New",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,9 +106,21 @@
|
||||||
{
|
{
|
||||||
title: "Account",
|
title: "Account",
|
||||||
href: $adminStore.accountPortalUrl,
|
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
|
return menu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,11 +171,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<Navigation>
|
<Navigation>
|
||||||
{#each menu as { title, href, heading }}
|
{#each menu as { title, href, heading, badge }}
|
||||||
<Item
|
<Item
|
||||||
on:click={hideMobileMenu}
|
on:click={hideMobileMenu}
|
||||||
selected={$isActive(href)}
|
selected={$isActive(href)}
|
||||||
{href}
|
{href}
|
||||||
|
{badge}
|
||||||
{heading}>{title}</Item
|
{heading}>{title}</Item
|
||||||
>
|
>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
|
@ -17,6 +17,8 @@ const arg = process.argv.slice(2)[0]
|
||||||
*/
|
*/
|
||||||
updateDotEnv({
|
updateDotEnv({
|
||||||
ACCOUNT_PORTAL_URL:
|
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" : "",
|
COOKIE_DOMAIN: arg === "enable" ? ".local.com" : "",
|
||||||
}).then(() => console.log("Updated worker!"))
|
}).then(() => console.log("Updated worker!"))
|
||||||
|
|
|
@ -17,7 +17,9 @@ const arg = process.argv.slice(2)[0]
|
||||||
*/
|
*/
|
||||||
updateDotEnv({
|
updateDotEnv({
|
||||||
ACCOUNT_PORTAL_URL:
|
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" : "",
|
COOKIE_DOMAIN: arg === "enable" ? ".local.com" : "",
|
||||||
PLATFORM_URL:
|
PLATFORM_URL:
|
||||||
arg === "enable" ? "http://local.com:10000" : "http://localhost:10000",
|
arg === "enable" ? "http://local.com:10000" : "http://localhost:10000",
|
||||||
|
|
|
@ -18,6 +18,11 @@ cd packages/bbui
|
||||||
yarn link
|
yarn link
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
echo "Linking frontend-core"
|
||||||
|
cd packages/frontend-core
|
||||||
|
yarn link
|
||||||
|
cd -
|
||||||
|
|
||||||
if [ -d "../budibase-pro" ]; then
|
if [ -d "../budibase-pro" ]; then
|
||||||
cd ../budibase-pro
|
cd ../budibase-pro
|
||||||
echo "Bootstrapping budibase-pro"
|
echo "Bootstrapping budibase-pro"
|
||||||
|
@ -67,4 +72,7 @@ if [ -d "../account-portal" ]; then
|
||||||
cd ../ui
|
cd ../ui
|
||||||
echo "Linking bbui to account-portal"
|
echo "Linking bbui to account-portal"
|
||||||
yarn link "@budibase/bbui"
|
yarn link "@budibase/bbui"
|
||||||
|
|
||||||
|
echo "Linking frontend-core to account-portal"
|
||||||
|
yarn link "@budibase/frontend-core"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue