From 2bc6b5d038546632798e5b32c9c58ee6ae75f243 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Mon, 4 Mar 2024 16:29:30 -0700 Subject: [PATCH] translate f7 underscores into iconify style dashes f7 icons use underscores. When they're imported into iconify, the underscores became dashes. When user actually specified f7:icon_name it should work without them having to know that we implemented it with iconify. Alternatively users can use iconify:f7:icon-name with dashes. If they had specified f7:icon-name that would still to work too Signed-off-by: Cody Cutrer --- OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift b/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift index 6a45ca19..b0999ffd 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/Endpoint.swift @@ -183,6 +183,7 @@ public extension Endpoint { if source == "f7" { source = "iconify" set = "f7" + icon = icon.replacingOccurrences(of: "_", with: "-") } if source == "if" || source == "iconify" { queryItems = [URLQueryItem(name: "height", value: "64")]