π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:bug: Re: #199 - Fixes loading of local SVG icons
Alicia Sykes412c179d5a87
diff --git a/src/components/LinkItems/ItemIcon.vue b/src/components/LinkItems/ItemIcon.vueindex 6f7c392b..b8c3f9c6 100644--- a/src/components/LinkItems/ItemIcon.vue+++ b/src/components/LinkItems/ItemIcon.vue@@ -62,7 +62,7 @@ export default {/* Returns true if the input is a path to an image file */isImage(img) {const fileExtRegex = /(?:\.([^.]+))?$/;- const validImgExtensions = ['png', 'jpg'];+ const validImgExtensions = ['svg', 'png', 'jpg'];const splitPath = fileExtRegex.exec(img);if (splitPath.length >= 1) return validImgExtensions.includes(splitPath[1]);return false;@@ -154,7 +154,6 @@ export default {determineImageType(img) {let imgType = '';if (!img) imgType = 'none';- else if (img.endsWith('.svg')) imgType = 'svg';else if (this.isUrl(img)) imgType = 'url';else if (this.isImage(img)) imgType = 'img';else if (img.includes('fa-')) imgType = 'font-awesome';