Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"dependencies": {
"@babel/plugin-transform-react-inline-elements": "^8.0.1",
"@babel/runtime": "^8.1.0",
"@formatjs/intl-pluralrules": "^7.0.4",
"@babel/runtime": "^8.1.3",
"@formatjs/intl-pluralrules": "^7.1.0",
"@formatjs/intl-relativetimeformat": "^13.0.3",
"@fortawesome/fontawesome-free": "^7.3.1",
"@fortawesome/fontawesome-svg-core": "^7.3.1",
Expand All @@ -38,8 +38,8 @@
"@fortawesome/free-solid-svg-icons": "^7.3.1",
"@fortawesome/react-fontawesome": "^3.5.0",
"@iktakahiro/markdown-it-katex": "^4.0.1",
"@reduxjs/toolkit": "^2.14.0",
"admin-lte": "4.10.0",
"@reduxjs/toolkit": "^2.15.0",
"admin-lte": "4.10.2",
"babel-plugin-formatjs": "^13.0.11",
"browser-cookies": "^1.2.0",
"buffer": "^6.0.3",
Expand All @@ -52,9 +52,9 @@
"file-saver": "^2.0.5",
"flat": "^6.0.1",
"font-awesome-animation": "^1.1.1",
"glob": "^14.0.4",
"glob": "^14.0.6",
"highlight.js": "^11.12.0",
"immutable": "^5.1.10",
"immutable": "^5.2.1",
"jwt-decode": "^4.0.0",
"markdown-it": "^15.0.3",
"moment": "^2.31.0",
Expand All @@ -69,14 +69,14 @@
"react-datetime": "^3.3.1",
"react-diff-viewer": "^3.1.1",
"react-dom": "19.3.1",
"react-dropzone": "^20.2.0",
"react-dropzone": "^20.2.1",
"react-helmet": "^6.1.0",
"react-immutable-proptypes": "^2.2.0",
"react-intl": "12.1.7",
"react-intl": "12.2.0",
"react-qr-code": "^2.2.0",
"react-redux": "^9.3.1",
"react-router": "^8.5.1",
"react-router-dom": "^7.18.5",
"react-router": "^8.5.2",
"react-router-dom": "^7.18.6",
"react-syntax-highlighter": "^16.1.2",
"react-toggle": "4.1.3",
"redux": "^5.0.1",
Expand All @@ -94,20 +94,20 @@
},
"devDependencies": {
"@babel/cli": "^8.1.0",
"@babel/core": "^8.1.0",
"@babel/eslint-parser": "^8.0.7",
"@babel/core": "^8.1.3",
"@babel/eslint-parser": "^8.1.2",
"@babel/eslint-plugin": "^8.1.0",
"@babel/node": "^8.0.6",
"@babel/node": "^8.1.2",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-transform-flow-strip-types": "^8.0.1",
"@babel/plugin-transform-runtime": "^8.0.6",
"@babel/plugin-transform-runtime": "^8.1.2",
"@babel/preset-env": "^8.0.7",
"@babel/preset-react": "^8.0.1",
"@babel/register": "^8.0.6",
"@babel/register": "^8.1.2",
"@eslint/compat": "^2.1.1",
"@eslint/eslintrc": "^3.3.7",
"@eslint/js": "^10.0.1",
"@formatjs/cli-lib": "^10.2.2",
"@formatjs/cli-lib": "^10.4.0",
"babel-loader": "^10.1.1",
"babel-plugin-polyfill-corejs3": "^1.0.0",
"babel-plugin-prismjs": "^2.1.0",
Expand All @@ -119,7 +119,7 @@
"css-loader": "^7.1.5",
"css-modules-require-hook": "^4.2.3",
"dotenv": "^18.0.10",
"eslint": "^10.14.0",
"eslint": "^10.15.0",
"eslint-config-prettier": "^10.1.8",
"eslint-config-standard": "17.1.0",
"eslint-config-standard-react": "13.0.0",
Expand All @@ -137,23 +137,23 @@
"globals": "^17.14.0",
"image-webpack-loader": "^8.1.0",
"isomorphic-style-loader": "^6.0.0",
"jsdom": "^31.0.0",
"jsdom": "^31.0.1",
"json-loader": "^0.5.7",
"less": "^4.9.1",
"less-loader": "^13.1.0",
"less-loader": "^13.1.1",
"mini-css-extract-plugin": "^2.10.2",
"mocha": "^12.0.3",
"mocha-lcov-reporter": "^1.3.0",
"mock-local-storage": "^1.1.24",
"postcss-loader": "^8.2.1",
"prettier": "^3.9.10",
"postcss-loader": "^8.2.2",
"prettier": "^3.10.1",
"react-intl-translations-manager": "^5.0.3",
"strip-loader": "^0.1.2",
"style-loader": "^4.0.0",
"terser-webpack-plugin": "^5.6.1",
"webpack": "5.112.2",
"webpack": "5.113.0",
"webpack-cli": "^7.3.1",
"webpack-dev-middleware": "^8.6.0",
"webpack-dev-middleware": "^8.6.3",
"webpack-dev-server": "^6.1.0",
"webpack-isomorphic-tools": "^4.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getToken, getInstanceId } from './redux/middleware/authMiddleware.js';
import { getLang } from './redux/middleware/langMiddleware.js';
import App from './containers/App/index.js';

import 'admin-lte/dist/js/adminlte.js';
import 'admin-lte';

// Patch for ACE editor (it has complex loading)
import ace from 'ace-builds';
Expand Down
48 changes: 38 additions & 10 deletions src/components/Solutions/Upload/Upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Dropzone from 'react-dropzone';
import { ProgressBar } from 'react-bootstrap';

import Button from '../../widgets/TheButton';
import UploadsTable from '../UploadsTable';
import { UploadIcon } from '../../icons';
Expand All @@ -18,6 +20,8 @@ const dropZoneStyles = {

const Upload = ({
existingFiles,
startingFiles,
startedFiles,
uploadingFiles,
uploadedFiles,
failedFiles,
Expand All @@ -30,19 +34,41 @@ const Upload = ({
doRetryUploadFile,
}) => (
<div>
<Dropzone onDrop={doUploadFiles}>
<Dropzone onDrop={doUploadFiles} disabled={startingFiles > 0}>
{({ getRootProps, getInputProps }) => (
<div {...getRootProps()} style={dropZoneStyles}>
<input {...getInputProps()} />
<div className="mt-4">
<Button variant="primary">
<UploadIcon gapRight={2} />
<FormattedMessage id="app.uploadFiles.addFileButton" defaultMessage="Select File(s) for Upload" />
</Button>
</div>
<div className="small text-body-secondary my-3">
<FormattedMessage id="app.uploadFiles.dragAndDrop" defaultMessage="Or simply drag and drop files here..." />
</div>

{startingFiles === 0 ? (
<>
<div className="mt-4">
<Button variant="primary">
<UploadIcon gapRight={2} />
<FormattedMessage id="app.uploadFiles.addFileButton" defaultMessage="Select File(s) for Upload" />
</Button>
</div>
<div className="small text-body-secondary my-3">
<FormattedMessage
id="app.uploadFiles.dragAndDrop"
defaultMessage="Or simply drag and drop files here..."
/>
</div>
</>
) : (
<div className="m-5">
<div className="small text-body-secondary my-2">
<FormattedMessage id="app.uploadFiles.startingUploads" defaultMessage="Starting uploads..." />
</div>

<ProgressBar
now={startedFiles}
max={startingFiles}
label={`${startedFiles}/${startingFiles}`}
variant="success"
animated
/>
</div>
)}
</div>
)}
</Dropzone>
Expand All @@ -66,6 +92,8 @@ const Upload = ({

Upload.propTypes = {
existingFiles: PropTypes.instanceOf(Set),
startingFiles: PropTypes.number,
startedFiles: PropTypes.number,
uploadingFiles: PropTypes.array.isRequired,
uploadedFiles: PropTypes.array.isRequired,
failedFiles: PropTypes.array.isRequired,
Expand Down
9 changes: 0 additions & 9 deletions src/components/forms/EditUserUIDataForm/EditUserUIDataForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,6 @@ const EditUserUIDataForm = ({
}
/>

<Field
name="openedSidebar"
component={CheckboxField}
onOff
label={
<FormattedMessage id="app.editUserUIData.openedSidebar" defaultMessage="Sidebar is unfolded by default" />
}
/>

<Field
name="useGravatar"
component={CheckboxField}
Expand Down
9 changes: 1 addition & 8 deletions src/components/layout/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ import { getConfigVar } from '../../../helpers/config.js';
const SKIN = getConfigVar('SKIN') || 'success';

class Header extends Component {
toggleSidebar = e => {
e.preventDefault();
// flip AdminLTE body classes
window.document.body.classList.toggle('sidebar-collapse');
window.document.body.classList.toggle('sidebar-open');
};

render() {
const {
isLoggedIn,
Expand All @@ -40,7 +33,7 @@ class Header extends Component {
<ClientOnly>
<ul className="navbar-nav w-100">
<li className="nav-item">
<a className="nav-link" data-widget="pushmenu" href="#" onClick={this.toggleSidebar}>
<a className="nav-link" data-lte-toggle="sidebar" href="#">
<Icon icon="bars" />
</a>
</li>
Expand Down
12 changes: 0 additions & 12 deletions src/components/layout/Sidebar/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,3 @@
position: absolute;
right: 1em;
}

.sidebar-collapse .app-sidebar:not(:hover) .brand-link {
margin-right: 0!important;
}

.sidebar-collapse .app-sidebar:not(:hover) .brand-image {
margin-right: 0!important;
}

.sidebar-collapse .app-sidebar:not(:hover) .brand-text {
display: none;
}
2 changes: 0 additions & 2 deletions src/components/widgets/Sidebar/UserPanel/UserPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import withLinks from '../../../../helpers/withLinks.js';
import { EditIcon, LogoutIcon } from '../../../icons';
import { isSuperadminRole, UserRoleIcon, roleLabels } from '../../../helpers/usersRoles.js';

import './userPanel.css';

class UserPanel extends Component {
state = { effectiveRoleDialogOpened: false, effectiveRoleUpdating: null };

Expand Down
12 changes: 0 additions & 12 deletions src/components/widgets/Sidebar/UserPanel/userPanel.css

This file was deleted.

1 change: 1 addition & 0 deletions src/containers/App/recodex.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ table.table.tbody-hover tbody:hover th.selected {
*/

:root {
color-scheme: light only;
--bs-box-shadow-sm: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
--success: var(--bs-success);
}
Expand Down
23 changes: 5 additions & 18 deletions src/containers/LayoutContainer/LayoutContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,12 @@ class LayoutContainer extends Component {
}
}

setInitialSidebarState = open => {
const bootstrapCompactViewWidth = 991; // this may change with different versions of bootstrap
if (window && window.document.body.clientWidth > bootstrapCompactViewWidth) {
window.document.body.classList.remove(open === false ? 'sidebar-open' : 'sidebar-collapse');
window.document.body.classList.add(open === false ? 'sidebar-collapse' : 'sidebar-open');
}
};

componentDidMount() {
if (canUseDOM) {
this.setInitialSidebarState(this.props.userUIData.openedSidebar);
// AdminLTE initializes its plugins (PushMenu, TreeView, ...) on DOMContentLoaded, which fires before React
// renders the layout, so it finds no sidebar. Re-run the initialization now that the layout is in the DOM.
import('admin-lte').then(({ initialize }) => initialize());

this.newPageLoading = true;
this.pageHeight = -1;
this._scrollTargetToView();
Expand All @@ -67,14 +62,6 @@ class LayoutContainer extends Component {

componentDidUpdate(prevProps) {
if (canUseDOM) {
if (
(prevProps.userUIData.openedSidebar === undefined && this.props.userUIData.openedSidebar !== undefined) ||
(prevProps.userUIData.openedSidebar !== undefined &&
prevProps.userUIData.openedSidebar !== this.props.userUIData.openedSidebar)
) {
this.setInitialSidebarState(this.props.userUIData.openedSidebar);
}

if (this.newPageLoading) {
this._scrollTargetToView();
}
Expand All @@ -86,7 +73,7 @@ class LayoutContainer extends Component {
}

/**
* Get messages for the given language or the deafult - English
* Get messages for the given language or the default - English
*/

getDefaultLang = () => {
Expand Down
Loading
Loading