feat: change email, export my data, delete account (with data anonymization)
This commit is contained in:
1 parent
bb191c389a
commit
10a66cd979
123 files changed
+10789
-76
No files matched your search
@@ -827,6 +827,101 @@ function referenceWithoutGroup(name: string, markdown: string) {
|
||||
return group && board ? [board[0], board[1]!, `"${group}"`] : null
|
||||
}
|
||||
|
||||
const accountBoard = 'RenewCMS Screens Account.dc.html'
|
||||
const authBoard = 'RenewCMS Screens Auth.dc.html'
|
||||
|
||||
function accountScreen(): Screen {
|
||||
const sources: Source[] = [
|
||||
{
|
||||
board: accountBoard,
|
||||
group: 'Change email',
|
||||
states: [
|
||||
'Default',
|
||||
'Form open',
|
||||
'Invalid format',
|
||||
'Same as current',
|
||||
'Password missing',
|
||||
'Wrong password (403)',
|
||||
'Sending',
|
||||
'Pending',
|
||||
'Pending: resending',
|
||||
'Pending: resent',
|
||||
'Pending: resend rate limited (429)',
|
||||
'Cancelled',
|
||||
'Rate limited (429)',
|
||||
'Server or network error',
|
||||
],
|
||||
alias: {},
|
||||
},
|
||||
{
|
||||
board: authBoard,
|
||||
group: 'Verify new email',
|
||||
states: [
|
||||
'Confirming',
|
||||
'Success',
|
||||
'Invalid or expired (403)',
|
||||
'Address unavailable (409)',
|
||||
'No session (401)',
|
||||
'No session, retrying',
|
||||
'Missing code',
|
||||
'Server error',
|
||||
],
|
||||
alias: {},
|
||||
},
|
||||
{
|
||||
board: accountBoard,
|
||||
group: 'Your data',
|
||||
states: [
|
||||
'Direct (recommended): default',
|
||||
'Direct: preparing',
|
||||
'Direct: started',
|
||||
'Direct: rate limited (429)',
|
||||
'Direct: error',
|
||||
'Alternative, emailed link: default',
|
||||
'Alternative: requested',
|
||||
'Alternative: already in progress',
|
||||
'Alternative: error',
|
||||
],
|
||||
alias: {},
|
||||
},
|
||||
{
|
||||
board: accountBoard,
|
||||
group: 'Delete account',
|
||||
states: [
|
||||
'Danger zone',
|
||||
'Confirm: empty',
|
||||
'Confirm: typing',
|
||||
'Confirm: ready',
|
||||
'Delete: Wrong password (403)',
|
||||
'Deleting',
|
||||
'Delete: Rate limited (429)',
|
||||
'Delete: Server error',
|
||||
'Blocked: last administrator',
|
||||
'Blocked: cannot be deleted',
|
||||
],
|
||||
alias: {
|
||||
'Delete: Wrong password (403)': 'Wrong password (403)',
|
||||
'Delete: Rate limited (429)': 'Rate limited (429)',
|
||||
'Delete: Server error': 'Server error',
|
||||
},
|
||||
},
|
||||
{
|
||||
board: authBoard,
|
||||
group: 'Account deleted',
|
||||
states: ['Account deleted'],
|
||||
alias: {},
|
||||
},
|
||||
]
|
||||
const [first] = sources
|
||||
return {
|
||||
name: 'account',
|
||||
board: first!.board,
|
||||
group: first!.group,
|
||||
states: sources.flatMap((source) => source.states),
|
||||
sources,
|
||||
}
|
||||
}
|
||||
|
||||
function rolesScreen(): Screen {
|
||||
const sources = extraSources.roles!
|
||||
const [first] = sources
|
||||
@@ -846,6 +941,9 @@ async function readScreen(name: string): Promise<Screen> {
|
||||
if (name === 'roles') {
|
||||
return rolesScreen()
|
||||
}
|
||||
if (name === 'account') {
|
||||
return accountScreen()
|
||||
}
|
||||
const markdown = await readFile(join(designRoot, 'screens', `${name}.md`), 'utf8')
|
||||
const reference = VISUAL_REFERENCE.exec(markdown) ?? referenceWithoutGroup(name, markdown)
|
||||
if (!reference) {
|
||||
|
||||
Reference in new issue
Block a user