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
|
<hc-image
|
||||||
:title="badge.key"
|
:title="badge.key"
|
||||||
:image-props="imageProps(badge.icon)"
|
:image-props="{ src: badge.icon}"
|
||||||
class="hc-badge"
|
class="hc-badge"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -30,11 +30,6 @@ export default {
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
imageProps(icon) {
|
|
||||||
return { src: icon }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -58,11 +58,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
iconPath() {
|
imageProps() {
|
||||||
return `/img/empty/${this.icon}.svg`
|
return { src: `/img/empty/${this.icon}.svg` }
|
||||||
},
|
|
||||||
imageProps: {
|
|
||||||
src: iconPath
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
>
|
>
|
||||||
<a :href="link.url">
|
<a :href="link.url">
|
||||||
<hc-image
|
<hc-image
|
||||||
:image-props="imageProps(link.favicon)"
|
:image-props="{ src: link.favicon }"
|
||||||
alt="Social Media link"
|
alt="Social Media link"
|
||||||
width="16"
|
width="16"
|
||||||
height="16"
|
height="16"
|
||||||
@ -105,9 +105,6 @@ export default {
|
|||||||
this.$toast.success(this.$t('settings.social-media.success')),
|
this.$toast.success(this.$t('settings.social-media.success')),
|
||||||
(this.value = '')
|
(this.value = '')
|
||||||
)
|
)
|
||||||
},
|
|
||||||
imageProps(favicon) {
|
|
||||||
return { src: favicon }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user