1
0
Fork 0

Add plugin's support for provider

Co-authored-by: Julien Salleyron <julien@traefik.io>
This commit is contained in:
Ludovic Fernandez 2021-05-11 16:14:10 +02:00 committed by GitHub
parent de2437cfec
commit 63ef0f1cee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 928 additions and 116 deletions

View file

@ -20,7 +20,7 @@
<div class="text-subtitle2">PROVIDER</div>
<div class="block-right-text">
<q-avatar class="provider-logo">
<q-icon :name="`img:statics/providers/${middleware.provider}.svg`" />
<q-icon :name="`img:${getProviderLogoPath(middleware.provider)}`" />
</q-avatar>
<div class="block-right-text-label">{{middleware.provider}}</div>
</div>
@ -1106,6 +1106,15 @@ export default {
}
}
return exData
},
getProviderLogoPath (provider) {
const name = provider.name.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
},
filters: {

View file

@ -31,7 +31,7 @@
</div>
<div class="col-3 text-right">
<q-avatar class="provider-logo">
<q-icon :name="`img:statics/providers/${getProvider(service)}.svg`" />
<q-icon :name="`img:${getProviderLogoPath(service)}`" />
</q-avatar>
</div>
</div>
@ -61,6 +61,16 @@ export default {
}
return this.data.provider
},
getProviderLogoPath (service) {
const provider = this.getProvider(service)
const name = provider.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
}
}

View file

@ -14,7 +14,7 @@
<div class="text-subtitle2">PROVIDER</div>
<div class="block-right-text">
<q-avatar class="provider-logo">
<q-icon :name="`img:statics/providers/${data.provider}.svg`" />
<q-icon :name="`img:${getProviderLogoPath}`" />
</q-avatar>
<div class="block-right-text-label">{{data.provider}}</div>
</div>
@ -127,6 +127,17 @@ export default {
}
return value
}
},
computed: {
getProviderLogoPath () {
const name = this.data.provider.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
}
}
</script>

View file

@ -15,7 +15,7 @@
<div class="text-subtitle2">PROVIDER</div>
<div class="block-right-text">
<q-avatar class="provider-logo">
<q-icon :name="`img:statics/providers/${data.provider}.svg`" />
<q-icon :name="`img:${getProviderLogoPath}`" />
</q-avatar>
<div class="block-right-text-label">{{data.provider}}</div>
</div>
@ -113,6 +113,15 @@ export default {
}
return null
},
getProviderLogoPath () {
const name = this.data.provider.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
},
filters: {

View file

@ -31,7 +31,7 @@
</div>
<div class="col-4">
<q-avatar>
<q-icon :name="`img:statics/providers/${getProvider(service)}.svg`" />
<q-icon :name="`img:${getProviderLogoPath(service)}`" />
</q-avatar>
</div>
</div>
@ -61,6 +61,16 @@ export default {
}
return this.data.provider
},
getProviderLogoPath (service) {
const provider = this.getProvider(service)
const name = provider.name.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
}
}

View file

@ -1,12 +1,23 @@
<template>
<q-avatar class="provider-logo">
<q-icon :name="`img:statics/providers/${name}.svg`" />
<q-icon :name="`img:${getLogoPath}`" />
</q-avatar>
</template>
<script>
export default {
props: ['name']
props: ['name'],
computed: {
getLogoPath () {
const name = this.name.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
}
}
</script>

View file

@ -4,7 +4,7 @@
<div class="row items-center no-wrap">
<div class="col text-center">
<q-avatar class="provider-logo">
<q-icon :name="`img:statics/providers/${getNameLogo}.svg`" />
<q-icon :name="`img:${getLogoPath}`" />
</q-avatar>
</div>
</div>
@ -25,8 +25,14 @@ export default {
getName () {
return this.name
},
getNameLogo () {
return this.getName.toLowerCase()
getLogoPath () {
const name = this.getName.toLowerCase()
if (name.includes('plugin-')) {
return 'statics/providers/plugin.svg'
}
return `statics/providers/${name}.svg`
}
}
}

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>plugin</title>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="plugin" fill-rule="nonzero">
<circle id="Oval" fill="#6DC4A8" cx="16" cy="16" r="16"></circle>
<path d="M10.7517313,10.1738295 L22.2621133,19.1941905 L21.8304412,19.7449978 C20.0202381,22.0549461 17.2269562,23.0792113 14.836947,22.5465569 L14.5702202,22.8869226 C14.1903807,23.3716261 13.5380774,23.5005798 13.1206478,23.1734862 L12.1087414,22.3804984 L10.0368349,25.0243619 C9.65696684,25.5090655 9.00463498,25.6380191 8.58723393,25.3109255 L8.33426446,25.1126429 C7.9168634,24.7855208 7.88612346,24.1213154 8.26599153,23.6366119 L10.3379265,20.9927484 L9.32602009,20.199732 C8.90861904,19.8726385 8.87790764,19.2084045 9.25774716,18.723701 L9.43776279,18.4939934 C8.15541907,16.2757226 8.42328756,13.1450149 10.3200591,10.7246368 L10.7517313,10.1738295 Z M23.5543041,11.5531311 C24.1108484,11.9892558 24.1518349,12.8748916 23.6453537,13.5211725 L20.8654425,17.2106062 L18.8915999,15.6278127 L21.6215408,11.9351683 C22.1280221,11.2888874 22.9977598,11.1169778 23.5543041,11.5531311 Z M18.0521111,7.2411761 C18.6086553,7.67732938 18.6496134,8.56296514 18.1431321,9.20924605 L15.2398281,12.8891125 L13.3222617,11.3618714 L16.1193478,7.62324192 C16.6258005,6.97696101 17.4955668,6.80505137 18.0521111,7.2411761 Z" id="Shape" fill="#FFFFFF"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB