╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ ui.zig ───────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
3377 }, root.getFocus()); 3378 3379 return root; 3380 } 3381 3382 // native and server-side sessions choose from the embedded collection. WASM 3383 // keeps the art serialized by the server instead. 3384 fn chooseAnsiArtForNavigation(session: *Session) void { 3385 if (comptime ansi_art.art.len == 0) return; 3386 if (session.data.current_page == .not_found) { 3387 session.data.ansi_art = ansi_art.not_found; 3388 return; 3389 } 3390 const io = session.io orelse return; 3391 var random: usize = undefined; 3392 io.random(std.mem.asBytes(&random)); 3393 session.data.ansi_art = ansi_art.art[random % ansi_art.art.len]; 3394 } 3395