Rebuild Share and Delete Account from the privacy designs.
Share asks the person who holds the pen to confirm their community agreed before a link turns on, and deleting an account lists each owned Rule with PDF and RULE.md export. Case-study Share copies the page link instead of opening the privacy modal, and the sign-in banner stays below the header so Share remains clickable.
This commit is contained in:
1 parent
5cbda35e32
commit
b6795c1f18
28 files changed
+1467
-377
No files matched your search
@@ -9,6 +9,7 @@ import type { ListItem, ListSize } from "../../../components/layout/List";
|
||||
import ListEntry from "../../../components/layout/ListEntry";
|
||||
import Icon from "../../../components/asset/icon";
|
||||
import Dialog from "../../../components/modals/Dialog";
|
||||
import DeleteAccount from "../../../components/modals/DeleteAccount";
|
||||
import Alert from "../../../components/modals/Alert";
|
||||
import HeaderLockup from "../../../components/type/HeaderLockup";
|
||||
import { useTranslation } from "../../../contexts/MessagesContext";
|
||||
@@ -71,6 +72,8 @@ export type ProfilePageViewProps = {
|
||||
onOpenDeleteAccount: () => void;
|
||||
onCloseDeleteAccount: () => void;
|
||||
onConfirmDeleteAccount: () => void;
|
||||
onExportRulePdf: (id: string) => void;
|
||||
onExportRuleMarkdown: (id: string) => void;
|
||||
onDismissProfileSuccess: () => void;
|
||||
onDismissActionError: () => void;
|
||||
onDismissRulesError: () => void;
|
||||
@@ -194,6 +197,8 @@ export function ProfilePageView({
|
||||
onOpenDeleteAccount,
|
||||
onCloseDeleteAccount,
|
||||
onConfirmDeleteAccount,
|
||||
onExportRulePdf,
|
||||
onExportRuleMarkdown,
|
||||
onDismissProfileSuccess,
|
||||
onDismissActionError,
|
||||
onDismissRulesError,
|
||||
@@ -489,39 +494,18 @@ export function ProfilePageView({
|
||||
}
|
||||
/>
|
||||
|
||||
<Dialog
|
||||
<DeleteAccount
|
||||
isOpen={accountDeleteOpen}
|
||||
onClose={() => {
|
||||
if (!accountDeleteBusy) onCloseDeleteAccount();
|
||||
}}
|
||||
backdropVariant="blurredYellow"
|
||||
title={t("deleteAccountModalTitle")}
|
||||
description={t("deleteAccountModalBody")}
|
||||
footer={
|
||||
<>
|
||||
<Button
|
||||
type="button"
|
||||
size="medium"
|
||||
buttonType="outline"
|
||||
palette="default"
|
||||
onClick={onCloseDeleteAccount}
|
||||
disabled={accountDeleteBusy}
|
||||
>
|
||||
{t("deleteAccountCancel")}
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
size="medium"
|
||||
buttonType="outline"
|
||||
danger
|
||||
palette="default"
|
||||
onClick={onConfirmDeleteAccount}
|
||||
disabled={accountDeleteBusy}
|
||||
>
|
||||
{t("deleteAccountConfirm")}
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
onConfirm={onConfirmDeleteAccount}
|
||||
busy={accountDeleteBusy}
|
||||
rules={rules
|
||||
.filter((rule) => rule.role === "owner")
|
||||
.map((rule) => ({ id: rule.id, title: rule.title }))}
|
||||
onExportPdf={onExportRulePdf}
|
||||
onExportMarkdown={onExportRuleMarkdown}
|
||||
/>
|
||||
|
||||
<Dialog
|
||||
|
||||
Reference in new issue
Block a user