132 lines
3.6 KiB
Swift
132 lines
3.6 KiB
Swift
|
|
enum PageIcon: String, CaseIterable {
|
|
|
|
// MARK: General
|
|
|
|
case calendar
|
|
|
|
case clockFill = "clock-fill"
|
|
|
|
case file
|
|
|
|
case globe
|
|
|
|
case location
|
|
|
|
case poster
|
|
|
|
case video
|
|
|
|
// MARK: Statistics
|
|
|
|
case statisticsTime = "time"
|
|
|
|
case statisticsElevationUp = "elevation-up"
|
|
|
|
case statisticsElevationDown = "elevation-down"
|
|
|
|
case statisticsDistance = "distance"
|
|
|
|
case statisticsEnergy = "energy"
|
|
|
|
// MARK: Buttons
|
|
|
|
case buttonDownload = "download"
|
|
|
|
case buttonExternalLink = "external"
|
|
|
|
case buttonGitLink = "git"
|
|
|
|
case buttonPlay = "play-circle"
|
|
|
|
// MARK: Audio player
|
|
|
|
case audioPlayerPlaylist = "playlist"
|
|
|
|
case audioPlayerClose = "close"
|
|
|
|
case audioPlayerPlay = "play"
|
|
|
|
case audioPlayerPause = "pause"
|
|
|
|
case audioPlayerPrevious = "previous"
|
|
|
|
case audioPlayerNext = "next"
|
|
|
|
// MARK: Image compare
|
|
|
|
case leftRightArrow = "left-right-arrow"
|
|
|
|
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
|
|
}
|
|
}
|
|
|
|
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 id: String {
|
|
icon.id
|
|
}
|
|
|
|
var usageString: String {
|
|
icon.usageString
|
|
}
|
|
}
|
|
|
|
extension PageIcon: Hashable {
|
|
|
|
}
|