Skip to content

Commit

Permalink
Merge pull request #93 from zarghol/feature/improvements
Browse files Browse the repository at this point in the history
Feature/improvements
  • Loading branch information
Clément Nonn authored May 31, 2021
2 parents b37249b + 9432778 commit 9e92758
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion RunningOrder/Sprint/Models/Search.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extension SearchSection {
case .people:
return "person.circle"
case .filter:
return ""
return "text.magnifyingglass"
}
}

Expand Down
11 changes: 6 additions & 5 deletions RunningOrder/Sprint/Views/NewSprintView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ struct NewSprintView: View {
TextField(
"Sprint Name",
text: $logic.name,
onEditingChanged: logic.fieldEditingChanged(valueKeyPath: \.name),
onCommit: logic.createSprint
onEditingChanged: logic.fieldEditingChanged(valueKeyPath: \.name)
)
TextField(
"Sprint Number",
value: $logic.number,
formatter: NumberFormatter(),
onCommit: logic.createSprint
formatter: NumberFormatter()
)

Picker(selection: $logic.colorIdentifier, label: Text("Sprint Color")) {
Expand All @@ -37,15 +35,18 @@ struct NewSprintView: View {
.foregroundColor(Color(identifier: sprintColor))
.tag(sprintColor)
}
}.labelsHidden()
}
.labelsHidden()

Spacer(minLength: 20)

HStack {
Button(action: dismiss) { Text("Cancel") }
.keyboardShortcut(.cancelAction)
Spacer()
Button(action: logic.createSprint) { Text("Create") }
.disabled(!logic.areAllFieldsFilled)
.keyboardShortcut(.defaultAction)
}
}
.padding()
Expand Down
5 changes: 3 additions & 2 deletions RunningOrder/Story/Views/NewStoryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ struct NewStoryView: View {
TextField(
"Story EPIC",
text: $logic.epic,
onEditingChanged: logic.fieldEditingChanged(valueKeyPath: \.epic),
onCommit: logic.createStory
onEditingChanged: logic.fieldEditingChanged(valueKeyPath: \.epic)
)

HStack {
Button(action: dismiss) { Text("Cancel") }
.keyboardShortcut(.cancelAction)
Spacer()
Button(action: logic.createStory) { Text("Create") }
.disabled(!logic.areAllFieldsFilled)
.keyboardShortcut(.defaultAction)
}
}
.padding()
Expand Down
5 changes: 5 additions & 0 deletions RunningOrder/Story/Views/StepsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ struct StepsView: View {
@Binding var storyInformation: StoryInformation
@State private var selectedMode = DisplayMode.video

init(storyInformation: Binding<StoryInformation>) {
_storyInformation = storyInformation
_selectedMode = State(initialValue: storyInformation.wrappedValue.steps.isEmpty ? .video : .steps)
}

var body: some View {
ScrollView {
VStack {
Expand Down

0 comments on commit 9e92758

Please sign in to comment.