Create BearWave macOS radio-first app
This commit is contained in:
59
Sources/BearWaveCore/Models/StationPage.swift
Normal file
59
Sources/BearWaveCore/Models/StationPage.swift
Normal file
@@ -0,0 +1,59 @@
|
||||
import Foundation
|
||||
|
||||
enum StationPage: String, CaseIterable, Identifiable, Codable {
|
||||
case top
|
||||
case germany
|
||||
case netherlands
|
||||
case world
|
||||
case search
|
||||
case favorites
|
||||
case recent
|
||||
case manual
|
||||
case group
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .top: String(localized: "Top")
|
||||
case .germany: String(localized: "Germany")
|
||||
case .netherlands: String(localized: "Netherlands")
|
||||
case .world: String(localized: "World")
|
||||
case .search: String(localized: "Search Results")
|
||||
case .favorites: String(localized: "Favorites")
|
||||
case .recent: String(localized: "Recent")
|
||||
case .manual: String(localized: "Manual")
|
||||
case .group: ""
|
||||
}
|
||||
}
|
||||
|
||||
var systemImage: String {
|
||||
switch self {
|
||||
case .top: "chart.bar.fill"
|
||||
case .germany: "flag.fill"
|
||||
case .netherlands: "flag"
|
||||
case .world: "globe.europe.africa.fill"
|
||||
case .search: "magnifyingglass"
|
||||
case .favorites: "star.fill"
|
||||
case .recent: "clock.arrow.circlepath"
|
||||
case .manual: "plus.circle.fill"
|
||||
case .group: "folder.fill"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum StationSortMode: String, CaseIterable, Identifiable, Codable {
|
||||
case name
|
||||
case bitrate
|
||||
case votes
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .name: String(localized: "Name")
|
||||
case .bitrate: String(localized: "Bitrate")
|
||||
case .votes: String(localized: "Votes")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user