1
0
Fork 0
traefik/webui/src/components/_commons/ProviderIcon.vue
Ludovic Fernandez 63ef0f1cee
Add plugin's support for provider
Co-authored-by: Julien Salleyron <julien@traefik.io>
2021-05-11 16:14:10 +02:00

33 lines
551 B
Vue

<template>
<q-avatar class="provider-logo">
<q-icon :name="`img:${getLogoPath}`" />
</q-avatar>
</template>
<script>
export default {
props: ['name'],
computed: {
getLogoPath () {
const name = this.name.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
}
}
</script>
<style scoped lang="scss">
.provider-logo {
width: 32px;
height: 32px;
img {
width: 100%;
height: 100%;
}
}
</style>