mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Delete my account button
Summary: Adding new "Delete my account" button to the profile page that allows users to remove completely their accounts as long as they don't own any team site. Test Plan: Added Reviewers: georgegevoian, paulfitz Reviewed By: georgegevoian, paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D4037
This commit is contained in:
@@ -168,6 +168,7 @@ export const theme = {
|
||||
lightText: new CustomProp('theme-text-light', undefined, colors.slate),
|
||||
darkText: new CustomProp('theme-text-dark', undefined, 'black'),
|
||||
errorText: new CustomProp('theme-text-error', undefined, colors.error),
|
||||
errorTextHover: new CustomProp('theme-text-error-hover', undefined, '#BF0A31'),
|
||||
dangerText: new CustomProp('theme-text-danger', undefined, '#FFA500'),
|
||||
disabledText: new CustomProp('theme-text-disabled', undefined, colors.slate),
|
||||
|
||||
|
||||
@@ -341,6 +341,8 @@ export interface ConfirmModalOptions {
|
||||
hideCancel?: boolean;
|
||||
extraButtons?: DomContents;
|
||||
modalOptions?: IModalOptions;
|
||||
saveDisabled?: Observable<boolean>;
|
||||
width?: ModalWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,7 +354,7 @@ export function confirmModal(
|
||||
title: DomElementArg,
|
||||
btnText: DomElementArg,
|
||||
onConfirm: () => Promise<void>,
|
||||
{explanation, hideCancel, extraButtons, modalOptions}: ConfirmModalOptions = {},
|
||||
{explanation, hideCancel, extraButtons, modalOptions, saveDisabled, width}: ConfirmModalOptions = {},
|
||||
): void {
|
||||
return saveModal((ctl, owner): ISaveModalOptions => ({
|
||||
title,
|
||||
@@ -360,8 +362,9 @@ export function confirmModal(
|
||||
saveLabel: btnText,
|
||||
saveFunc: onConfirm,
|
||||
hideCancel,
|
||||
width: 'normal',
|
||||
width: width ?? 'normal',
|
||||
extraButtons,
|
||||
saveDisabled,
|
||||
}), modalOptions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user