1
0
Fork 0
mirror of synced 2024-07-02 13:01:09 +12:00

Merge branch 'new-design-ui' of github.com:Budibase/budibase into new-design-ui

This commit is contained in:
Andrew Kingston 2022-06-08 16:22:22 +01:00
commit ccfa350118
6 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,26 @@
<script>
import { Body, Button, Layout, Heading } from "@budibase/bbui"
import { flags } from "stores/backend"
function openFeedbackApp() {
window.open(`https://bb.budibase.app/betauifeedback`)
}
async function revertToOldBuilder() {
await flags.toggleUiFeature("design_ui")
window.location.reload()
}
</script>
<Layout>
<Heading size="M">Beta Builder</Heading>
<Body>
Your account has been given access to the budibase beta program. We would
love to hear what you think and get your feedback and suggestions on the new
Design UI.
</Body>
<Button cta on:click={openFeedbackApp}>Give Feedback</Button>
<Button secondary on:click={revertToOldBuilder}
>Revert back to old builder</Button
>
</Layout>

View file

@ -0,0 +1,8 @@
<script>
import { Layout } from "@budibase/bbui"
</script>
<!-- routify:options index=5 -->
<Layout gap="S" justifyItems="center">
<slot />
</Layout>

View file

@ -0,0 +1,5 @@
<script>
import BetaTab from "components/beta/BetaTab.svelte"
</script>
<BetaTab />

View file

@ -27,6 +27,7 @@
import AppLockModal from "components/common/AppLockModal.svelte"
import EditableIcon from "components/common/EditableIcon.svelte"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import BetaTab from "components/beta/BetaTab.svelte"
import { checkIncomingDeploymentStatus } from "components/deploy/utils"
import { onDestroy, onMount } from "svelte"
@ -313,6 +314,9 @@
<Tab title="Settings">
<SettingsTab app={selectedApp} />
</Tab>
<Tab title="Beta">
<BetaTab />
</Tab>
</Tabs>
</div>
<ConfirmDialog

View file

@ -16,6 +16,9 @@ export function createFlagsStore() {
})
await actions.fetch()
},
toggleUiFeature: async feature => {
await API.toggleUiFeature({ value: feature })
},
}
return {

View file

@ -22,4 +22,13 @@ export const buildFlagEndpoints = API => ({
},
})
},
/**
* Allows us to experimentally toggle a beta UI feature through a cookie.
* @param value the feature to toggle
*/
toggleUiFeature: async ({ value }) => {
return await API.post({
url: `/api/beta/${value}`,
})
},
})