mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Refactor code based on comments from PR review
This commit is contained in:
parent
399507c7fb
commit
bf57198815
@ -12,7 +12,7 @@
|
||||
>
|
||||
<hc-image
|
||||
:title="badge.key"
|
||||
:image-props="imageProps(badge.icon)"
|
||||
:image-props="{ src: badge.icon}"
|
||||
class="hc-badge"
|
||||
/>
|
||||
</div>
|
||||
@ -30,11 +30,6 @@ export default {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imageProps(icon) {
|
||||
return { src: icon }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -58,11 +58,8 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
iconPath() {
|
||||
return `/img/empty/${this.icon}.svg`
|
||||
},
|
||||
imageProps: {
|
||||
src: iconPath
|
||||
imageProps() {
|
||||
return { src: `/img/empty/${this.icon}.svg` }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
>
|
||||
<a :href="link.url">
|
||||
<hc-image
|
||||
:image-props="imageProps(link.favicon)"
|
||||
:image-props="{ src: link.favicon }"
|
||||
alt="Social Media link"
|
||||
width="16"
|
||||
height="16"
|
||||
@ -105,9 +105,6 @@ export default {
|
||||
this.$toast.success(this.$t('settings.social-media.success')),
|
||||
(this.value = '')
|
||||
)
|
||||
},
|
||||
imageProps(favicon) {
|
||||
return { src: favicon }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user