diff options
author | Joe <rbo@gmx.us> | 2024-04-24 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-04-24 20:20:20 +0200 |
commit | 908b4ccc0d2f85898e94feda77dae2fe25782544 (patch) | |
tree | a2225982cfa3b45e9f052dd3c481feaf53f6fac8 /src/i_info.go | |
parent | up (diff) | |
download | hardflip-908b4ccc0d2f85898e94feda77dae2fe25782544.tar.gz hardflip-908b4ccc0d2f85898e94feda77dae2fe25782544.tar.bz2 hardflip-908b4ccc0d2f85898e94feda77dae2fe25782544.tar.xz hardflip-908b4ccc0d2f85898e94feda77dae2fe25782544.tar.zst hardflip-908b4ccc0d2f85898e94feda77dae2fe25782544.zip |
jump
Diffstat (limited to '')
-rw-r--r-- | src/i_info.go | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/i_info.go b/src/i_info.go index dc1d70b..a5860f3 100644 --- a/src/i_info.go +++ b/src/i_info.go @@ -295,6 +295,53 @@ func i_info_rdp(ui HardUI, host *HostNode, line int) int { } if line += 1; line > ui.dim[H] - 3 { return line } } + // jump + if len(host.Jump.Host) > 0 { + i_draw_text(ui.s, + (ui.dim[W] / 3) + 3, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "Jump settings: ") + if line += 1; line > ui.dim[H] - 3 { return line } + i_draw_text(ui.s, + (ui.dim[W] / 3) + 4, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "Host: ") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 10, line, ui.dim[W] - 2, line, + ui.style[DEF_STYLE], host.Jump.Host) + if line += 1; line > ui.dim[H] - 3 { return line } + i_draw_text(ui.s, + (ui.dim[W] / 3) + 4, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "Port: ") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 10, line, ui.dim[W] - 2, line, + ui.style[DEF_STYLE], strconv.Itoa(int(host.Jump.Port))) + if line += 1; line > ui.dim[H] - 3 { return line } + i_draw_text(ui.s, + (ui.dim[W] / 3) + 4, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "User: ") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 10, line, ui.dim[W] - 2, line, + ui.style[DEF_STYLE], host.Jump.User) + if line += 1; line > ui.dim[H] - 3 { return line } + if len(host.Jump.Pass) > 0 { + i_draw_text(ui.s, + (ui.dim[W] / 3) + 4, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "Pass: ") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 10, line, ui.dim[W] - 2, line, + ui.style[DEF_STYLE], "***") + if line += 1; line > ui.dim[H] - 3 { return line } + } + if len(host.Jump.Priv) > 0 { + i_draw_text(ui.s, + (ui.dim[W] / 3) + 4, line, ui.dim[W] - 2, line, + ui.style[TITLE_STYLE], "Privkey: ") + i_draw_text(ui.s, + (ui.dim[W] / 3) + 13, line, ui.dim[W] - 2, line, + ui.style[DEF_STYLE], host.Jump.Priv) + if line += 1; line > ui.dim[H] - 3 { return line } + } + if line += 1; line > ui.dim[H] - 3 { return line } + } return line } |