add analytics toggling

This commit is contained in:
Keviin Åberg Kultalahti 2021-05-05 18:39:36 +02:00
parent ef129b7595
commit ae43bbe008
2 changed files with 4 additions and 9 deletions

View File

@ -25,11 +25,12 @@
let loading = false
let company = $organisation?.company
let logoUrl = $organisation.logoUrl
$: company = $organisation?.company
$: logoUrl = $organisation.logoUrl
async function saveConfig() {
loading = true
await toggleAnalytics()
const res = await organisation.save({ ...$organisation, company })
if (res.status === 200) {
notifications.success("General settings saved.")
@ -78,11 +79,7 @@
<div class="fields">
<div class="field">
<Label>Send Analytics to Budibase</Label>
<Toggle
text=""
bind:value={analyticsDisabled}
on:change={toggleAnalytics}
/>
<Toggle text="" value={!analyticsDisabled} />
</div>
</div>
</div>

View File

@ -74,6 +74,4 @@ for (let route of mainRoutes) {
router.use(staticRoutes.routes())
router.use(staticRoutes.allowedMethods())
router.redirect("/", "/builder")
module.exports = router