From 8f6ffe2c6d75d96f0698fde9e8a13b842d65b289 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Mon, 17 Feb 2025 13:39:57 +0100 Subject: [PATCH] Add notification icon --- .../ContentElements/Icons/GeneralIcons.swift | 17 +++++++ .../ContentElements/Icons/PageIcon.swift | 50 ++++++++++--------- 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/CHDataManagement/Page Elements/ContentElements/Icons/GeneralIcons.swift b/CHDataManagement/Page Elements/ContentElements/Icons/GeneralIcons.swift index c5e7a4b..e949e3e 100644 --- a/CHDataManagement/Page Elements/ContentElements/Icons/GeneralIcons.swift +++ b/CHDataManagement/Page Elements/ContentElements/Icons/GeneralIcons.swift @@ -103,3 +103,20 @@ extension Icon { """ } } + +extension Icon { + + struct Bell: ContentIcon { + + static let id = "icon-bell" + + static let attributes = "width='16' height='16' fill='currentColor'" + + static let content = + """ + + """ + } +} + + diff --git a/CHDataManagement/Page Elements/ContentElements/Icons/PageIcon.swift b/CHDataManagement/Page Elements/ContentElements/Icons/PageIcon.swift index 7dc48f8..4d19006 100644 --- a/CHDataManagement/Page Elements/ContentElements/Icons/PageIcon.swift +++ b/CHDataManagement/Page Elements/ContentElements/Icons/PageIcon.swift @@ -17,6 +17,8 @@ enum PageIcon: String, CaseIterable { case video + case bell + // MARK: Statistics case statisticsTime = "time" @@ -59,29 +61,30 @@ enum PageIcon: String, CaseIterable { var icon: ContentIcon.Type { switch self { - case .statisticsTime: return Icon.Statistics.Time.self - case .statisticsElevationUp: return Icon.Statistics.ElevationUp.self - case .statisticsElevationDown: return Icon.Statistics.ElevationDown.self - case .statisticsDistance: return Icon.Statistics.Distance.self - case .statisticsEnergy: return Icon.Statistics.Energy.self - case .buttonDownload: return Icon.ArrowDown.self - case .buttonExternalLink: return Icon.ArrowRight.self - case .buttonGitLink: return Icon.Git.self - case .buttonPlay: return Icon.Play.self - case .audioPlayerPlaylist: return Icon.AudioPlayer.Playlist.self - case .audioPlayerClose: return Icon.AudioPlayer.Close.self - case .audioPlayerPlay: return Icon.AudioPlayer.Play.self - case .audioPlayerPause: return Icon.AudioPlayer.Pause.self - case .audioPlayerPrevious: return Icon.AudioPlayer.Previous.self - case .audioPlayerNext: return Icon.AudioPlayer.Next.self - case .calendar: return Icon.Calendar.self - case .clockFill: return Icon.ClockFill.self - case .file: return Icon.File.self - case .globe: return Icon.Globe.self - case .location: return Icon.Location.self - case .poster: return Icon.Poster.self - case .video: return Icon.Video.self - case .leftRightArrow:return Icon.LeftRightArrow.self + case .statisticsTime: Icon.Statistics.Time.self + case .statisticsElevationUp: Icon.Statistics.ElevationUp.self + case .statisticsElevationDown: Icon.Statistics.ElevationDown.self + case .statisticsDistance: Icon.Statistics.Distance.self + case .statisticsEnergy: Icon.Statistics.Energy.self + case .buttonDownload: Icon.ArrowDown.self + case .buttonExternalLink: Icon.ArrowRight.self + case .buttonGitLink: Icon.Git.self + case .buttonPlay: Icon.Play.self + case .audioPlayerPlaylist: Icon.AudioPlayer.Playlist.self + case .audioPlayerClose: Icon.AudioPlayer.Close.self + case .audioPlayerPlay: Icon.AudioPlayer.Play.self + case .audioPlayerPause: Icon.AudioPlayer.Pause.self + case .audioPlayerPrevious: Icon.AudioPlayer.Previous.self + case .audioPlayerNext: Icon.AudioPlayer.Next.self + case .calendar: Icon.Calendar.self + case .clockFill: Icon.ClockFill.self + case .file: Icon.File.self + case .globe: Icon.Globe.self + case .location: Icon.Location.self + case .poster: Icon.Poster.self + case .video: Icon.Video.self + case .leftRightArrow: Icon.LeftRightArrow.self + case .bell: Icon.Bell.self } } @@ -94,6 +97,7 @@ enum PageIcon: String, CaseIterable { case .location: "Location" case .poster: "Poster" case .video: "Video" + case .bell: "Bell" case .leftRightArrow: "LeftRightArrow" case .buttonExternalLink: "Button: External Link" case .buttonGitLink: "Button: Git Link"