fix(readOnly): untangle edit button from toc button
Docker / build-and-push (backend) (push) Has been cancelled
Docker / build-and-push (frontend) (push) Has been cancelled
E2E Tests / backend-sqlite (push) Has been cancelled
E2E Tests / backend-mariadb (push) Has been cancelled
E2E Tests / backend-postgres (push) Has been cancelled
Lint and check format / Lint files and check formatting (push) Has been cancelled
REUSE Compliance Check / reuse (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Static Analysis / Njsscan code scanning (push) Has been cancelled
Static Analysis / CodeQL analysis (javascript) (push) Has been cancelled
Run tests & build / Test and build with NodeJS 24 (push) Has been cancelled

Fixes #6485

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares
2026-04-30 00:40:43 +02:00
committed by Erik Michelson
parent 473fac6885
commit 1eb9ee2385
2 changed files with 17 additions and 3 deletions
@@ -6,9 +6,14 @@
.fullscreen-button {
position: fixed;
right: 4rem;
bottom: 1rem;
z-index: 900;
&.editor {
right: 4rem;
}
&.readonly {
right: 1.5rem;
}
}
@media print {
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import styles from './fullscreen-button.module.scss'
import styles from './fullscreen-button.module.css'
import React from 'react'
import {
ArrowsFullscreen as IconArrowsFullscreen,
@@ -18,6 +18,7 @@ import { useNoteLinks } from '../../../hooks/common/use-note-links'
import { useApplicationState } from '../../../hooks/common/use-application-state'
import { NoteType } from '@hedgedoc/commons'
import { LinkType } from '../../editor-page/sidebar/specific-sidebar-entries/share-note-sidebar-entry/share-modal/note-url-field'
import { concatCssClasses } from '../../../utils/concat-css-classes'
interface FullscreenButtonProps {
linkToEditor: boolean
@@ -55,7 +56,15 @@ export const FullscreenButton: React.FC<FullscreenButtonProps> = ({ linkToEditor
}
return (
<Link href={correctLink} passHref={true} target={'_blank'} className={styles['fullscreen-button']}>
<Link
href={correctLink}
passHref={true}
target={'_blank'}
className={concatCssClasses({
[styles['fullscreen-button']]: true,
[styles['editor']]: !linkToEditor,
[styles['readonly']]: linkToEditor
})}>
<Button variant={'secondary'}>
<UiIcon icon={icon} />
</Button>