╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Roles.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
295 const failure = perform(io, allocator, moment, users_dir, actor, self.data.identity, action, name) catch |err| switch (err) { 296 // a stale row; the refresh below shows the list as it is 297 error.EventNotFound => null, 298 else => return err, 299 }; 300 if (failure) |value| { 301 self.session.data.form_feedback = .{ .repo_roles = .{ .failure = value, .name = try self.session.arena.allocator().dupe(u8, name) } }; 302 return; 303 } 304 try self.session.navigate(landingRoute(self.data.identity, self.data.start, actor, action, name) orelse return error.RouteTooLong); 305 } 306 307 pub fn clearGrid(self: *View) void { 308 self.box.clearGrid(); 309 } 310 311 pub fn getGrid(self: View) ?Grid { 312 return self.box.getGrid(); 313 } 314 315 pub fn getFocus(self: *View) *Focus { 316 return self.box.getFocus(); 317 } 318 319 // up leaves the view from the add row 320 pub fn atTop(self: *View) bool { 321 return self.addActive(); 322 } 323 }; 324