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/dashboard/components/sidebar/DashboardTemplateSidebar.vue
2025-01-07 17:32:50 +00:00

47 lines
1.1 KiB
Vue

<template>
<li
class="tree__item"
:class="{
'tree__item--loading': application._.loading,
}"
>
<div
class="tree__action"
:class="{ 'tree__action--highlighted': application._.selected }"
>
<a class="tree__link" @click="selectDashboard(application)">
<i class="tree__icon" :class="application._.type.iconClass"></i>
<span class="tree__link-text">{{ application.name }}</span>
</a>
</div>
</li>
</template>
<script>
import { DashboardApplicationType } from '@baserow/modules/dashboard/applicationTypes'
export default {
name: 'DashboardTemplateSidebar',
props: {
application: {
type: Object,
required: true,
},
page: {
required: true,
validator: (prop) => typeof prop === 'object' || prop === null,
},
},
methods: {
selectDashboard(application) {
this.$emit('selected', application)
this.$emit('selected-page', {
application: DashboardApplicationType.getType(),
value: {
dashboard: application,
},
})
},
},
}
</script>