From 6a0fbba407baef91b3114793838fefef9338bc09 Mon Sep 17 00:00:00 2001 From: Bjorn Lammers Date: Sun, 5 Jan 2025 22:45:15 +0100 Subject: [PATCH] Chore: migrate dashboard-icons to homarr-labs (#4564) --- docs/configs/services.md | 2 +- src/components/resolvedicon.jsx | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/configs/services.md b/docs/configs/services.md index 6ef25c39f..b1883043b 100644 --- a/docs/configs/services.md +++ b/docs/configs/services.md @@ -134,7 +134,7 @@ Services may have descriptions, ## Icons -Services may have an icon attached to them, you can use icons from [Dashboard Icons](https://github.com/walkxcode/dashboard-icons) automatically, by passing the name of the icon, with, or without `.png` or with `.svg` to use the svg version. +Services may have an icon attached to them, you can use icons from [Dashboard Icons](https://github.com/homarr-labs/dashboard-icons) automatically, by passing the name of the icon, with, or without `.png`, `.webp` or `.svg` to specify the desired version. You can also specify prefixed icons from: diff --git a/src/components/resolvedicon.jsx b/src/components/resolvedicon.jsx index de29c0cdc..4858f3d53 100644 --- a/src/components/resolvedicon.jsx +++ b/src/components/resolvedicon.jsx @@ -101,7 +101,26 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log const iconName = icon.replace(".svg", ""); return ( {alt} + ); + } + + if (icon.endsWith(".webp")) { + const iconName = icon.replace(".webp", ""); + return ( +