mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
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:
parent
f24c46101b
commit
7fb02c96e6
22 changed files with 73 additions and 58 deletions
|
@ -15,7 +15,9 @@ exports[`CommonModal render correctly in size lg 1`] = `
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="modal-title h4"
|
class="modal-title h4"
|
||||||
/>
|
>
|
||||||
|
<span />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
testText
|
testText
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,7 +37,9 @@ exports[`CommonModal render correctly in size sm 1`] = `
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="modal-title h4"
|
class="modal-title h4"
|
||||||
/>
|
>
|
||||||
|
<span />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
testText
|
testText
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,7 +59,9 @@ exports[`CommonModal render correctly in size xl 1`] = `
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="modal-title h4"
|
class="modal-title h4"
|
||||||
/>
|
>
|
||||||
|
<span />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
testText
|
testText
|
||||||
</div>
|
</div>
|
||||||
|
@ -75,7 +81,9 @@ exports[`CommonModal render correctly with additionalClasses 1`] = `
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="modal-title h4"
|
class="modal-title h4"
|
||||||
/>
|
>
|
||||||
|
<span />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
testText
|
testText
|
||||||
</div>
|
</div>
|
||||||
|
@ -144,6 +152,7 @@ exports[`CommonModal render correctly with title icon 1`] = `
|
||||||
class="fa fa-heart "
|
class="fa fa-heart "
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<span />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
testText
|
testText
|
||||||
|
@ -164,7 +173,9 @@ exports[`CommonModal renders correctly and calls onHide, when close button is cl
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="modal-title h4"
|
class="modal-title h4"
|
||||||
/>
|
>
|
||||||
|
<span />
|
||||||
|
</div>
|
||||||
<button
|
<button
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
class="btn-close"
|
class="btn-close"
|
||||||
|
|
|
@ -13,7 +13,9 @@ exports[`DeletionModal renders correctly with deletionButtonI18nKey 1`] = `
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="modal-title h4"
|
class="modal-title h4"
|
||||||
/>
|
>
|
||||||
|
<span />
|
||||||
|
</div>
|
||||||
<button
|
<button
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
class="btn-close"
|
class="btn-close"
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ describe('CommonModal', () => {
|
||||||
|
|
||||||
it('render correctly with title', async () => {
|
it('render correctly with title', async () => {
|
||||||
render(
|
render(
|
||||||
<CommonModal show={true} title={'testTitle'}>
|
<CommonModal show={true} titleI18nKey={'testTitle'}>
|
||||||
testText
|
testText
|
||||||
</CommonModal>
|
</CommonModal>
|
||||||
)
|
)
|
||||||
|
@ -55,7 +55,7 @@ describe('CommonModal', () => {
|
||||||
|
|
||||||
it('render correctly with i18nTitle', async () => {
|
it('render correctly with i18nTitle', async () => {
|
||||||
render(
|
render(
|
||||||
<CommonModal show={true} title={'testTitle'} titleIsI18nKey={true}>
|
<CommonModal show={true} titleI18nKey={'testTitle'}>
|
||||||
testText
|
testText
|
||||||
</CommonModal>
|
</CommonModal>
|
||||||
)
|
)
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -20,8 +20,8 @@ export interface ModalVisibilityProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModalContentProps {
|
export interface ModalContentProps {
|
||||||
|
titleI18nKey?: string
|
||||||
title?: string
|
title?: string
|
||||||
titleIsI18nKey?: boolean
|
|
||||||
showCloseButton?: boolean
|
showCloseButton?: boolean
|
||||||
titleIcon?: IconName
|
titleIcon?: IconName
|
||||||
modalSize?: 'lg' | 'sm' | 'xl'
|
modalSize?: 'lg' | 'sm' | 'xl'
|
||||||
|
@ -47,20 +47,20 @@ export type CommonModalProps = PropsWithDataCypressId & ModalVisibilityProps & M
|
||||||
export const CommonModal: React.FC<PropsWithChildren<CommonModalProps>> = ({
|
export const CommonModal: React.FC<PropsWithChildren<CommonModalProps>> = ({
|
||||||
show,
|
show,
|
||||||
onHide,
|
onHide,
|
||||||
|
titleI18nKey,
|
||||||
title,
|
title,
|
||||||
showCloseButton,
|
showCloseButton,
|
||||||
titleIcon,
|
titleIcon,
|
||||||
additionalClasses,
|
additionalClasses,
|
||||||
modalSize,
|
modalSize,
|
||||||
children,
|
children,
|
||||||
titleIsI18nKey = true,
|
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
useTranslation()
|
useTranslation()
|
||||||
|
|
||||||
const titleElement = useMemo(() => {
|
const titleElement = useMemo(() => {
|
||||||
return titleIsI18nKey ? <Trans i18nKey={title} /> : <span>{title}</span>
|
return titleI18nKey !== undefined ? <Trans i18nKey={titleI18nKey} /> : <span>{title}</span>
|
||||||
}, [title, titleIsI18nKey])
|
}, [titleI18nKey, title])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ShowIf condition={show}>
|
<ShowIf condition={show}>
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ export interface DeletionModalProps extends CommonModalProps {
|
||||||
export const DeletionModal: React.FC<PropsWithChildren<DeletionModalProps>> = ({
|
export const DeletionModal: React.FC<PropsWithChildren<DeletionModalProps>> = ({
|
||||||
show,
|
show,
|
||||||
onHide,
|
onHide,
|
||||||
title,
|
titleI18nKey,
|
||||||
onConfirm,
|
onConfirm,
|
||||||
deletionButtonI18nKey,
|
deletionButtonI18nKey,
|
||||||
titleIcon,
|
titleIcon,
|
||||||
|
@ -42,7 +42,13 @@ export const DeletionModal: React.FC<PropsWithChildren<DeletionModalProps>> = ({
|
||||||
useTranslation()
|
useTranslation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CommonModal show={show} onHide={onHide} title={title} titleIcon={titleIcon} showCloseButton={true} {...props}>
|
<CommonModal
|
||||||
|
show={show}
|
||||||
|
onHide={onHide}
|
||||||
|
titleI18nKey={titleI18nKey}
|
||||||
|
titleIcon={titleIcon}
|
||||||
|
showCloseButton={true}
|
||||||
|
{...props}>
|
||||||
<Modal.Body className='text-dark'>{children}</Modal.Body>
|
<Modal.Body className='text-dark'>{children}</Modal.Body>
|
||||||
<Modal.Footer>
|
<Modal.Footer>
|
||||||
<Button {...cypressId('deletionModal.confirmButton')} variant='danger' onClick={onConfirm}>
|
<Button {...cypressId('deletionModal.confirmButton')} variant='danger' onClick={onConfirm}>
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -49,7 +49,10 @@ export const MotdModal: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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'}>
|
<Modal.Body className={'bg-light'}>
|
||||||
<EditorToRendererCommunicatorContextProvider>
|
<EditorToRendererCommunicatorContextProvider>
|
||||||
<RenderIframe
|
<RenderIframe
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -47,13 +47,7 @@ export const HelpModal: React.FC<ModalVisibilityProps> = ({ show, onHide }) => {
|
||||||
const modalTitle = useMemo(() => t('editor.documentBar.help') + ' - ' + t(`editor.help.${tab}`), [t, tab])
|
const modalTitle = useMemo(() => t('editor.documentBar.help') + ' - ' + t(`editor.help.${tab}`), [t, tab])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CommonModal
|
<CommonModal modalSize={'lg'} titleIcon={'question-circle'} show={show} onHide={onHide} title={modalTitle}>
|
||||||
modalSize={'lg'}
|
|
||||||
titleIcon={'question-circle'}
|
|
||||||
show={show}
|
|
||||||
onHide={onHide}
|
|
||||||
title={modalTitle}
|
|
||||||
titleIsI18nKey={false}>
|
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<nav className='nav nav-tabs'>
|
<nav className='nav nav-tabs'>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +21,7 @@ export const AliasesModal: React.FC<CommonModalProps> = ({ show, onHide }) => {
|
||||||
useTranslation()
|
useTranslation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CommonModal show={show} onHide={onHide} title={'editor.modal.aliases.title'} showCloseButton={true}>
|
<CommonModal show={show} onHide={onHide} titleI18nKey={'editor.modal.aliases.title'} showCloseButton={true}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<p>
|
<p>
|
||||||
<Trans i18nKey={'editor.modal.aliases.explanation'} />
|
<Trans i18nKey={'editor.modal.aliases.explanation'} />
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -28,7 +28,7 @@ export const NoteInfoModal: React.FC<ModalVisibilityProps> = ({ show, onHide })
|
||||||
show={show}
|
show={show}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
title={'editor.modal.documentInfo.title'}
|
titleI18nKey={'editor.modal.documentInfo.title'}
|
||||||
{...cypressId('document-info-modal')}>
|
{...cypressId('document-info-modal')}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<ListGroup>
|
<ListGroup>
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@ import { Modal } from 'react-bootstrap'
|
||||||
*/
|
*/
|
||||||
export const PermissionModal: React.FC<ModalVisibilityProps> = ({ show, onHide }) => {
|
export const PermissionModal: React.FC<ModalVisibilityProps> = ({ show, onHide }) => {
|
||||||
return (
|
return (
|
||||||
<CommonModal show={show} onHide={onHide} showCloseButton={true} title={'editor.modal.permissions.title'}>
|
<CommonModal show={show} onHide={onHide} showCloseButton={true} titleI18nKey={'editor.modal.permissions.title'}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<PermissionSectionOwner />
|
<PermissionSectionOwner />
|
||||||
<PermissionSectionUsers />
|
<PermissionSectionUsers />
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@ export const RevisionModal: React.FC<ModalVisibilityProps> = ({ show, onHide })
|
||||||
<CommonModal
|
<CommonModal
|
||||||
show={show}
|
show={show}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
title={'editor.modal.revision.title'}
|
titleI18nKey={'editor.modal.revision.title'}
|
||||||
titleIcon={'history'}
|
titleIcon={'history'}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
modalSize={'xl'}
|
modalSize={'xl'}
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@ export const ShareModal: React.FC<ModalVisibilityProps> = ({ show, onHide }) =>
|
||||||
const noteIdentifier = useApplicationState((state) => state.noteDetails.primaryAddress)
|
const noteIdentifier = useApplicationState((state) => state.noteDetails.primaryAddress)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CommonModal show={show} onHide={onHide} showCloseButton={true} title={'editor.modal.shareLink.title'}>
|
<CommonModal show={show} onHide={onHide} showCloseButton={true} titleI18nKey={'editor.modal.shareLink.title'}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Trans i18nKey={'editor.modal.shareLink.editorDescription'} />
|
<Trans i18nKey={'editor.modal.shareLink.editorDescription'} />
|
||||||
<CopyableField content={`${baseUrl}n/${noteIdentifier}`} shareOriginUrl={`${baseUrl}n/${noteIdentifier}`} />
|
<CopyableField content={`${baseUrl}n/${noteIdentifier}`} shareOriginUrl={`${baseUrl}n/${noteIdentifier}`} />
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -26,7 +26,7 @@ export const MaxLengthWarningModal: React.FC<ModalVisibilityProps> = ({ show, on
|
||||||
{...cypressId('limitReachedModal')}
|
{...cypressId('limitReachedModal')}
|
||||||
show={show}
|
show={show}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
title={'editor.error.limitReached.title'}
|
titleI18nKey={'editor.error.limitReached.title'}
|
||||||
showCloseButton={true}>
|
showCloseButton={true}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Trans i18nKey={'editor.error.limitReached.description'} values={{ maxDocumentLength }} />
|
<Trans i18nKey={'editor.error.limitReached.description'} values={{ maxDocumentLength }} />
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -65,7 +65,7 @@ export const CustomTableSizeModal: React.FC<CustomTableSizeModalProps> = ({ show
|
||||||
<CommonModal
|
<CommonModal
|
||||||
show={showModal}
|
show={showModal}
|
||||||
onHide={onDismiss}
|
onHide={onDismiss}
|
||||||
title={'editor.editorToolbar.table.customSize'}
|
titleI18nKey={'editor.editorToolbar.table.customSize'}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
titleIcon={'table'}
|
titleIcon={'table'}
|
||||||
{...cypressId('custom-table-size-modal')}>
|
{...cypressId('custom-table-size-modal')}>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -53,7 +53,7 @@ export const DeleteNoteModal: React.FC<DeleteNoteModalProps & DeleteHistoryNoteM
|
||||||
deletionButtonI18nKey={modalButtonI18nKey ?? 'editor.modal.deleteNote.button'}
|
deletionButtonI18nKey={modalButtonI18nKey ?? 'editor.modal.deleteNote.button'}
|
||||||
show={show}
|
show={show}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
title={modalTitleI18nKey ?? 'editor.modal.deleteNote.title'}>
|
titleI18nKey={modalTitleI18nKey ?? 'editor.modal.deleteNote.title'}>
|
||||||
<h5>
|
<h5>
|
||||||
<Trans i18nKey={modalQuestionI18nKey ?? 'editor.modal.deleteNote.question'} />
|
<Trans i18nKey={modalQuestionI18nKey ?? 'editor.modal.deleteNote.question'} />
|
||||||
</h5>
|
</h5>
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +46,7 @@ export const ClearHistoryButton: React.FC = () => {
|
||||||
deletionButtonI18nKey={'landing.history.toolbar.clear'}
|
deletionButtonI18nKey={'landing.history.toolbar.clear'}
|
||||||
show={modalVisibility}
|
show={modalVisibility}
|
||||||
onHide={closeModal}
|
onHide={closeModal}
|
||||||
title={'landing.history.modal.clearHistory.title'}>
|
titleI18nKey={'landing.history.modal.clearHistory.title'}>
|
||||||
<h5>
|
<h5>
|
||||||
<Trans i18nKey={'landing.history.modal.clearHistory.question'} />
|
<Trans i18nKey={'landing.history.modal.clearHistory.question'} />
|
||||||
</h5>
|
</h5>
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,7 @@ export const VersionInfoModal: React.FC<CommonModalProps> = ({ onHide, show }) =
|
||||||
show={show}
|
show={show}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
title={'landing.versionInfo.title'}>
|
titleI18nKey={'landing.versionInfo.title'}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Row>
|
<Row>
|
||||||
<VersionInfoModalColumn
|
<VersionInfoModalColumn
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,7 @@ export const SettingsModal: React.FC<CommonModalProps> = ({ show, onHide }) => {
|
||||||
modalSize={'lg'}
|
modalSize={'lg'}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
titleIcon={'cog'}
|
titleIcon={'cog'}
|
||||||
title={'settings.title'}
|
titleI18nKey={'settings.title'}
|
||||||
showCloseButton={true}>
|
showCloseButton={true}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Tabs navbar={false} variant={'pills'} defaultActiveKey={'global'}>
|
<Tabs navbar={false} variant={'pills'} defaultActiveKey={'global'}>
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -32,8 +32,7 @@ export const ImageLightboxModal: React.FC<ImageLightboxModalProps> = ({ show, on
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
additionalClasses={styles.lightbox}
|
additionalClasses={styles.lightbox}
|
||||||
title={alt ?? title ?? ''}
|
title={title ?? alt ?? ''}>
|
||||||
titleIsI18nKey={false}>
|
|
||||||
<ProxyImageFrame alt={alt} src={src} title={title} className={'w-100 cursor-zoom-out'} onClick={onHide} />
|
<ProxyImageFrame alt={alt} src={src} title={title} className={'w-100 cursor-zoom-out'} onClick={onHide} />
|
||||||
</CommonModal>
|
</CommonModal>
|
||||||
)
|
)
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ export const AccessTokenCreatedModal: React.FC<AccessTokenCreatedModalProps> = (
|
||||||
<CommonModal
|
<CommonModal
|
||||||
show={show}
|
show={show}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
title='profile.modal.addedAccessToken.title'
|
titleI18nKey='profile.modal.addedAccessToken.title'
|
||||||
{...cypressId('access-token-modal-add')}>
|
{...cypressId('access-token-modal-add')}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Trans
|
<Trans
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -49,7 +49,7 @@ export const AccessTokenDeletionModal: React.FC<AccessTokenDeletionModalProps> =
|
||||||
<CommonModal
|
<CommonModal
|
||||||
show={show}
|
show={show}
|
||||||
onHide={onHide}
|
onHide={onHide}
|
||||||
title={'profile.modal.deleteAccessToken.title'}
|
titleI18nKey={'profile.modal.deleteAccessToken.title'}
|
||||||
{...cypressId('access-token-modal-delete')}>
|
{...cypressId('access-token-modal-delete')}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Trans i18nKey='profile.modal.deleteAccessToken.message' values={{ label: token.label }} />
|
<Trans i18nKey='profile.modal.deleteAccessToken.message' values={{ label: token.label }} />
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -42,7 +42,7 @@ export const AccountDeletionModal: React.FC<ModalVisibilityProps> = ({ show, onH
|
||||||
}, [dispatchUiNotification, onHide, showErrorNotification])
|
}, [dispatchUiNotification, onHide, showErrorNotification])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CommonModal show={show} title={'profile.modal.deleteUser.message'} onHide={onHide} showCloseButton={true}>
|
<CommonModal show={show} titleI18nKey={'profile.modal.deleteUser.message'} onHide={onHide} showCloseButton={true}>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Trans i18nKey='profile.modal.deleteUser.subMessage' />
|
<Trans i18nKey='profile.modal.deleteUser.subMessage' />
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue