Code cleanup
This commit is contained in:
@@ -7,9 +7,8 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
#if !os(macOS)
|
|
||||||
import UIKit
|
import UIKit
|
||||||
#endif
|
|
||||||
|
|
||||||
@MainActor class MainViewModel: ObservableObject {
|
@MainActor class MainViewModel: ObservableObject {
|
||||||
@Published var categories: [Category] = []
|
@Published var categories: [Category] = []
|
||||||
|
|||||||
@@ -367,17 +367,13 @@ fileprivate struct DurationPicker: View {
|
|||||||
Text(title)
|
Text(title)
|
||||||
Spacer()
|
Spacer()
|
||||||
TextField("00", text: $duration.hourComponent)
|
TextField("00", text: $duration.hourComponent)
|
||||||
#if !os(macOS)
|
|
||||||
.keyboardType(.decimalPad)
|
.keyboardType(.decimalPad)
|
||||||
#endif
|
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.multilineTextAlignment(.trailing)
|
.multilineTextAlignment(.trailing)
|
||||||
.frame(maxWidth: 40)
|
.frame(maxWidth: 40)
|
||||||
Text(":")
|
Text(":")
|
||||||
TextField("00", text: $duration.minuteComponent)
|
TextField("00", text: $duration.minuteComponent)
|
||||||
#if !os(macOS)
|
|
||||||
.keyboardType(.decimalPad)
|
.keyboardType(.decimalPad)
|
||||||
#endif
|
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.frame(maxWidth: 40)
|
.frame(maxWidth: 40)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user