╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────╮ │101 │ │102 pub const RefKind = enum { branch, tag }; │ │103 │ │104 - pub const IssuesView = enum { open, closed, tags }; │ │104 + pub const IssuesView = enum { open, closed, tags, new };│ │105 │ │106 pub const RefOrOid = enum { │ │107 branch, │ ╰─────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │308 } }; │ │309 } │ │310 │ │311 - // build a `.repo_issues` route showing "owner/name" (identity)'s tags view, │ │312 - // keeping the url-encoded `tag` filter ("" = unfiltered). │ │311 + // build a `.repo_issues` route showing tags view, keeping the url-encoded │ │312 + // `tag` filter ("" = unfiltered). │ │313 pub fn repoIssuesTagsRoute(identity: []const u8, tag: []const u8) ?RoutablePage {│ │314 return .{ .repo_issues = .{ │ │315 .name = Array(repo_route_max_len).from(identity) orelse return null, │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │318 } }; │ │319 } │ │320 │ │321 + // build a `.repo_issues` route showing new-issue form. │ │322 + pub fn repoIssuesNewRoute(identity: []const u8) ?RoutablePage { │ │323 + return .{ .repo_issues = .{ │ │324 + .name = Array(repo_route_max_len).from(identity) orelse return null, │ │325 + .view = .new, │ │326 + } }; │ │327 + } │ │328 + │ │329 // an inline, owned array of data. keeping it in the route (rather than a │ │330 // borrowed slice) makes RoutablePage a plain value: it can be copied, stored│ │331 // in history, and serialized without any arena tracking. │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │513 const w = word orelse return if (tag_value.len == 0) repoIssuesRoute(pair, .open, "", "") else null; │ │514 if (std.meta.stringToEnum(evt.Issue.Status, w)) |status| return repoIssuesRoute(pair, status, tag_value, "");│ │515 if (std.mem.eql(u8, w, "tags")) return repoIssuesTagsRoute(pair, tag_value); │ │516 + if (std.mem.eql(u8, w, "new")) return if (tag_value.len == 0) repoIssuesNewRoute(pair) else null; │ │517 return repoIssuesRoute(pair, .open, tag_value, w); │ │518 } │ │519 if (std.mem.eql(u8, tab, files_seg)) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯