mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-25 16:57:55 +00:00
54 lines
1.4 KiB
Vue
54 lines
1.4 KiB
Vue
<template>
|
|
<aside class="side-panels">
|
|
<Tabs :key="element?.id" full-height>
|
|
<Tab
|
|
v-for="pageSidePanelType in pageSidePanelTypes"
|
|
:key="pageSidePanelType.getType()"
|
|
:tooltip="
|
|
element && pageSidePanelType.isDeactivated(element)
|
|
? pageSidePanelType.getDeactivatedText()
|
|
: null
|
|
"
|
|
:title="pageSidePanelType.label"
|
|
:disabled="!element || pageSidePanelType.isDeactivated(element)"
|
|
>
|
|
<ReadOnlyForm
|
|
v-if="element"
|
|
:read-only="
|
|
!$hasPermission(
|
|
'builder.page.element.update',
|
|
element,
|
|
workspace.id
|
|
)
|
|
"
|
|
>
|
|
<component
|
|
:is="pageSidePanelType.component"
|
|
class="side-panels__panel"
|
|
/>
|
|
</ReadOnlyForm>
|
|
<EmptySidePanelState v-else />
|
|
</Tab>
|
|
</Tabs>
|
|
</aside>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapGetters } from 'vuex'
|
|
import EmptySidePanelState from '@baserow/modules/builder/components/page/sidePanels/EmptySidePanelState'
|
|
|
|
export default {
|
|
name: 'PageSidePanels',
|
|
components: { EmptySidePanelState },
|
|
inject: ['workspace'],
|
|
computed: {
|
|
...mapGetters({
|
|
element: 'element/getSelected',
|
|
}),
|
|
pageSidePanelTypes() {
|
|
return this.$registry.getOrderedList('pageSidePanel')
|
|
},
|
|
},
|
|
}
|
|
</script>
|