From eb868146e3c08bc2d39b7e13503a7edfdd75f1ae Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 1 Feb 2024 20:20:20 +0100 Subject: mount drive --- src/i_info.go | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/i_info.go b/src/i_info.go index bed938d..f7fe7d3 100644 --- a/src/i_info.go +++ b/src/i_info.go @@ -278,10 +278,31 @@ func i_info_panel_host(ui HardUI, host *HostNode) { i_draw_text(ui.s, (ui.dim[W] / 3) + 12, line, ui.dim[W] - 2, line, ui.style[STYLE_DEF], qual[host.Quality]) - line += 1 - if line += 1; line > ui.dim[H] - 3 { + if line += 2; line > ui.dim[H] - 3 { return } + if host.Drive != nil { + i_draw_text(ui.s, + (ui.dim[W] / 3) + 3, line, ui.dim[W] - 2, line, + ui.style[STYLE_TITLE], "Drives: ") + if line += 1; line > ui.dim[H] - 3 { + return + } + for share, path := range host.Drive { + i_draw_text(ui.s, + (ui.dim[W] / 3) + 4, line, ui.dim[W] - 2, line, + ui.style[STYLE_TITLE], share + ":") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 4 + len(share) + 2, line, ui.dim[W] - 2, line, + ui.style[STYLE_DEF], path) + if line += 1; line > ui.dim[H] - 3 { + return + } + } + if line += 1; line > ui.dim[H] - 3 { + return + } + } } // note if len(host.Note) > 0 { -- cgit v1.2.3