╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ NewRepo.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
151 .access = access, 152 } } }; 153 return; 154 }; 155 156 // wipe the form so a return visit starts fresh 157 name_input.clear(allocator); 158 description_input.clear(allocator); 159 160 const identity = try std.fmt.allocPrint(self.session.page_arena.allocator(), "{s}/{s}", .{ user.event.name, name }); 161 try self.session.navigate(ui.RoutablePage.repoFilesRoute(identity, null, "", "", 0) orelse return); 162 } 163 164 fn formBox(self: *View) *wgt.Box(ui.Widget) { 165 return &self.center.child.box; 166 } 167 168 pub fn clearGrid(self: *View) void { 169 self.center.clearGrid(); 170 } 171 172 pub fn getGrid(self: View) ?Grid { 173 return self.center.getGrid(); 174 } 175 176 pub fn getFocus(self: *View) *Focus { 177 return self.center.getFocus(); 178 } 179 180 // up leaves the form from its first control 181 pub fn atTop(self: View) bool { 182 const box = &self.center.child.box; 183 return box.focus.child_id == box.children.keys()[0]; 184 } 185 }; 186