feat: let guests publish a CommunityRule and claim it on this browser later
Finalize no longer requires a magic link. Guest rows stay off the catalog until sign-in on the same browser attaches ownership, and the login modal kebab no longer acts as a second close. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -191,7 +191,7 @@ function CreateFlowLayoutContent({
|
||||
useState(false);
|
||||
const [completedFlowBanner, setCompletedFlowBanner] = useState<{
|
||||
key: string;
|
||||
status: "positive" | "danger";
|
||||
status: "positive" | "danger" | "warning";
|
||||
title: string;
|
||||
description?: string;
|
||||
} | null>(null);
|
||||
@@ -257,6 +257,25 @@ function CreateFlowLayoutContent({
|
||||
openLogin,
|
||||
updateState,
|
||||
loginReturnPath,
|
||||
sessionUser,
|
||||
onGuestPublished: ({ skippedInvites }) => {
|
||||
const completedCopy = create.reviewAndComplete.completed;
|
||||
if (skippedInvites) {
|
||||
setCompletedFlowBanner({
|
||||
key: "guestInvitesSkipped",
|
||||
status: "warning",
|
||||
title: completedCopy.guestInvitesSkippedTitle,
|
||||
description: completedCopy.guestInvitesSkippedDescription,
|
||||
});
|
||||
return;
|
||||
}
|
||||
setCompletedFlowBanner({
|
||||
key: "guestClaimHint",
|
||||
status: "warning",
|
||||
title: completedCopy.guestClaimHintTitle,
|
||||
description: completedCopy.guestClaimHintDescription,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const {
|
||||
@@ -518,7 +537,7 @@ function CreateFlowLayoutContent({
|
||||
*/
|
||||
const topBanners: Array<{
|
||||
key: string;
|
||||
status: "danger" | "positive";
|
||||
status: "danger" | "positive" | "warning";
|
||||
title: string;
|
||||
description?: string;
|
||||
onClose: () => void;
|
||||
@@ -655,7 +674,7 @@ function CreateFlowLayoutContent({
|
||||
<CreateFlowTopNav
|
||||
hasShare={isCompletedStep}
|
||||
hasExport={isCompletedStep}
|
||||
hasEdit={isCompletedStep}
|
||||
hasEdit={isCompletedStep && Boolean(sessionUser)}
|
||||
hasManageStakeholders={isEditRuleStep}
|
||||
saveDraftOnExit={saveDraftOnExit}
|
||||
onShare={
|
||||
@@ -882,7 +901,9 @@ function CreateFlowLayoutContent({
|
||||
buttonType="filled"
|
||||
palette="default"
|
||||
size="xsmall"
|
||||
disabled={isPublishing}
|
||||
disabled={
|
||||
isPublishing || (isFinalReviewLike && !sessionResolved)
|
||||
}
|
||||
className={CREATE_FLOW_FOOTER_BUTTON_CLASS}
|
||||
onClick={() => {
|
||||
if (isFinalReviewLike) {
|
||||
|
||||
Reference in New Issue
Block a user