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