mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
minor bug fixes
This commit is contained in:
8 files changed
+18
-24
No files matched your search
+1
-1
@@ -73,7 +73,7 @@ if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
await spawnAsync(
|
await spawnAsync(
|
||||||
`yarn npm publish --access public --tag ${tag} ${CI ? '--provenance' : ''}`,
|
`yarn npm publish --access public --tag ${tag}${CI ? ' --provenance' : ''}`,
|
||||||
path.resolve(name),
|
path.resolve(name),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -44,7 +44,7 @@
|
|||||||
"cross-spawn": "^7.0.6",
|
"cross-spawn": "^7.0.6",
|
||||||
"esbuild": "0.25.2",
|
"esbuild": "0.25.2",
|
||||||
"eslint": "^9.25.0",
|
"eslint": "^9.25.0",
|
||||||
"eslint-import-resolver-typescript": "^4.3.2",
|
"eslint-import-resolver-typescript": "^4.3.3",
|
||||||
"eslint-import-resolver-webpack": "^0.13.10",
|
"eslint-import-resolver-webpack": "^0.13.10",
|
||||||
"fs-extra": "^11.3.0",
|
"fs-extra": "^11.3.0",
|
||||||
"globals": "^16.0.0",
|
"globals": "^16.0.0",
|
||||||
@@ -61,5 +61,6 @@
|
|||||||
"supports-hyperlinks": "^3.2.0",
|
"supports-hyperlinks": "^3.2.0",
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
"wtfnode": "^0.10.0"
|
"wtfnode": "^0.10.0"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"@zip.js/zip.js": "^2.7.60",
|
"@zip.js/zip.js": "^2.7.60",
|
||||||
"adm-zip": "0.5.16",
|
"adm-zip": "0.5.16",
|
||||||
"cac": "^6.7.14",
|
"cac": "^6.7.14",
|
||||||
"cordis": "4.0.0-beta.1",
|
"cordis": "4.0.0-beta.2",
|
||||||
"csv-stringify": "^6.5.2",
|
"csv-stringify": "^6.5.2",
|
||||||
"emoji-regex": "^10.4.0",
|
"emoji-regex": "^10.4.0",
|
||||||
"emojis-list": "2.1.0",
|
"emojis-list": "2.1.0",
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ export async function apply(ctx: Context) {
|
|||||||
await opcount.inc(op, id, periodSecs, maxOperations);
|
await opcount.inc(op, id, periodSecs, maxOperations);
|
||||||
},
|
},
|
||||||
renderTitle(str: string) {
|
renderTitle(str: string) {
|
||||||
const name = this.ctx.setting.get('server.name');
|
const name = this.ctx.get('setting')?.get('server.name') || system.get('server.name');
|
||||||
if (this.UiContext.extraTitleContent) return `${this.UiContext.extraTitleContent} - ${this.translate(str)} - ${name}`;
|
if (this.UiContext.extraTitleContent) return `${this.UiContext.extraTitleContent} - ${this.translate(str)} - ${name}`;
|
||||||
return `${this.translate(str)} - ${name}`;
|
return `${this.translate(str)} - ${name}`;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,16 @@ const FileSelectAutoComplete = React.forwardRef<any, any>((props, ref) => (
|
|||||||
itemKey={(item) => `${item._id?.toString() || item.name || item}`}
|
itemKey={(item) => `${item._id?.toString() || item.name || item}`}
|
||||||
renderItem={(item) => item.name || item._id || item} // TODO icon
|
renderItem={(item) => item.name || item._id || item} // TODO icon
|
||||||
allowEmptyQuery
|
allowEmptyQuery
|
||||||
{...props}
|
{...{
|
||||||
|
width: '100%',
|
||||||
|
height: 'auto',
|
||||||
|
listStyle: {},
|
||||||
|
multi: false,
|
||||||
|
selectedKeys: [],
|
||||||
|
freeSolo: false,
|
||||||
|
freeSoloConverter: (input) => input,
|
||||||
|
...props,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
||||||
@@ -38,14 +47,4 @@ FileSelectAutoComplete.propTypes = {
|
|||||||
|
|
||||||
FileSelectAutoComplete.displayName = 'FileSelectAutoComplete';
|
FileSelectAutoComplete.displayName = 'FileSelectAutoComplete';
|
||||||
|
|
||||||
FileSelectAutoComplete.defaultProps = {
|
|
||||||
width: '100%',
|
|
||||||
height: 'auto',
|
|
||||||
listStyle: {},
|
|
||||||
multi: false,
|
|
||||||
selectedKeys: [],
|
|
||||||
freeSolo: false,
|
|
||||||
freeSoloConverter: (input) => input,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default FileSelectAutoComplete;
|
export default FileSelectAutoComplete;
|
||||||
@@ -39,15 +39,12 @@ function ExtraFilesConfig() {
|
|||||||
const userExtraFiles = useSelector((state: RootState) => state.config.user_extra_files || [], isEqual);
|
const userExtraFiles = useSelector((state: RootState) => state.config.user_extra_files || [], isEqual);
|
||||||
const judgeExtraFiles = useSelector((state: RootState) => state.config.judge_extra_files || [], isEqual);
|
const judgeExtraFiles = useSelector((state: RootState) => state.config.judge_extra_files || [], isEqual);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const userRef = React.useRef<any>();
|
|
||||||
const judgeRef = React.useRef<any>();
|
|
||||||
return (
|
return (
|
||||||
<FormItem columns={12} label="ExtraFilesConfig" disableLabel>
|
<FormItem columns={12} label="ExtraFilesConfig" disableLabel>
|
||||||
<Card style={{ padding: 10 }}>
|
<Card style={{ padding: 10 }}>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<FormItem columns={12} label={i18n('user_extra_files')}>
|
<FormItem columns={12} label={i18n('user_extra_files')}>
|
||||||
<FileSelectAutoComplete
|
<FileSelectAutoComplete
|
||||||
ref={userRef}
|
|
||||||
data={Files}
|
data={Files}
|
||||||
selectedKeys={userExtraFiles}
|
selectedKeys={userExtraFiles}
|
||||||
onChange={(val) => dispatch({ type: 'CONFIG_FORM_UPDATE', key: 'user_extra_files', value: val.split(',') })}
|
onChange={(val) => dispatch({ type: 'CONFIG_FORM_UPDATE', key: 'user_extra_files', value: val.split(',') })}
|
||||||
@@ -56,7 +53,6 @@ function ExtraFilesConfig() {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem columns={12} label={i18n('judge_extra_files')}>
|
<FormItem columns={12} label={i18n('judge_extra_files')}>
|
||||||
<FileSelectAutoComplete
|
<FileSelectAutoComplete
|
||||||
ref={judgeRef}
|
|
||||||
data={Files}
|
data={Files}
|
||||||
selectedKeys={judgeExtraFiles}
|
selectedKeys={judgeExtraFiles}
|
||||||
onChange={(val) => dispatch({ type: 'CONFIG_FORM_UPDATE', key: 'judge_extra_files', value: val.split(',') })}
|
onChange={(val) => dispatch({ type: 'CONFIG_FORM_UPDATE', key: 'judge_extra_files', value: val.split(',') })}
|
||||||
@@ -75,7 +71,6 @@ function LangConfig() {
|
|||||||
const data = Object.keys(window.LANGS).filter((i) => !prefixes.has(i))
|
const data = Object.keys(window.LANGS).filter((i) => !prefixes.has(i))
|
||||||
.map((i) => ({ name: `${i.includes('.') ? `${window.LANGS[i.split('.')[0]].display || ''}/` : ''}${window.LANGS[i].display}`, _id: i }));
|
.map((i) => ({ name: `${i.includes('.') ? `${window.LANGS[i.split('.')[0]].display || ''}/` : ''}${window.LANGS[i].display}`, _id: i }));
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const ref = React.useRef<any>();
|
|
||||||
const selectedKeys = langs.filter((i) => !prefixes.has(i));
|
const selectedKeys = langs.filter((i) => !prefixes.has(i));
|
||||||
return (
|
return (
|
||||||
<FormItem columns={12} label="langs" disableLabel>
|
<FormItem columns={12} label="langs" disableLabel>
|
||||||
@@ -83,7 +78,6 @@ function LangConfig() {
|
|||||||
<div className="row">
|
<div className="row">
|
||||||
<FormItem columns={12} label="langs">
|
<FormItem columns={12} label="langs">
|
||||||
<CustomSelectAutoComplete
|
<CustomSelectAutoComplete
|
||||||
ref={ref}
|
|
||||||
data={data}
|
data={data}
|
||||||
placeholder={!selectedKeys.length ? i18n('Unlimited') : i18n('Code language')}
|
placeholder={!selectedKeys.length ? i18n('Unlimited') : i18n('Code language')}
|
||||||
selectedKeys={selectedKeys}
|
selectedKeys={selectedKeys}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"copy-webpack-plugin": "^13.0.0",
|
"copy-webpack-plugin": "^13.0.0",
|
||||||
"cordis": "4.0.0-beta.1",
|
"cordis": "4.0.0-beta.2",
|
||||||
"core-js": "^3.41.0",
|
"core-js": "^3.41.0",
|
||||||
"core-js-compat": "^3.41.0",
|
"core-js-compat": "^3.41.0",
|
||||||
"css-loader": "^7.1.2",
|
"css-loader": "^7.1.2",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vitejs/plugin-react": "^4.4.0",
|
"@vitejs/plugin-react": "^4.4.1",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1"
|
"react-dom": "^18.3.1"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user