diff options
-rw-r--r-- | src/e_keys.go | 1 | ||||
-rw-r--r-- | src/i_host.go | 3 | ||||
-rw-r--r-- | src/i_info.go | 2 | ||||
-rw-r--r-- | src/i_ui.go | 28 |
4 files changed, 33 insertions, 1 deletions
diff --git a/src/e_keys.go b/src/e_keys.go index 6d020cb..ce378eb 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -930,7 +930,6 @@ func e_fuzz_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { } else { e_readline(event, &ui.buff, ui, data.home_dir) } - // TODO: here return false } diff --git a/src/i_host.go b/src/i_host.go index 7d3fd57..c37f0ac 100644 --- a/src/i_host.go +++ b/src/i_host.go @@ -110,6 +110,8 @@ func i_host_panel_host(ui HardUI, icons bool, func i_draw_host_panel(ui HardUI, icons bool, litems *ItemsList, data *HardData) { + if ui.mode == FUZZ_MODE { + } i_draw_box(ui.s, 0, 0, ui.dim[W] / 3, ui.dim[H] - 2, ui.style[BOX_STYLE], ui.style[HEAD_STYLE], " Hosts ", false) @@ -124,6 +126,7 @@ func i_draw_host_panel(ui HardUI, icons bool, // } for ptr := litems.draw; ptr != nil && line < ui.dim[H] - 2; ptr = ptr.next { if ui.mode == FUZZ_MODE && i_fuzz_check(ptr, &ui) == false { + // TODO: here continue } if ptr.is_dir() == false && ptr.Host != nil { diff --git a/src/i_info.go b/src/i_info.go index 4802feb..e2aaba4 100644 --- a/src/i_info.go +++ b/src/i_info.go @@ -467,6 +467,8 @@ func i_info_note(ui HardUI, host *HostNode, line int) { func i_draw_info_panel(ui HardUI, percent bool, litems *ItemsList) { type info_func func(HardUI, *HostNode, int) int + if ui.mode == FUZZ_MODE { + } i_draw_box(ui.s, (ui.dim[W] / 3), 0, ui.dim[W] - 1, ui.dim[H] - 2, ui.style[BOX_STYLE], ui.style[HEAD_STYLE], " Infos ", false) diff --git a/src/i_ui.go b/src/i_ui.go index 0ffa945..486cc29 100644 --- a/src/i_ui.go +++ b/src/i_ui.go @@ -205,6 +205,33 @@ func i_draw_msg(s tcell.Screen, lines int, box_style tcell.Style, box_style, title) } +func i_set_box_style(ui *HardUI) { + tmp := tcell.StyleDefault.Background(tcell.ColorReset) + + switch ui.mode { + case NORMAL_MODE, + LOAD_MODE, + WELCOME_MODE, + HELP_MODE: + // FIX: with custom config for default ayayaya + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorReset) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorReset) + case DELETE_MODE, + ERROR_MODE: + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorRed).Dim(true) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorRed).Dim(true) + case MKDIR_MODE, + INSERT_NAME_MODE, + INSERT_MODE, + RENAME_MODE: + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorBlue).Dim(true) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorBlue).Dim(true) + case FUZZ_MODE: + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorPurple) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorPurple) + } +} + func i_draw_bottom_text(ui HardUI, insert *HostNode, insert_err []error) { text := "" @@ -835,6 +862,7 @@ func i_ui(data_dir string) { } for { data.ui.s.Clear() + i_set_box_style(&data.ui) i_draw_bottom_text(data.ui, data.insert, data.insert_err) i_draw_host_panel(data.ui, data.opts.Icon, data.litems, &data) i_draw_info_panel(data.ui, data.opts.Perc, data.litems) |