Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Commandoak/View/CommandDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ struct CommandDetailView: View {
TextField("Name", text: $name)
.padding()
TextField("Icon", text: $icon)
.padding()
TextField("Command", text: $execute)
.onChange(of: icon) { _, newState in
self.icon = String(newState.prefix(1))
}
.padding()
}
.textFieldStyle(.roundedBorder)
.toolbar {
ToolbarItem(placement: .confirmationAction) {
Button("Save") {
Expand All @@ -48,6 +50,13 @@ struct CommandDetailView: View {
execute = cmd.execute
}
.id(cmd.id)
VStack(alignment: .leading) {
Text("Command")
TextEditor(text: $execute)
.font(.system(.body, design: .monospaced))
.frame(height: 100)
}
.padding()
}
}

Expand Down