mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-06 09:31:35 -04:00
Feature/lazy load components (#590)
This commit is contained in:
parent
9c38655a92
commit
101292da92
46 changed files with 261 additions and 248 deletions
|
@ -1,20 +1,5 @@
|
|||
.history-menu {
|
||||
|
||||
.fa, &::after {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&:hover .fa, &:hover::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.btn {
|
||||
padding: 0.6rem 0.65rem;
|
||||
}
|
||||
}
|
||||
|
||||
.dropup .dropdown-toggle, .dropdown-toggle {
|
||||
&.no-arrow::after {
|
||||
content: initial;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ export interface EntryMenuProps {
|
|||
className?: string
|
||||
}
|
||||
|
||||
const EntryMenu: React.FC<EntryMenuProps> = ({ id, title, location, isDark, onRemove, onDelete, className }) => {
|
||||
export const EntryMenu: React.FC<EntryMenuProps> = ({ id, title, location, isDark, onRemove, onDelete, className }) => {
|
||||
useTranslation()
|
||||
|
||||
return (
|
||||
|
@ -54,5 +54,3 @@ const EntryMenu: React.FC<EntryMenuProps> = ({ id, title, location, isDark, onRe
|
|||
</Dropdown>
|
||||
)
|
||||
}
|
||||
|
||||
export { EntryMenu }
|
||||
|
|
|
@ -189,33 +189,33 @@ export const HistoryPage: React.FC = () => {
|
|||
sortAndFilterEntries(allEntries, toolbarState),
|
||||
[allEntries, toolbarState])
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<ErrorModal show={error !== ''} onHide={resetError}
|
||||
titleI18nKey={error !== '' ? `landing.history.error.${error}.title` : ''}>
|
||||
<h5>
|
||||
<Trans i18nKey={error !== '' ? `landing.history.error.${error}.text` : ''}/>
|
||||
</h5>
|
||||
</ErrorModal>
|
||||
<h1 className="mb-4"><Trans i18nKey="landing.navigation.history"/></h1>
|
||||
<Row className={'justify-content-center mt-5 mb-3'}>
|
||||
<HistoryToolbar
|
||||
onSettingsChange={setToolbarState}
|
||||
tags={tags}
|
||||
onClearHistory={clearHistory}
|
||||
onRefreshHistory={refreshHistory}
|
||||
onExportHistory={exportHistory}
|
||||
onImportHistory={importHistory}
|
||||
onUploadAll={uploadAll}
|
||||
/>
|
||||
</Row>
|
||||
<HistoryContent
|
||||
viewState={toolbarState.viewState}
|
||||
entries={entriesToShow}
|
||||
onPinClick={pinClick}
|
||||
onRemoveClick={removeFromHistoryClick}
|
||||
onDeleteClick={deleteNoteClick}
|
||||
return <Fragment>
|
||||
<ErrorModal show={error !== ''} onHide={resetError}
|
||||
titleI18nKey={error !== '' ? `landing.history.error.${error}.title` : ''}>
|
||||
<h5>
|
||||
<Trans i18nKey={error !== '' ? `landing.history.error.${error}.text` : ''}/>
|
||||
</h5>
|
||||
</ErrorModal>
|
||||
<h1 className="mb-4"><Trans i18nKey="landing.navigation.history"/></h1>
|
||||
<Row className={'justify-content-center mt-5 mb-3'}>
|
||||
<HistoryToolbar
|
||||
onSettingsChange={setToolbarState}
|
||||
tags={tags}
|
||||
onClearHistory={clearHistory}
|
||||
onRefreshHistory={refreshHistory}
|
||||
onExportHistory={exportHistory}
|
||||
onImportHistory={importHistory}
|
||||
onUploadAll={uploadAll}
|
||||
/>
|
||||
</Fragment>
|
||||
)
|
||||
</Row>
|
||||
<HistoryContent
|
||||
viewState={toolbarState.viewState}
|
||||
entries={entriesToShow}
|
||||
onPinClick={pinClick}
|
||||
onRemoveClick={removeFromHistoryClick}
|
||||
onDeleteClick={deleteNoteClick}
|
||||
/>
|
||||
</Fragment>
|
||||
}
|
||||
|
||||
export default HistoryPage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue