Show invited people the Rule, let them copy its cards for their community, and replace an expired invitation link.
This commit is contained in:
1 parent
727a92a9ac
commit
3c984e00c5
37 files changed
+1962
-19
No files matched your search
@@ -62,6 +62,10 @@ import {
|
||||
} from "../../../lib/create/publishedDocumentToCreateFlowState";
|
||||
import { METHOD_FACET_API_SECTION_IDS } from "../../../lib/create/customRuleFacets";
|
||||
import { readLastPublishedRule } from "../../../lib/create/lastPublishedRule";
|
||||
import {
|
||||
CREATE_FLOW_COPIED_QUERY,
|
||||
CREATE_FLOW_COPIED_VALUE,
|
||||
} from "../../../lib/create/invitePaths";
|
||||
import {
|
||||
clearPendingKeepRuleLogin,
|
||||
hasPendingKeepRuleLogin,
|
||||
@@ -220,6 +224,7 @@ function CreateFlowLayoutContent({
|
||||
const [leaveConfirmOpen, setLeaveConfirmOpen] = useState(false);
|
||||
const [completedHasPublishedRule, setCompletedHasPublishedRule] =
|
||||
useState(false);
|
||||
const [completedCopiedReady, setCompletedCopiedReady] = useState(false);
|
||||
type LeaveConfirmChoice = "leave" | "save" | "cancel";
|
||||
const leaveConfirmResolverRef = useRef<
|
||||
((choice: LeaveConfirmChoice) => void) | null
|
||||
@@ -548,9 +553,12 @@ function CreateFlowLayoutContent({
|
||||
if (currentStep !== "completed") {
|
||||
setCompletedFlowBanner(null);
|
||||
setCompletedHasPublishedRule(false);
|
||||
setCompletedCopiedReady(false);
|
||||
return;
|
||||
}
|
||||
setCompletedHasPublishedRule(Boolean(readLastPublishedRule()));
|
||||
const last = readLastPublishedRule();
|
||||
setCompletedHasPublishedRule(Boolean(last));
|
||||
setCompletedCopiedReady(Boolean(last?.copiedFromTitle));
|
||||
}, [currentStep]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -913,7 +921,13 @@ function CreateFlowLayoutContent({
|
||||
onExit={(opts) => void handleExit(opts)}
|
||||
buttonPalette={isCompletedStep ? "inverse" : undefined}
|
||||
className={`relative z-[210] shrink-0 ${
|
||||
isCompletedStep ? "!bg-[var(--color-teal-teal50,#c9fef9)]" : ""
|
||||
isCompletedStep
|
||||
? completedCopiedReady ||
|
||||
searchParams.get(CREATE_FLOW_COPIED_QUERY) ===
|
||||
CREATE_FLOW_COPIED_VALUE
|
||||
? "!bg-[var(--color-lavender-lavender150,#d1bdf3)]"
|
||||
: "!bg-[var(--color-teal-teal50,#c9fef9)]"
|
||||
: ""
|
||||
}`.trim()}
|
||||
/>
|
||||
{currentStep === "community-save" ? (
|
||||
|
||||
Reference in new issue
Block a user