Simplify Icon usage, add names
This commit is contained in:
@ -59,21 +59,21 @@ enum PageIcon: String, CaseIterable {
|
||||
|
||||
var icon: ContentIcon.Type {
|
||||
switch self {
|
||||
case .statisticsTime: return StatisticsTimeIcon.self
|
||||
case .statisticsElevationUp: return StatisticsElevationUpIcon.self
|
||||
case .statisticsElevationDown: return StatisticsElevationDownIcon.self
|
||||
case .statisticsDistance: return StatisticsDistanceIcon.self
|
||||
case .statisticsEnergy: return StatisticsEnergyIcon.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 AudioPlayerPlaylistIcon.self
|
||||
case .audioPlayerClose: return AudioPlayerCloseIcon.self
|
||||
case .audioPlayerPlay: return AudioPlayerPlayIcon.self
|
||||
case .audioPlayerPause: return AudioPlayerPauseIcon.self
|
||||
case .audioPlayerPrevious: return AudioPlayerPreviousIcon.self
|
||||
case .audioPlayerNext: return AudioPlayerNextIcon.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
|
||||
@ -85,12 +85,44 @@ enum PageIcon: String, CaseIterable {
|
||||
}
|
||||
}
|
||||
|
||||
var name: String {
|
||||
switch self {
|
||||
case .calendar: "Calendar"
|
||||
case .clockFill: "ClockFill"
|
||||
case .file: "File"
|
||||
case .globe: "Globe"
|
||||
case .location: "Location"
|
||||
case .poster: "Poster"
|
||||
case .video: "Video"
|
||||
case .leftRightArrow: "LeftRightArrow"
|
||||
case .buttonExternalLink: "Button: External Link"
|
||||
case .buttonGitLink: "Button: Git Link"
|
||||
case .buttonPlay: "Button: Play"
|
||||
case .audioPlayerPlaylist: "Audio Player: Playlist"
|
||||
case .audioPlayerClose: "Audio Player: Close"
|
||||
case .audioPlayerPlay: "Audio Player: Play"
|
||||
case .audioPlayerPause: "Audio Player: Pause"
|
||||
case .audioPlayerPrevious: "Audio Player: Previous"
|
||||
case .audioPlayerNext: "Audio Player: Next"
|
||||
case .buttonDownload: "Button: Download"
|
||||
case .statisticsTime: "Time"
|
||||
case .statisticsElevationUp: "Elevation Up"
|
||||
case .statisticsElevationDown: "Elevation Down"
|
||||
case .statisticsDistance: "Distance"
|
||||
case .statisticsEnergy: "Energy / Calories"
|
||||
}
|
||||
}
|
||||
|
||||
var svgString: String {
|
||||
icon.content
|
||||
}
|
||||
|
||||
var name: String {
|
||||
icon.name
|
||||
var id: String {
|
||||
icon.id
|
||||
}
|
||||
|
||||
var usageString: String {
|
||||
icon.usageString
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user