aboutsummaryrefslogtreecommitdiffstats
path: root/src/i_ui.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_ui.go')
-rw-r--r--src/i_ui.go30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/i_ui.go b/src/i_ui.go
index 97921e0..1eccdcc 100644
--- a/src/i_ui.go
+++ b/src/i_ui.go
@@ -300,8 +300,8 @@ func i_prompt_gpg(ui HardUI, keys [][2]string) {
}
i_draw_text(ui.s,
1, ui.dim[H] - 1, ui.dim[W] - 1, ui.dim[H] - 1,
- ui.style[STYLE_BOT], "gpg: ")
- ui.s.ShowCursor(6 + len(ui.buff), ui.dim[H] - 1)
+ ui.style[STYLE_DEF], "gpg: ")
+ ui.s.ShowCursor(6, ui.dim[H] - 1)
}
func i_prompt_confirm_gpg(ui HardUI, opts HardOpts) {
@@ -323,6 +323,29 @@ func i_prompt_confirm_gpg(ui HardUI, opts HardOpts) {
ui.style[STYLE_DEF], opts.GPG)
}
+func i_draw_mkdir(ui HardUI, curr *ItemsNode) {
+ path := ""
+ if curr != nil {
+ if curr.is_dir() == true {
+ path = curr.Dirs.path()
+ } else {
+ path = curr.Host.Parent.path()
+ }
+ }
+ path = path[1:]
+ prompt := "mkdir: "
+ i_draw_text(ui.s,
+ 1, ui.dim[H] - 1, ui.dim[W] - 1, ui.dim[H] - 1,
+ ui.style[STYLE_DEF], prompt)
+ i_draw_text(ui.s, len(prompt) + 1,
+ ui.dim[H] - 1, ui.dim[W] - 1, ui.dim[H] - 1,
+ ui.style[STYLE_DEF], path)
+ i_draw_text(ui.s, len(prompt) + 1 + len(path),
+ ui.dim[H] - 1, ui.dim[W] - 1, ui.dim[H] - 1,
+ ui.style[STYLE_DEF].Bold(true), ui.buff)
+ ui.s.ShowCursor(len(prompt) + 1 + len(path) + len(ui.buff), ui.dim[H] - 1)
+}
+
func i_draw_zhosts_box(ui HardUI) {
i_draw_msg(ui.s, 1, ui.style[STYLE_BOX], ui.dim, " No hosts ")
text := "Hosts list empty. Add hosts/folders by pressing (a/m)"
@@ -554,6 +577,9 @@ func i_ui(data_dir string) {
if data.ui.mode == ERROR_MODE {
i_draw_error_msg(data.ui, data.load_err)
}
+ if data.ui.mode == MKDIR_MODE {
+ i_draw_mkdir(data.ui, data.litems.curr)
+ }
data.ui.s.Show()
i_events(&data)
}