diff options
author | Joe <rbo@gmx.us> | 2024-02-01 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-02-01 20:20:20 +0100 |
commit | eb868146e3c08bc2d39b7e13503a7edfdd75f1ae (patch) | |
tree | acbf937d9e7c5527e040b5b3278be256333dbde2 | |
parent | ye (diff) | |
download | hardflip-eb868146e3c08bc2d39b7e13503a7edfdd75f1ae.tar.gz hardflip-eb868146e3c08bc2d39b7e13503a7edfdd75f1ae.tar.bz2 hardflip-eb868146e3c08bc2d39b7e13503a7edfdd75f1ae.tar.xz hardflip-eb868146e3c08bc2d39b7e13503a7edfdd75f1ae.tar.zst hardflip-eb868146e3c08bc2d39b7e13503a7edfdd75f1ae.zip |
mount drive
-rw-r--r-- | src/i_info.go | 25 |
1 files 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 { |