Newer Older
45 lines | 0.999kb
Bogdan Timofte authored a week ago
1
//
2
//  SidebarHelpReason.swift
3
//  USB Meter
4
//
5

            
6
import SwiftUI
7

            
8
enum SidebarHelpReason: String {
9
    case bluetoothPermission
10
    case cloudSyncUnavailable
11
    case noDevicesDetected
12

            
13
    var tint: Color {
14
        switch self {
15
        case .bluetoothPermission:
16
            return .orange
17
        case .cloudSyncUnavailable:
18
            return .indigo
19
        case .noDevicesDetected:
20
            return .yellow
21
        }
22
    }
23

            
24
    var symbol: String {
25
        switch self {
26
        case .bluetoothPermission:
27
            return "bolt.horizontal.circle.fill"
28
        case .cloudSyncUnavailable:
29
            return "icloud.slash.fill"
30
        case .noDevicesDetected:
31
            return "magnifyingglass.circle.fill"
32
        }
33
    }
34

            
35
    var badgeTitle: String {
36
        switch self {
37
        case .bluetoothPermission:
38
            return "Required"
39
        case .cloudSyncUnavailable:
40
            return "Sync Off"
41
        case .noDevicesDetected:
42
            return "Suggested"
43
        }
44
    }
45
}