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