Skip to content

Commit e18817f

Browse files
committed
add: implement context menu for log copying in EditorView
1 parent ad7209b commit e18817f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lara/views/EditorView.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ struct EditorView: View {
1717
@State private var status: String?
1818
@State private var currentPath: String = "/"
1919
@State private var pathContents: [(name: String, isDir: Bool)] = []
20+
@State private var showContextMenu = false
2021

2122
// init() {
2223
// let docs = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
@@ -59,9 +60,14 @@ struct EditorView: View {
5960
.font(.system(size: 12, design: .monospaced))
6061
.frame(maxWidth: .infinity, alignment: .leading)
6162
.padding(4)
62-
.textSelection(.enabled)
6363
}
6464
.frame(height: 200)
65+
.contextMenu {
66+
Button("Copy Log") {
67+
UIPasteboard.general.string = mgr.vfsinitlog
68+
}
69+
}
70+
6571
}
6672
}
6773
.navigationTitle("MobileGestalt")

0 commit comments

Comments
 (0)