╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Commits.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1057 const clone_url = self.cloneUrl() orelse return; 1058 try clone_url.input(allocator, key, root_focus); 1059 } 1060 1061 pub fn focusCloneUrl(self: *Header.View, root_focus: *Focus) bool { 1062 const clone_url = self.cloneUrl() orelse return false; 1063 root_focus.setFocus(clone_url.getFocus().id); 1064 return true; 1065 } 1066 1067 pub fn hasCloneUrl(self: *Header.View) bool { 1068 return self.cloneUrl() != null; 1069 } 1070 1071 fn cloneUrl(self: *Header.View) ?*ui.CloneUrl.View { 1072 for (self.box.children.values()) |*child| switch (child.widget) { 1073 .clone_url => |*clone_url| return clone_url, 1074 else => {}, 1075 }; 1076 return null; 1077 } 1078 1079 pub fn clearGrid(self: *Header.View) void { 1080 self.box.clearGrid(); 1081 } 1082 1083 pub fn getGrid(self: Header.View) ?Grid { 1084 return self.box.getGrid(); 1085 } 1086 1087 pub fn getFocus(self: *Header.View) *Focus { 1088 return self.box.getFocus(); 1089 } 1090 }; 1091 }; 1092