feat: add private project access

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-08-01 22:54:01 +00:00
1 parent df05b1a968
commit c761282d76
29 files changed
+1197 -29

No files matched your search

+14 -1
View File
@@ -1226,6 +1226,7 @@ export function NewIssueDialog() {
if (nextProjectId) trackRecentProject(nextProjectId);
setProjectId(nextProjectId);
const nextProject = orderedProjects.find((project) => project.id === nextProjectId);
if (nextProject?.visibility === "private") setIsPrivate(true);
executionWorkspaceDefaultProjectId.current = nextProjectId || null;
setProjectWorkspaceId(defaultProjectWorkspaceIdForProject(nextProject));
setExecutionWorkspaceMode(defaultExecutionWorkspaceModeForProject(nextProject));
@@ -1957,7 +1958,19 @@ export function NewIssueDialog() {
</div>
<ToggleSwitch
checked={isPrivate}
onCheckedChange={setIsPrivate}
onCheckedChange={(checked) => {
setIsPrivate(checked);
if (!checked) {
const selectedProject = orderedProjects.find((project) => project.id === projectId);
if (selectedProject?.visibility === "private") handleProjectChange("");
return;
}
if (projectId || !currentUserId) return;
const personalProject = orderedProjects.find(
(project) => project.personalOwnerUserId === currentUserId,
);
if (personalProject) handleProjectChange(personalProject.id);
}}
aria-label="Private task"
/>
</div>