╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │813 // contents); an unloaded file gets an "a:" link, so activating it reloads the │ │814 // page with that file selected and its content read. │ │815 fn fileLink(page_arena: *std.heap.ArenaAllocator, data: *const Self, path: []const u8, loaded: bool, line: usize) ![]const u8 { │ │816 - const route = ui.RoutablePage.repoFilesRoute(data.identity, data.ref_or_oid, data.ref_or_oid_value, path, line) orelse return error.RouteTooLong;│ │816 + const route = data.location.filesRoute(data.ref_or_oid, data.ref_or_oid_value, path, line) orelse return error.RouteTooLong; │ │817 const prefix = if (loaded) "ai:" else "a:"; │ │818 return std.fmt.allocPrint(page_arena.allocator(), "{s}{s}", .{ prefix, try route.toUrl(page_arena) }); │ │819 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │851 box: wgt.Box(ui.Widget), │ │852 data: *const Header, │ │853 │ │854 - pub fn init(allocator: std.mem.Allocator, data: *const Header, session: *ui.Session, identity: []const u8) !Header.View { │ │854 + pub fn init(allocator: std.mem.Allocator, data: *const Header, session: *ui.Session, location: ui.RoutablePage.RepoLocation) !Header.View {│ │855 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ │856 errdefer box.deinit(allocator); │ │857 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │858 - if (!session.data.is_local and (session.data.git_http_port != null or session.data.git_ssh_port != null)) { │ │859 - var clone_url = try ui.widget.CopyableText.initClone(allocator, session, identity); │ │860 - errdefer clone_url.deinit(allocator); │ │861 - const min_width = clone_url.minWidth(); │ │862 - box.getFocus().child_id = clone_url.getFocus().id; │ │863 - try box.children.put(allocator, clone_url.getFocus().id, .{ .widget = .{ .copyable_text = clone_url }, .rect = null, .min_size = .{ .width = min_width, .height = 3 }, .max_size = .{ .width = min_width, .height = 3 } }); │ │858 + if (!session.data.is_local) { │ │859 + if (try ui.widget.CopyableText.initClone(allocator, session, location)) |value| { │ │860 + var clone_url = value; │ │861 + errdefer clone_url.deinit(allocator); │ │862 + const min_width = clone_url.minWidth(); │ │863 + box.getFocus().child_id = clone_url.getFocus().id; │ │864 + try box.children.put(allocator, clone_url.getFocus().id, .{ .widget = .{ .copyable_text = clone_url }, .rect = null, .min_size = .{ .width = min_width, .height = 3 }, .max_size = .{ .width = min_width, .height = 3 } });│ │865 + } │ │866 } │ │867 │ │868 var spacer = try ui.widget.Spacer.init(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯