Show What's New dialog in app via Help -> Go to release notes
This commit is contained in:
parent
3e38a4b761
commit
191bfee18c
14 changed files with 249 additions and 142 deletions
|
@ -1,9 +1,14 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
import { ContactModalStateType } from '../state/ducks/globalModals';
|
||||
import { LocalizerType } from '../types/Util';
|
||||
|
||||
import { WhatsNewModal } from './WhatsNewModal';
|
||||
|
||||
type PropsType = {
|
||||
i18n: LocalizerType;
|
||||
// ContactModal
|
||||
contactModalState?: ContactModalStateType;
|
||||
renderContactModal: () => JSX.Element;
|
||||
|
@ -13,9 +18,13 @@ type PropsType = {
|
|||
// SafetyNumberModal
|
||||
safetyNumberModalContactId?: string;
|
||||
renderSafetyNumber: () => JSX.Element;
|
||||
// WhatsNewModal
|
||||
isWhatsNewVisible: boolean;
|
||||
hideWhatsNewModal: () => unknown;
|
||||
};
|
||||
|
||||
export const GlobalModalContainer = ({
|
||||
i18n,
|
||||
// ContactModal
|
||||
contactModalState,
|
||||
renderContactModal,
|
||||
|
@ -25,6 +34,9 @@ export const GlobalModalContainer = ({
|
|||
// SafetyNumberModal
|
||||
safetyNumberModalContactId,
|
||||
renderSafetyNumber,
|
||||
// WhatsNewModal
|
||||
hideWhatsNewModal,
|
||||
isWhatsNewVisible,
|
||||
}: PropsType): JSX.Element | null => {
|
||||
if (safetyNumberModalContactId) {
|
||||
return renderSafetyNumber();
|
||||
|
@ -38,5 +50,9 @@ export const GlobalModalContainer = ({
|
|||
return renderProfileEditor();
|
||||
}
|
||||
|
||||
if (isWhatsNewVisible) {
|
||||
return <WhatsNewModal hideWhatsNewModal={hideWhatsNewModal} i18n={i18n} />;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue