╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ UserKeys.zig ─────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
243 const fingerprint = evt.User.fingerprintOfKey(key) orelse unreachable; 244 evt.removeUserKey(io, allocator, users_dir, admin_repo, &user_id, &fingerprint) catch |err| switch (err) { 245 // the account was removed under them 246 error.NotFound => return ui.UserNotifications.logOut(self.session), 247 else => return err, 248 }; 249 self.session.haxy_moment = try evt.currentMoment(evt.admin_repo_opts, admin_repo); 250 try self.session.navigate(self.session.data.current_page.withUserTab(.{ .view = .keys })); 251 } 252 253 pub fn clearGrid(self: *View) void { 254 self.scroll.clearGrid(); 255 } 256 257 pub fn getGrid(self: View) ?Grid { 258 return self.scroll.getGrid(); 259 } 260 261 pub fn getFocus(self: *View) *Focus { 262 return self.scroll.getFocus(); 263 } 264 265 // up leaves the view from the add row or the confirmation 266 pub fn atTop(self: *View) bool { 267 return self.data.confirm != null or self.addActive(); 268 } 269 }; 270