╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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.clone_http_port != null or session.data.clone_ssh_port != null)) { │ │859 - var clone_url = try ui.CloneUrl.View.init(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 = .{ .clone_url = clone_url }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } }); │ │858 + if (!session.data.is_local and (session.data.git_http_port != null or session.data.git_ssh_port != null)) { │ │859 + var git_remote = try ui.GitRemote.View.initClone(allocator, session, identity); │ │860 + errdefer git_remote.deinit(allocator); │ │861 + const min_width = git_remote.minWidth(); │ │862 + box.getFocus().child_id = git_remote.getFocus().id; │ │863 + try box.children.put(allocator, git_remote.getFocus().id, .{ .widget = .{ .git_remote = git_remote }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } });│ │864 } │ │865 │ │866 var spacer = try ui.Spacer.init(allocator); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │884 } │ │885 │ │886 pub fn input(self: *Header.View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │887 - const clone_url = self.cloneUrl() orelse return; │ │888 - try clone_url.input(allocator, key, root_focus); │ │887 + const git_remote = self.gitRemote() orelse return; │ │888 + try git_remote.input(allocator, key, root_focus); │ │889 } │ │890 │ │891 - pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { │ │892 - const clone_url = self.cloneUrl() orelse return false; │ │893 - root_focus.setFocus(clone_url.getFocus().id); │ │891 + pub fn focusGitRemote(self: *Header.View, root_focus: *Focus) bool { │ │892 + const git_remote = self.gitRemote() orelse return false; │ │893 + root_focus.setFocus(git_remote.getFocus().id); │ │894 return true; │ │895 } │ │896 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │897 - pub fn hasCloneUrl(self: *Header.View) bool { │ │898 - return self.cloneUrl() != null; │ │897 + pub fn hasGitRemote(self: *Header.View) bool { │ │898 + return self.gitRemote() != null; │ │899 } │ │900 │ │901 - fn cloneUrl(self: *Header.View) ?*ui.CloneUrl.View { │ │901 + fn gitRemote(self: *Header.View) ?*ui.GitRemote.View { │ │902 for (self.box.children.values()) |*child| switch (child.widget) {│ │903 - .clone_url => |*clone_url| return clone_url, │ │903 + .git_remote => |*git_remote| return git_remote, │ │904 else => {}, │ │905 }; │ │906 return null; │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Threads.zig│ ╰───────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1507 }; │ │1508 │ │1509 if (has_drafts and entryDraft(entry)) { │ │1510 - if (self.data.target_branch.len != 0 and (self.session.data.clone_http_port != null or self.session.data.clone_ssh_port != null)) {│ │1511 - var push = try ui.CloneUrl.View.initPush(allocator, self.session, self.data.identity, entry.id, self.data.target_branch); │ │1510 + if (self.data.target_branch.len != 0 and self.session.data.git_ssh_port != null) { │ │1511 + var push = try ui.GitRemote.View.initPush(allocator, self.session, self.data.identity, entry.id, self.data.target_branch); │ │1512 errdefer push.deinit(allocator); │ │1513 - try inner.children.put(allocator, push.getFocus().id, .{ .widget = .{ .clone_url = push }, .rect = null, .min_size = null }); │ │1513 + try inner.children.put(allocator, push.getFocus().id, .{ .widget = .{ .git_remote = push }, .rect = null, .min_size = null }); │ │1514 } │ │1515 inner.getFocus().child_id = inner.children.keys()[title_child_index]; │ │1516 const sc = self.detailScroll(index); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │1695 self.tagsInput(index, child_index, tf, key, root_focus); │ │1696 return; │ │1697 }, │ │1698 - .clone_url => |*clone_url| { │ │1698 + .git_remote => |*git_remote| { │ │1699 switch (key) { │ │1700 .arrow_up => _ = self.moveDetailVertical(index, root_focus, false), │ │1701 .arrow_down => _ = self.moveDetailVertical(index, root_focus, true),│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │1702 - .arrow_left => if (clone_url.selected == 0) │ │1702 + .arrow_left => if (git_remote.selected == 0) │ │1703 self.focusList(index, root_focus) │ │1704 else │ │1705 - try clone_url.input(allocator, key, root_focus), │ │1706 - else => try clone_url.input(allocator, key, root_focus), │ │1705 + try git_remote.input(allocator, key, root_focus), │ │1706 + else => try git_remote.input(allocator, key, root_focus),│ │1707 } │ │1708 return; │ │1709 }, │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭ added ─────────────╮ │src/ui/GitRemote.zig│ ╰────────────────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭────────────────────────────────────────╮ │42 remote: struct { │ │43 admin_repo_path: []const u8,│ │44 session_store: SessionStore,│ │45 - clone_http_port: ?u16, │ │46 - clone_ssh_port: ?u16, │ │45 + git_http_port: ?u16, │ │46 + git_ssh_port: ?u16, │ │47 }, │ │48 local: ui.RepoSource, │ │49 }; │ ╰────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────╮ │247 }, │ │248 } │ │249 │ │250 - const clone_http_port: ?u16, const clone_ssh_port: ?u16 = switch (host) { │ │251 - .remote => |remote| .{ remote.clone_http_port, remote.clone_ssh_port },│ │250 + const git_http_port: ?u16, const git_ssh_port: ?u16 = switch (host) { │ │251 + .remote => |remote| .{ remote.git_http_port, remote.git_ssh_port }, │ │252 .local => .{ null, null }, │ │253 }; │ │254 const html = renderIndexHtml(io, allocator, host, .{ │ ╰────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │257 .sync_failure = sync_failure, │ │258 .current_page = current_page, │ │259 .is_local = host == .local, │ │260 - .clone_http_port = clone_http_port, │ │261 - .clone_ssh_port = clone_ssh_port, │ │260 + .git_http_port = git_http_port, │ │261 + .git_ssh_port = git_ssh_port, │ │262 }) catch |err| switch (err) { │ │263 error.NotFound => { │ │264 try request.respond("not found", .{│ ╰────────────────────────────────────────────────────────╯