╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │267 } │ │268 │ │269 // events, which a server only shows to whoever it shows undo to │ │270 - if (session.data.host_kind == .local or page.undo != null) { │ │270 + if (page.handle.canWrite()) { │ │271 var text_box = try wgt.TextBox.init(allocator, events_tab_label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none });│ │272 errdefer text_box.deinit(allocator); │ │273 text_box.getFocus().mode = .all; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │88 comments_start: usize, │ │89 // the selected comment and its immediate replies. │ │90 comment_page: ?Comment.Permalink = null, │ │91 -// whether the viewer may reply to comments │ │92 -can_reply: bool = false, │ │91 +// who the page is built for, null when logged out │ │92 +viewer: ?ui.Viewer = null, │ │93 open: Window, │ │94 closed: Window, │ │95 // the conflicted issues' listing; its count also gates the conflicts tab.│ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │210 comments_start: usize, │ │211 theirs_picks: []const u8, │ │212 view: ui.RoutablePage.IssuesView, │ │213 - viewer: ?Comment.Viewer, │ │213 + viewer: ?ui.Viewer, │ │214 ) !Self { │ │215 const empty = try emptyResult(arena.allocator(), identity, label, search, selected_id, comment_id, comments_start, theirs_picks, view);│ │216 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │346 .comment_id = empty.comment_id, │ │347 .comments_start = comments_start,│ │348 .comment_page = comment_page, │ │349 - .can_reply = viewer != null, │ │349 + .viewer = viewer, │ │350 .open = open_window, │ │351 .closed = closed_window, │ │352 .conflicts = conflicts_window, │ ╰──────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────╮ │219 comments_start: usize, │ │220 // the selected comment and its immediate replies.│ │221 comment_page: ?Comment.Permalink = null, │ │222 -// whether the viewer may reply to comments │ │223 -can_reply: bool = false, │ │222 +// who the page is built for, null when logged out│ │223 +viewer: ?ui.Viewer = null, │ │224 open: Window, │ │225 closed: Window, │ │226 merged: Window, │ ╰───────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │567 comments_start: usize, │ │568 theirs_picks: []const u8, │ │569 view: ui.RoutablePage.PatchesView, │ │570 - viewer: ?Comment.Viewer, │ │570 + viewer: ?ui.Viewer, │ │571 ) !Self { │ │572 const allowed_view: ui.RoutablePage.PatchesView = if (session.local != null and view == .drafts) .open else view; │ │573 var empty = try emptyResult(arena.allocator(), identity, label, search, selected_id, comment_id, comments_start, theirs_picks, allowed_view);│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │736 .comment_id = empty.comment_id, │ │737 .comments_start = comments_start,│ │738 .comment_page = comment_page, │ │739 - .can_reply = viewer != null, │ │739 + .viewer = viewer, │ │740 .open = open_window, │ │741 .closed = closed_window, │ │742 .merged = merged_window, │ ╰──────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │973 .label = " merge this patch locally ", │ │974 }, │ │975 }; │ │976 - var copyable_text = try ui.widget.CopyableText.init(allocator, session, &choices); │ │976 + var copyable_text = try ui.widget.CopyableText.init(allocator, session, &choices, 0); │ │977 errdefer copyable_text.deinit(allocator); │ │978 try box.children.put(allocator, copyable_text.getFocus().id, .{ .widget = .{ .copyable_text = copyable_text }, .rect = null, .min_size = null });│ │979 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 995 .label = if (status_kind == .merged) " target branch this patch was merged into " else " target branch this patch will go to ", │ │ 996 }, │ │ 997 }; │ │ 998 - var copyable_text = try ui.widget.CopyableText.init(allocator, session, fields[@intFromBool(entry.revision_oid.len == 0)..]); │ │ 998 + var copyable_text = try ui.widget.CopyableText.init(allocator, session, fields[@intFromBool(entry.revision_oid.len == 0)..], 0); │ │ 999 errdefer copyable_text.deinit(allocator); │ │1000 try box.children.put(allocator, copyable_text.getFocus().id, .{ .widget = .{ .copyable_text = copyable_text }, .rect = null, .min_size = null });│ │1001 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────╮ │src/ui/Repo/Undo.zig│ ╰────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │44 items: []const Item = &.{}, │ │45 next: ?u64 = null, │ │46 failure: ?[]const u8 = null, │ │47 -can_undo: bool = false, │ │47 +handle: ui.RepoHandle, │ │48 // the clear-history confirmation stands in for the list│ │49 clear: bool = false, │ │50 │ ╰────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯