upgrade deps

This commit is contained in:
undefined committed 2026-02-19 17:36:37 +08:00
1 parent 4f27dfab4a
commit e0f43bb363
26 files changed
+60 -74

No files matched your search

@@ -1,4 +1,3 @@
import 'jquery-scroll-lock';
import 'jquery.easing';
import $ from 'jquery';
@@ -16,7 +15,6 @@ const mapStateToProps = (state) => ({
: null,
});
// eslint-disable-next-line react-refresh/only-export-components
export default connect(mapStateToProps)(class MessagePadDialogueContentContainer extends React.PureComponent {
componentDidUpdate(prevProps) {
const node = this.state.ref;
@@ -24,13 +22,12 @@ export default connect(mapStateToProps)(class MessagePadDialogueContentContainer
if (this.props.activeId !== prevProps.activeId) {
this.scrollToBottom = true;
this.scrollWithAnimation = false;
} else if (node.scrollTop + node.offsetHeight === node.scrollHeight) {
} else if (Math.abs(node.scrollTop + node.offsetHeight - node.scrollHeight) < 200) {
this.scrollToBottom = true;
this.scrollWithAnimation = true;
} else this.scrollToBottom = false;
if (!node) return;
$(this.state.ref).scrollLock({ strict: true });
if (this.scrollToBottom) {
const targetScrollTop = node.scrollHeight - node.offsetHeight;
if (this.scrollWithAnimation) {
@@ -98,7 +95,7 @@ export default connect(mapStateToProps)(class MessagePadDialogueContentContainer
</a>
)}
</div>
<ol className="messagepad__content" ref={(ref) => { this.setState({ ...this.state, ref }); }}>
<ol className="messagepad__content" style={{ overscrollBehavior: 'contain' }} ref={(ref) => { this.setState({ ...this.state, ref }); }}>
{this.renderInner()}
</ol>
</>
@@ -1,5 +1,3 @@
import 'jquery-scroll-lock';
import $ from 'jquery';
import _ from 'lodash';
import React from 'react';
@@ -21,7 +19,6 @@ const mapDispatchToProps = (dispatch) => ({
},
});
// eslint-disable-next-line react-refresh/only-export-components
export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadDialogueListContainer extends React.PureComponent {
render() {
const orderedDialogues = _.orderBy(
@@ -42,7 +42,6 @@ const mapDispatchToProps = (dispatch) => ({
},
});
// eslint-disable-next-line react-refresh/only-export-components
export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadInputContainer extends React.PureComponent {
static contextTypes = {
store: PropTypes.object,
@@ -16,7 +16,6 @@ const mapDispatchToProps = (dispatch) => ({
},
});
// eslint-disable-next-line react-refresh/only-export-components
export default connect(null, mapDispatchToProps)(class MessagePadContainer extends React.PureComponent {
static propTypes = {
onAdd: PropTypes.func.isRequired,
@@ -1,4 +1,3 @@
/* eslint-disable react-refresh/only-export-components */
import type { ProblemConfigFile, TestCaseConfig } from 'hydrooj/src/interface';
import { diffLines } from 'diff';
import $ from 'jquery';
@@ -68,6 +68,7 @@ export function SelectionManager(props: SelectionManagerProps) {
const cleanupSelection = React.useCallback(() => {
selecting.current = false;
document.body.removeEventListener('mousemove', handleMouseMove);
// eslint-disable-next-line ts/no-use-before-define
document.body.removeEventListener('mouseup', handleMouseUp);
$('#divSelectArea').remove();
$('body').css('cursor', 'default');
@@ -13,7 +13,6 @@ interface ScratchpadOptions {
commandDone?: () => void;
}
// eslint-disable-next-line react-refresh/only-export-components
export default connect((state: any) => ({
value: state.editor.code,
language: window.LANGS[state.editor.lang]?.monaco,
@@ -27,7 +27,6 @@ const mapDispatchToProps = (dispatch) => ({
},
});
// eslint-disable-next-line react-refresh/only-export-components
export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadPretestContainer extends React.PureComponent {
render() {
return (
@@ -11,7 +11,6 @@ const mapStateToProps = (state) => ({
isLoading: state.ui.records.isLoading,
});
// eslint-disable-next-line react-refresh/only-export-components
export default connect(mapStateToProps)(class ScratchpadRecordsContainer extends React.PureComponent {
render() {
const cn = classNames('data-table is--full-row scratchpad__records__table', {
@@ -46,7 +46,6 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => ({
data: stateProps.items[ownProps.id],
});
// eslint-disable-next-line react-refresh/only-export-components
export default connect(mapStateToProps, null, mergeProps)(class ScratchpadRecordsRowContainer extends React.PureComponent {
handleRowClick(ev, id) {
const url = substitute(
@@ -73,7 +73,6 @@ const mapDispatchToProps = (dispatch) => ({
const availableLangs = getAvailableLangs(UiContext.pdoc.config.langs);
const keys = Object.keys(availableLangs);
// eslint-disable-next-line react-refresh/only-export-components
export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadToolbarContainer extends React.PureComponent {
static contextTypes = {
store: PropTypes.object,