-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTodoCategory.swift
More file actions
60 lines (54 loc) · 2.21 KB
/
TodoCategory.swift
File metadata and controls
60 lines (54 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// TodoCategory.swift
// DevLog
//
// Created by opfic on 5/29/25.
//
import SwiftUI
enum TodoCategory: String, Identifiable, CaseIterable, Codable {
case issue // 이슈
case feature // 신규 기능
case improvement // 개선/리팩터링
case review // 코드/문서 리뷰
case test // 테스트/QA
case doc // 문서화
case research // 리서치/학습
case etc // 기타
var id: String { rawValue }
var symbolName: String {
switch self {
case .issue: return "exclamationmark.triangle"
case .feature: return "sparkles"
case .improvement: return "arrow.triangle.2.circlepath"
case .review: return "eye"
case .test: return "checkmark.shield"
case .doc: return "doc.text"
case .research: return "magnifyingglass"
case .etc: return "ellipsis"
}
}
var localizedName: String {
switch self {
case .issue: return NSLocalizedString("todo_category_issue", comment: "Todo category: Issue")
case .feature: return NSLocalizedString("todo_category_feature", comment: "Todo category: Feature")
case .improvement: return NSLocalizedString("todo_category_improvement", comment: "Todo category: Improvement")
case .review: return NSLocalizedString("todo_category_review", comment: "Todo category: Review")
case .test: return NSLocalizedString("todo_category_test", comment: "Todo category: Test")
case .doc: return NSLocalizedString("todo_category_doc", comment: "Todo category: Documentation")
case .research: return NSLocalizedString("todo_category_research", comment: "Todo category: Research")
case .etc: return NSLocalizedString("todo_category_etc", comment: "Todo category: Etc")
}
}
var color: Color {
switch self {
case .issue: return Color.red
case .feature: return Color.green
case .improvement: return Color.cyan
case .review: return Color.orange
case .test: return Color.purple
case .doc: return Color.yellow
case .research: return Color.teal
case .etc: return Color.gray
}
}
}