╭ changed ───────────────╮ │src/ui/Repo/Settings.zig│ ╰────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │221 if (comptime wasm) return; │ │222 const io = self.session.io orelse return; │ │223 const users_dir = self.session.users_dir orelse return; │ │144 - const actor = (try self.session.authorize(self.data.identity, .owner)) orelse return; │ │224 + const actor = (try self.session.authorize(self.data.identity, .owner, null)) orelse return;│ │225 │ │226 const name = try (try formField(self.formBox(), "name")).text(allocator); │ │227 defer allocator.free(name); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │228 const description = try (try formField(self.formBox(), "description")).text(allocator); │ │229 defer allocator.free(description); │ │150 - const access_radio = &self.formBox().children.values()[access_index].widget.radio; │ │151 - const access = std.meta.stringToEnum(evt.Repo.Access, access_radio.selected()) orelse unreachable; │ │230 + const access = std.meta.stringToEnum(evt.Repo.Access, (try formRadio(self.formBox(), "access")).selected()) orelse unreachable; │ │231 + const discuss_role = labelRole((try formRadio(self.formBox(), "discuss_role")).selected()) catch unreachable; │ │232 + const issue_role = labelRole((try formRadio(self.formBox(), "issue_role")).selected()) catch unreachable; │ │233 + const patch_role = labelRole((try formRadio(self.formBox(), "patch_role")).selected()) catch unreachable; │ │234 │ │153 - const route = update(io, allocator, users_dir, actor, self.data.identity, name, description, access) catch |err| { │ │235 + const route = update(io, allocator, users_dir, actor, self.data.identity, name, description, access, discuss_role, issue_role, patch_role) catch |err| {│ │236 const failure = ui.Session.FormFeedback.RepoFailure.fromError(err) orelse return err; │ │237 const aa = self.session.arena.allocator(); │ │238 self.session.data.form_feedback = .{ .repo_settings = .{ .failure = failure, .fields = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────╮ │239 .name = try aa.dupe(u8, name), │ │240 .description = try aa.dupe(u8, description),│ │241 .access = access, │ │242 + .discuss_role = discuss_role, │ │243 + .issue_role = issue_role, │ │244 + .patch_role = patch_role, │ │245 } } }; │ │246 return; │ │247 }; │ ╰─────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────╮ │249 } │ │250 │ │251 fn formBox(self: *View) *wgt.Box(ui.Widget) { │ │167 - return &self.center.child.box; │ │252 + return &self.scroll.child.center.child.box;│ │253 } │ │254 │ │255 pub fn clearGrid(self: *View) void { │ ╰────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────╮ │171 - self.center.clearGrid(); │ │256 + self.scroll.clearGrid(); │ │257 } │ │258 │ │259 pub fn getGrid(self: View) ?Grid {│ ╰───────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │175 - return self.center.getGrid(); │ │260 + return self.scroll.getGrid(); │ │261 } │ │262 │ │263 pub fn getFocus(self: *View) *Focus {│ ╰──────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────╮ │179 - return self.center.getFocus(); │ │264 + return self.scroll.getFocus(); │ │265 } │ │266 │ │267 // up leaves the form from its first control│ ╰─────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────╮ │268 pub fn atTop(self: View) bool { │ │184 - const box = &self.center.child.box; │ │269 + const box = &self.scroll.child.center.child.box; │ │270 return box.focus.child_id == box.children.keys()[0];│ │271 } │ │272 }; │ ╰─────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │282 name: []const u8, │ │283 description: []const u8, │ │284 access: evt.Repo.Access, │ │285 + discuss_role: ?evt.Repo.Role, │ │286 + issue_role: ?evt.Repo.Role, │ │287 + patch_role: ?evt.Repo.Role, │ │288 ) !ui.RoutablePage { │ │289 const parsed = ui.RoutablePage.RepoIdentity.parse(identity) orelse return error.NotFound;│ │290 const owner_id = actor.repo_user_id orelse return error.NotFound; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │203 - try evt.updateRepo(io, allocator, users_dir, &owner_id, actor.author, parsed.name, name, description, access); │ │291 + try evt.updateRepo(io, allocator, users_dir, &owner_id, actor.author, parsed.name, name, description, access, discuss_role, issue_role, patch_role);│ │292 var buf: [ui.RoutablePage.repo_route_max_len]u8 = undefined; │ │293 const new_identity = std.fmt.bufPrint(&buf, "{s}:{s}", .{ parsed.owner, name }) catch return error.RouteTooLong; │ │294 return ui.RoutablePage.repoRepoRoute(new_identity) orelse error.RouteTooLong; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯