refactor(frontend): title for common modal via titleI18nKey or title prop

This is mainly needed because we use the common modal to show image light boxes and the title is then the title or alt text of the image

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2023-02-19 20:29:05 +01:00
parent f24c46101b
commit 7fb02c96e6
22 changed files with 73 additions and 58 deletions

View file

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
@ -49,7 +49,10 @@ export const MotdModal: React.FC = () => {
}
return (
<CommonModal show={!!lines && !loading && !error && !dismissed} title={'motd.title'} {...cypressId('motd-modal')}>
<CommonModal
show={!!lines && !loading && !error && !dismissed}
titleI18nKey={'motd.title'}
{...cypressId('motd-modal')}>
<Modal.Body className={'bg-light'}>
<EditorToRendererCommunicatorContextProvider>
<RenderIframe