We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 319a0d4 + efa47f6 commit fb5a322Copy full SHA for fb5a322
Commandoak/View/CommandDetailView.swift
@@ -21,10 +21,12 @@ struct CommandDetailView: View {
21
TextField("Name", text: $name)
22
.padding()
23
TextField("Icon", text: $icon)
24
- .padding()
25
- TextField("Command", text: $execute)
+ .onChange(of: icon) { _, newState in
+ self.icon = String(newState.prefix(1))
26
+ }
27
28
}
29
+ .textFieldStyle(.roundedBorder)
30
.toolbar {
31
ToolbarItem(placement: .confirmationAction) {
32
Button("Save") {
@@ -48,6 +50,13 @@ struct CommandDetailView: View {
48
50
execute = cmd.execute
49
51
52
.id(cmd.id)
53
+ VStack(alignment: .leading) {
54
+ Text("Command")
55
+ TextEditor(text: $execute)
56
+ .font(.system(.body, design: .monospaced))
57
+ .frame(height: 100)
58
59
+ .padding()
60
61
62
0 commit comments