Beta tab initial test for E2E, needs styled
This commit is contained in:
parent
75c599ce70
commit
02320c0ee0
|
@ -1,13 +1,13 @@
|
|||
<script>
|
||||
import { Body, Button, Layout, Heading } from "@budibase/bbui"
|
||||
import { CookieUtils } from "@budibase/frontend-core"
|
||||
import { flags } from "stores/backend"
|
||||
|
||||
function openFeedbackApp() {
|
||||
window.open(`https://bb.budibase.app/betauifeedback`)
|
||||
}
|
||||
|
||||
function revertToOldBuilder() {
|
||||
CookieUtils.removeCookie("beta:new_design_ui")
|
||||
async function revertToOldBuilder() {
|
||||
await flags.toggleUiFeature("design_ui")
|
||||
window.location.reload()
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -16,6 +16,9 @@ export function createFlagsStore() {
|
|||
})
|
||||
await actions.fetch()
|
||||
},
|
||||
toggleUiFeature: async feature => {
|
||||
await API.toggleUiFeature({ value: feature })
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -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}`,
|
||||
})
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue