╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────╮ │38 remote: struct { │ │39 admin_repo_path: []const u8,│ │40 session_store: SessionStore,│ │41 + clone_http_port: u16, │ │42 + clone_ssh_port: u16, │ │43 }, │ │44 local: ui.RepoSource, │ │45 }; │ ╰────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────╮ │194 .local => {}, │ │195 } │ │196 │ │197 + const clone_http_port: ?u16, const clone_ssh_port: ?u16 = switch (host) { │ │198 + .remote => |remote| .{ remote.clone_http_port, remote.clone_ssh_port },│ │199 + .local => .{ null, null }, │ │200 + }; │ │201 const html = renderIndexHtml(io, allocator, host, .{ │ │202 .user_id = user_id, │ │203 .login_failure = login_failure, │ ╰────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │204 .current_page = current_page, │ │205 .is_local = host == .local, │ │206 + .clone_http_port = clone_http_port, │ │207 + .clone_ssh_port = clone_ssh_port, │ │208 }) catch |err| switch (err) { │ │209 error.NotFound => { │ │210 try request.respond("not found", .{│ ╰────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1389 │ │1390 try out.appendSlice(allocator, "<input type=\""); │ │1391 try out.appendSlice(allocator, if (root_child.focus.kind == .text_input_password) "password" else "text"); │ │1384 - try out.appendSlice(allocator, "\" data-focus-id=\""); │ │1392 + try out.appendSlice(allocator, if (action_url.len == 0) "\" readonly data-focus-id=\"" else "\" data-focus-id=\"");│ │1393 var id_buf: [32]u8 = undefined; │ │1394 try out.appendSlice(allocator, try std.fmt.bufPrint(&id_buf, "{d}", .{inner_id})); │ │1395 if (ti.options.name.len > 0) { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯