Add connections dashboard
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
public enum ConnectionListPage: Int, CaseIterable, Identifiable {
|
||||
public var id: Self {
|
||||
self
|
||||
}
|
||||
|
||||
case active
|
||||
case closed
|
||||
}
|
||||
|
||||
public extension ConnectionListPage {
|
||||
var title: String {
|
||||
switch self {
|
||||
case .active:
|
||||
return NSLocalizedString("Active", comment: "")
|
||||
case .closed:
|
||||
return NSLocalizedString("Closed", comment: "")
|
||||
}
|
||||
}
|
||||
|
||||
var label: some View {
|
||||
switch self {
|
||||
case .active:
|
||||
return Label(title, systemImage: "play.fill")
|
||||
case .closed:
|
||||
return Label(title, systemImage: "stop.fill")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user