╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ NewUser.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯
160 161 // wipe the form so a return visit starts fresh 162 name_input.clear(allocator); 163 email_input.clear(allocator); 164 password_input.clear(allocator); 165 password_again_input.clear(allocator); 166 167 try self.session.navigate(.{ .user_repos = .{ .name = ui.RoutablePage.Array(evt.User.name_max_len).from(name) orelse return error.RouteTooLong } }); 168 } 169 170 fn formBox(self: *View) *wgt.Box(ui.Widget) { 171 return &self.center.child.box; 172 } 173 174 pub fn clearGrid(self: *View) void { 175 self.center.clearGrid(); 176 } 177 178 pub fn getGrid(self: View) ?Grid { 179 return self.center.getGrid(); 180 } 181 182 pub fn getFocus(self: *View) *Focus { 183 return self.center.getFocus(); 184 } 185 186 // up leaves the form from its first control 187 pub fn atTop(self: View) bool { 188 const box = &self.center.child.box; 189 return box.focus.child_id == box.children.keys()[0]; 190 } 191 }; 192