feat: switch editor and render view buttons (#2154)

This was done in an effort to sync the side of the button with the side of the component in the editor.

fixes #1236

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-07-01 14:10:35 +02:00 committed by GitHub
parent 718994fa25
commit 6c82992c22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
* *
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
@ -31,11 +31,11 @@ export const EditorViewMode: React.FC = () => {
setEditorMode(value) setEditorMode(value)
}}> }}>
<ToggleButton <ToggleButton
{...cypressId('view-mode-preview')} {...cypressId('view-mode-editor')}
value={EditorMode.PREVIEW} value={EditorMode.EDITOR}
variant='outline-secondary' variant='outline-secondary'
title={t('editor.viewMode.view')}> title={t('editor.viewMode.edit')}>
<ForkAwesomeIcon icon='eye' /> <ForkAwesomeIcon icon='pencil' />
</ToggleButton> </ToggleButton>
<ToggleButton <ToggleButton
{...cypressId('view-mode-both')} {...cypressId('view-mode-both')}
@ -45,11 +45,11 @@ export const EditorViewMode: React.FC = () => {
<ForkAwesomeIcon icon='columns' /> <ForkAwesomeIcon icon='columns' />
</ToggleButton> </ToggleButton>
<ToggleButton <ToggleButton
{...cypressId('view-mode-editor')} {...cypressId('view-mode-preview')}
value={EditorMode.EDITOR} value={EditorMode.PREVIEW}
variant='outline-secondary' variant='outline-secondary'
title={t('editor.viewMode.edit')}> title={t('editor.viewMode.view')}>
<ForkAwesomeIcon icon='pencil' /> <ForkAwesomeIcon icon='eye' />
</ToggleButton> </ToggleButton>
</ToggleButtonGroup> </ToggleButtonGroup>
) )