╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────╮ │2104 repo_events_header: Repo.Events.Header.View,│ │2105 repo_events: Repo.Events.View, │ │2106 repo_comment: Repo.Comment.Item, │ │2107 - clone_url: CloneUrl.View, │ │2107 + git_remote: GitRemote.View, │ │2108 home_users: Home.Users.View, │ │2109 home_repos: Home.Repos.View, │ │2110 auth_tab: Home.Header.AuthTab.View, │ ╰──────────────────────────────────────────────────────╯ ╭ removed ──────────╮ │src/ui/CloneUrl.zig│ ╰───────────────────╯ ╭ changed ──────╮ │src/ui/Repo.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │436 switch (child.*) { │ │437 .repo_header => { │ │438 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) {│ │439 - .repo_files => |*v| if (v.focusCloneUrl(root_focus)) return, │ │440 - .repo_commits => |*v| if (v.focusCloneUrl(root_focus)) return, │ │439 + .repo_files => |*v| if (v.focusGitRemote(root_focus)) return, │ │440 + .repo_commits => |*v| if (v.focusGitRemote(root_focus)) return, │ │441 else => {}, │ │442 }; │ │443 index = stack_index; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │750 } │ │751 return; │ │752 } │ │753 - if (key == .arrow_up and self.contentAtTop() and self.header().focusCloneUrl(root_focus)) return; │ │753 + if (key == .arrow_up and self.contentAtTop() and self.header().focusGitRemote(root_focus)) return;│ │754 if (self.diffActive()) { │ │755 try self.diffInput(key, root_focus); │ │756 } else { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │944 // only the clone-url row sits directly below the repository header. │ │945 pub fn getSelectedIndex(self: *View) ?usize { │ │946 if (self.headerActive()) return 0; │ │947 - return if (self.header().hasCloneUrl() or !self.contentAtTop()) 1 else 0; │ │947 + return if (self.header().hasGitRemote() or !self.contentAtTop()) 1 else 0;│ │948 } │ │949 │ │950 - pub fn focusCloneUrl(self: *View, root_focus: *Focus) bool { │ │951 - return self.header().focusCloneUrl(root_focus); │ │950 + pub fn focusGitRemote(self: *View, root_focus: *Focus) bool { │ │951 + return self.header().focusGitRemote(root_focus); │ │952 } │ │953 }; │ │954 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1007 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ │1008 errdefer box.deinit(allocator); │ │1009 │ │1010 - if (!session.data.is_local and (session.data.clone_http_port != null or session.data.clone_ssh_port != null)) { │ │1011 - var clone_url = try ui.CloneUrl.View.init(allocator, session, identity); │ │1012 - errdefer clone_url.deinit(allocator); │ │1013 - const min_width = clone_url.minWidth(); │ │1014 - box.getFocus().child_id = clone_url.getFocus().id; │ │1015 - try box.children.put(allocator, clone_url.getFocus().id, .{ .widget = .{ .clone_url = clone_url }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } }); │ │1010 + if (!session.data.is_local and (session.data.git_http_port != null or session.data.git_ssh_port != null)) { │ │1011 + var git_remote = try ui.GitRemote.View.initClone(allocator, session, identity); │ │1012 + errdefer git_remote.deinit(allocator); │ │1013 + const min_width = git_remote.minWidth(); │ │1014 + box.getFocus().child_id = git_remote.getFocus().id; │ │1015 + try box.children.put(allocator, git_remote.getFocus().id, .{ .widget = .{ .git_remote = git_remote }, .rect = null, .min_size = .{ .width = min_width, .height = 3 } });│ │1016 } │ │1017 │ │1018 var spacer = try ui.Spacer.init(allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1036 } │ │1037 │ │1038 pub fn input(self: *Header.View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void {│ │1039 - const clone_url = self.cloneUrl() orelse return; │ │1040 - try clone_url.input(allocator, key, root_focus); │ │1039 + const git_remote = self.gitRemote() orelse return; │ │1040 + try git_remote.input(allocator, key, root_focus); │ │1041 } │ │1042 │ │1043 - pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { │ │1044 - const clone_url = self.cloneUrl() orelse return false; │ │1045 - root_focus.setFocus(clone_url.getFocus().id); │ │1043 + pub fn focusGitRemote(self: *Header.View, root_focus: *Focus) bool { │ │1044 + const git_remote = self.gitRemote() orelse return false; │ │1045 + root_focus.setFocus(git_remote.getFocus().id); │ │1046 return true; │ │1047 } │ │1048 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │1049 - pub fn hasCloneUrl(self: *Header.View) bool { │ │1050 - return self.cloneUrl() != null; │ │1049 + pub fn hasGitRemote(self: *Header.View) bool { │ │1050 + return self.gitRemote() != null; │ │1051 } │ │1052 │ │1053 - fn cloneUrl(self: *Header.View) ?*ui.CloneUrl.View { │ │1053 + fn gitRemote(self: *Header.View) ?*ui.GitRemote.View { │ │1054 for (self.box.children.values()) |*child| switch (child.widget) {│ │1055 - .clone_url => |*clone_url| return clone_url, │ │1055 + .git_remote => |*git_remote| return git_remote, │ │1056 else => {}, │ │1057 }; │ │1058 return null; │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │579 } │ │580 return; │ │581 } │ │582 - if (key == .arrow_up and self.contentAtTop() and self.header().focusCloneUrl(root_focus)) return; │ │582 + if (key == .arrow_up and self.contentAtTop() and self.header().focusGitRemote(root_focus)) return;│ │583 if (self.detailActive()) { │ │584 try self.detailInput(key, root_focus); │ │585 } else { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │749 // only the clone-url row sits directly below the repository header. │ │750 pub fn getSelectedIndex(self: *View) ?usize { │ │751 if (self.headerActive()) return 0; │ │752 - return if (self.header().hasCloneUrl() or !self.contentAtTop()) 1 else 0; │ │752 + return if (self.header().hasGitRemote() or !self.contentAtTop()) 1 else 0;│ │753 } │ │754 │ │755 - pub fn focusCloneUrl(self: *View, root_focus: *Focus) bool { │ │756 - return self.header().focusCloneUrl(root_focus); │ │755 + pub fn focusGitRemote(self: *View, root_focus: *Focus) bool { │ │756 + return self.header().focusGitRemote(root_focus); │ │757 } │ │758 }; │ │759 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯