mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
32 lines
804 B
Vue
32 lines
804 B
Vue
<template>
|
|
<!-- must be in sync with modules/baserow_enterprise/components/EnterpriseLogo.vue -->
|
|
<component :is="getComponent()" v-if="getComponent()"></component>
|
|
<template v-else>
|
|
<div class="logo">
|
|
<img
|
|
src="@baserow/modules/core/static/img/logo.svg?url"
|
|
v-bind="$attrs"
|
|
:class="[$attrs.class]"
|
|
/>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'Logo',
|
|
methods: {
|
|
getComponent() {
|
|
return (
|
|
Object.values(this.$registry.getAll('plugin'))
|
|
.filter((plugin) => plugin.getLogoComponent() !== null)
|
|
.sort(
|
|
(p1, p2) => p2.getLogoComponentOrder() - p1.getLogoComponentOrder()
|
|
)
|
|
.map((plugin) => plugin.getLogoComponent())[0] || null
|
|
)
|
|
},
|
|
},
|
|
}
|
|
</script>
|