1
0
Fork 0
mirror of synced 2024-07-14 18:55:45 +12:00

hide banner from new UI

This commit is contained in:
Martin McKeaveney 2022-07-05 19:26:12 +01:00
parent b484c1c737
commit 187e138b8f
3 changed files with 6 additions and 19 deletions

View file

@ -1,6 +1,5 @@
<script>
import { createEventDispatcher } from "svelte"
import Button from "../Button/Button.svelte"
let dispatch = createEventDispatcher()

View file

@ -3,7 +3,6 @@
Body,
Button,
ButtonGroup,
Divider,
Layout,
Heading,
Page,

View file

@ -1,14 +1,13 @@
<script>
import { store, automationStore } from "builderStore"
import { roles, flags } from "stores/backend"
import { auth } from "stores/portal"
import {
Icon,
Tabs,
Tab,
Heading,
notifications,
Banner,
// Banner,
} from "@budibase/bbui"
import RevertModal from "components/deploy/RevertModal.svelte"
import DeployNavigation from "components/deploy/DeployNavigation.svelte"
@ -21,7 +20,7 @@
// Get Package and set store
let promise = getPackage()
let betaAccess = false
// let betaAccess = false
// Sync once when you load the app
let hasSynced = false
@ -65,23 +64,13 @@
})
}
async function newDesignUi() {
try {
await flags.toggleUiFeature("design_ui")
window.location.reload()
} catch (error) {
notifications.error("Error enabling beta access to new design UI")
console.error(error)
}
}
onMount(async () => {
if (!hasSynced && application) {
try {
await API.syncApp(application)
// check if user has beta access
const betaResponse = await API.checkBetaAccess($auth?.user?.email)
betaAccess = betaResponse.access
// const betaResponse = await API.checkBetaAccess($auth?.user?.email)
// betaAccess = betaResponse.access
} catch (error) {
notifications.error("Failed to sync with production database")
}
@ -102,7 +91,7 @@
<div class="loading" />
{:then _}
<div class="root">
{#if betaAccess}
<!-- {#if betaAccess}
<Banner
extraButtonText="Try New UI (Beta)"
extraButtonAction={newDesignUi}
@ -110,7 +99,7 @@
Try the <b>all new</b> budibase design interface. (Not recommended for existing
budibase apps)
</Banner>
{/if}
{/if} -->
<div class="top-nav">
<div class="topleftnav">
<Icon