╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │579 } │ │580 return; │ │581 } │ │582 - if (key == .arrow_up and self.contentAtTop() and self.header().focusGitRemote(root_focus)) return;│ │582 + if (key == .arrow_up and self.contentAtTop() and self.header().focusCloneUrl(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().hasGitRemote() or !self.contentAtTop()) 1 else 0;│ │752 + return if (self.header().hasCloneUrl() or !self.contentAtTop()) 1 else 0; │ │753 } │ │754 │ │755 - pub fn focusGitRemote(self: *View, root_focus: *Focus) bool { │ │756 - return self.header().focusGitRemote(root_focus); │ │755 + pub fn focusCloneUrl(self: *View, root_focus: *Focus) bool { │ │756 + return self.header().focusCloneUrl(root_focus); │ │757 } │ │758 }; │ │759 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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 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 } }); │ │859 + var clone_url = try ui.CopyableText.View.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 } });│ │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 git_remote = self.gitRemote() orelse return; │ │888 - try git_remote.input(allocator, key, root_focus); │ │887 + const clone_url = self.cloneUrl() orelse return; │ │888 + try clone_url.input(allocator, key, root_focus); │ │889 } │ │890 │ │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); │ │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); │ │894 return true; │ │895 } │ │896 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │897 - pub fn hasGitRemote(self: *Header.View) bool { │ │898 - return self.gitRemote() != null; │ │897 + pub fn hasCloneUrl(self: *Header.View) bool { │ │898 + return self.cloneUrl() != null; │ │899 } │ │900 │ │901 - fn gitRemote(self: *Header.View) ?*ui.GitRemote.View { │ │901 + fn cloneUrl(self: *Header.View) ?*ui.CopyableText.View { │ │902 for (self.box.children.values()) |*child| switch (child.widget) {│ │903 - .git_remote => |*git_remote| return git_remote, │ │903 + .copyable_text => |*copyable_text| return copyable_text, │ │904 else => {}, │ │905 }; │ │906 return null; │ ╰──────────────────────────────────────────────────────────────────────────────────╯