Skip to content

Commit

Permalink
Exclude apps from default invert icon behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
AjBreidenbach committed Dec 22, 2023
1 parent eb85fc7 commit 4ff21b7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/oc-pages/vue_shared/components/oc/detect-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ export default {
size: [String, Number],
circle: Boolean,
noDefault: Boolean,
noInvert: Boolean,
noInvert: {
type: Boolean,
default: null
}
},
icons: {
GCP, ComputeIcon, DbIcon, LocalDevIcon, K8s, DigitalOcean, Azure, AWS, DnsIcon, MailIcon, GCPInstance, MongoDbIcon, ErrorFilled, DatabaseIcon,
Expand All @@ -124,7 +127,7 @@ export default {
},
customImageStyle() {
const result = {}
if(this.noInvert || NO_FILTER.includes(this.customIcon)) {
if(this._noInvert || NO_FILTER.includes(this.customIcon)) {
result['filter'] = 'unset'
}
Expand All @@ -150,6 +153,9 @@ export default {
if(icon.startsWith('<svg')) {
return `data:image/svg+xml;charset=utf8,${encodeURIComponent(icon)}`
} else return icon
},
_noInvert() {
return this.noInvert ?? this.type?.extends?.includes('unfurl.nodes.App')
}
}
}
Expand Down

0 comments on commit 4ff21b7

Please sign in to comment.