1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-01-15 21:18:41 +00:00
bramw_baserow/web-frontend/modules/builder/components/page/settings/PageVisibilitySettings.vue
2024-11-28 08:47:54 +00:00

43 lines
1,013 B
Vue

<template>
<div>
<h2 class="box__title">{{ $t('pageVisibilitySettings.title') }}</h2>
<div>
<PageVisibilityForm
:default-values="currentPage"
@values-changed="updatePageVisibility"
/>
</div>
</div>
</template>
<script>
import error from '@baserow/modules/core/mixins/error'
import PageVisibilityForm from '@baserow/modules/builder/components/page/settings/PageVisibilityForm'
import { mapActions } from 'vuex'
export default {
name: 'PageVisibilitySettings',
components: { PageVisibilityForm },
mixins: [error],
inject: ['builder', 'currentPage', 'workspace'],
data() {
return {}
},
methods: {
...mapActions({ actionUpdatePage: 'page/update' }),
async updatePageVisibility(values) {
this.hideError()
try {
await this.actionUpdatePage({
builder: this.builder,
page: this.currentPage,
values,
})
} catch (error) {
this.handleError(error)
}
},
},
}
</script>