╭ changed ────╮ │build.zig.zon│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 3 .version = "0.0.0", │ │ 4 .dependencies = .{ │ │ 5 .xit = .{ │ │ 6 - .url = "git+https://github.com/xit-vcs/xit#1b23d8b70239c86ab0394886e7b1693b60add75b",│ │ 7 - .hash = "xit-0.0.0-Ub3nDJijUAG62ILBJ9srPj9DWo-vSNRvShviwJVE4P9y", │ │ 6 + .url = "git+https://github.com/xit-vcs/xit#825bf9bb5362d56510ff68884966bf8e85bf3d1c",│ │ 7 + .hash = "xit-0.0.0-Ub3nDJijUAEGb6FVX-srDVZi6SQBnbPGPl_5sJ87hB0-", │ │ 8 }, │ │ 9 }, │ │10 .paths = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │272 if (ui_session.host_request) |request| { │ │273 ui_session.host_request = null; │ │274 switch (request) { │ │275 - .clone_url => |url| { │ │275 + .show_url => |url| { │ │276 if (terminal_maybe) |*terminal| terminal.deinit(); │ │277 terminal_maybe = null; │ │278 try session_writer.interface.print("\x1b[2J\x1b[H{s}\r\n\r\npress enter to go back\r\n", .{url});│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────╮ │12 const Grid = xitui.grid.Grid; │ │13 const Focus = xitui.focus.Focus; │ │14 const evt = @import("./event.zig"); │ │15 +const inp = @import("./ui/input.zig"); │ │16 │ │17 pub const Home = @import("./ui/Home.zig");│ │18 pub const User = @import("./ui/User.zig");│ ╰──────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │968 // port the web UI is served on, for the TUI/SSH footer's "http://localhost:<port>..."│ │969 // url. null on the web itself (no footer there). │ │970 web_port: ?u16 = null, │ │970 - // a host operation requested by a widget. terminals present clone urls on │ │971 + // a host operation requested by a widget. terminals present urls on │ │972 // their restored screen; wasm asks the browser to copy them. │ │973 host_request: ?HostRequest = null, │ │974 quit_requested: bool = false, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │975 │ │976 pub const HostRequest = union(enum) {│ │976 - clone_url: []const u8, │ │977 + show_url: []const u8, │ │978 }; │ │979 │ │980 const Self = @This(); │ ╰──────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────╮ │1144 if (session.host_request) |request| {│ │1145 session.host_request = null; │ │1146 switch (request) { │ │1146 - .clone_url => |url| { │ │1147 + .show_url => |url| { │ │1148 term.setActive(null); │ │1149 terminal.deinit(io); │ │1150 terminal_live = false; │ ╰───────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │1150 - showCloneUrl(io, url) catch |show_err| { │ │1151 + showUrl(io, url) catch |show_err| { │ │1152 terminal = try term.Terminal.init(io, allocator);│ │1153 terminal_live = true; │ │1154 term.setActive(&terminal); │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────╮ │1185 } │ │1186 } │ │1187 │ │1187 -fn showCloneUrl(io: std.Io, url: []const u8) !void { │ │1188 +fn showUrl(io: std.Io, url: []const u8) !void { │ │1189 const tty: ?std.Io.File = if (builtin.os.tag == .windows)│ │1190 null │ │1191 else │ ╰───────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │2131 grid: ?Grid, │ │2132 session: *Session, │ │2133 arena: std.heap.ArenaAllocator, │ │2134 + url: []const u8 = "", │ │2135 + url_width: usize = 0, │ │2136 │ │2137 pub fn init(allocator: std.mem.Allocator, session: *Session) !Footer {│ │2138 return .{ │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │2156 if (width == 0) return; │ │2157 │ │2158 _ = self.arena.reset(.retain_capacity); │ │2159 + self.url = ""; │ │2160 + self.url_width = 0; │ │2161 const aa = self.arena.allocator(); │ │2162 const path = self.session.data.current_page.toUrl(&self.arena) catch return;│ │2163 const text = if (self.session.web_port) |port| │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯