New sticker creator button
This commit is contained in:
parent
85adb39d31
commit
fad0529080
25 changed files with 442 additions and 11 deletions
|
@ -7,6 +7,7 @@ import type {
|
|||
ForwardMessagePropsType,
|
||||
UserNotFoundModalStateType,
|
||||
SafetyNumberChangedBlockingDataType,
|
||||
AuthorizeArtCreatorDataType,
|
||||
} from '../state/ducks/globalModals';
|
||||
import type { LocalizerType, ThemeType } from '../types/Util';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
|
@ -66,6 +67,11 @@ export type PropsType = {
|
|||
// WhatsNewModal
|
||||
isWhatsNewVisible: boolean;
|
||||
hideWhatsNewModal: () => unknown;
|
||||
// AuthArtCreatorModal
|
||||
authArtCreatorData?: AuthorizeArtCreatorDataType;
|
||||
isAuthorizingArtCreator?: boolean;
|
||||
cancelAuthorizeArtCreator: () => unknown;
|
||||
confirmAuthorizeArtCreator: () => unknown;
|
||||
};
|
||||
|
||||
export function GlobalModalContainer({
|
||||
|
@ -110,6 +116,11 @@ export function GlobalModalContainer({
|
|||
// WhatsNewModal
|
||||
hideWhatsNewModal,
|
||||
isWhatsNewVisible,
|
||||
// AuthArtCreatorModal
|
||||
authArtCreatorData,
|
||||
isAuthorizingArtCreator,
|
||||
cancelAuthorizeArtCreator,
|
||||
confirmAuthorizeArtCreator,
|
||||
}: PropsType): JSX.Element | null {
|
||||
// We want the following dialogs to show in this order:
|
||||
// 1. Errors
|
||||
|
@ -200,5 +211,28 @@ export function GlobalModalContainer({
|
|||
);
|
||||
}
|
||||
|
||||
if (authArtCreatorData) {
|
||||
return (
|
||||
<ConfirmationDialog
|
||||
dialogName="GlobalModalContainer.authArtCreator"
|
||||
cancelText={i18n('icu:AuthArtCreator--dialog--dismiss')}
|
||||
cancelButtonVariant={ButtonVariant.Secondary}
|
||||
i18n={i18n}
|
||||
isSpinning={isAuthorizingArtCreator}
|
||||
onClose={cancelAuthorizeArtCreator}
|
||||
actions={[
|
||||
{
|
||||
text: i18n('icu:AuthArtCreator--dialog--confirm'),
|
||||
style: 'affirmative',
|
||||
action: confirmAuthorizeArtCreator,
|
||||
autoClose: false,
|
||||
},
|
||||
]}
|
||||
>
|
||||
{i18n('icu:AuthArtCreator--dialog--message')}
|
||||
</ConfirmationDialog>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue