mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
lint: fix
This commit is contained in:
1 parent
bf88b828ec
commit
4356f17ef8
7 files changed
+7
-11
No files matched your search
@@ -18,7 +18,7 @@ import record from '../model/record';
|
|||||||
import user from '../model/user';
|
import user from '../model/user';
|
||||||
import message from '../model/message';
|
import message from '../model/message';
|
||||||
import {
|
import {
|
||||||
Route, Handler, Types, param, query,
|
Route, Handler, Types, param,
|
||||||
} from '../service/server';
|
} from '../service/server';
|
||||||
import * as bus from '../service/bus';
|
import * as bus from '../service/bus';
|
||||||
import storage from '../service/storage';
|
import storage from '../service/storage';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
PenaltyRules, Tdoc, ProblemDoc, User,
|
PenaltyRules, Tdoc, ProblemDoc, User,
|
||||||
} from '../interface';
|
} from '../interface';
|
||||||
import {
|
import {
|
||||||
Route, Handler, Types, param, query,
|
Route, Handler, Types, param,
|
||||||
} from '../service/server';
|
} from '../service/server';
|
||||||
import * as bus from '../service/bus';
|
import * as bus from '../service/bus';
|
||||||
import domain from '../model/domain';
|
import domain from '../model/domain';
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class RecordModel {
|
|||||||
let data: FileInfo[] = [];
|
let data: FileInfo[] = [];
|
||||||
if (rdoc.pid) {
|
if (rdoc.pid) {
|
||||||
const pdoc = await problem.get(rdoc.pdomain, rdoc.pid);
|
const pdoc = await problem.get(rdoc.pdomain, rdoc.pid);
|
||||||
if (!pdoc) throw new ProblemNotFoundError(rdoc?.pdomain, rdoc.pid);
|
if (!pdoc) throw new ProblemNotFoundError(rdoc.pdomain, rdoc.pid);
|
||||||
data = pdoc.data;
|
data = pdoc.data;
|
||||||
if (typeof pdoc.config === 'string') throw new Error(pdoc.config);
|
if (typeof pdoc.config === 'string') throw new Error(pdoc.config);
|
||||||
if (pdoc.config.type === 'remote_judge') {
|
if (pdoc.config.type === 'remote_judge') {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export default class ObjectiveContainer extends React.PureComponent {
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={this.onSubmit}>
|
<form onSubmit={this.onSubmit}>
|
||||||
{this.props.panel.map((i, name) => (
|
{this.props.panel.map((i, name) => (
|
||||||
<div className="row">
|
<div className="row" key={i}>
|
||||||
<div className="medium-7 columns form__item end">
|
<div className="medium-7 columns form__item end">
|
||||||
{i.choices ? this.Radio(i, name) : this.Textbox(i, name)}
|
{i.choices ? this.Radio(i, name) : this.Textbox(i, name)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.17.0",
|
"version": "4.17.1",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
@@ -18,9 +18,7 @@ const page = new NamedPage('home_preference', async () => {
|
|||||||
super(props);
|
super(props);
|
||||||
this.state = { value: UserContext.astyleOptions };
|
this.state = { value: UserContext.astyleOptions };
|
||||||
[this.success, this.preview] = format(code, `${this.state.value.trim()} mode=c`);
|
[this.success, this.preview] = format(code, `${this.state.value.trim()} mode=c`);
|
||||||
this.state.highlight = this.success
|
this.state.highlight = prismjs.highlight(this.preview, prismjs.Prism.languages.cpp, 'C++');
|
||||||
? prismjs.highlight(this.preview, prismjs.Prism.languages.cpp, 'C++')
|
|
||||||
: prismjs.highlight(this.preview, prismjs.Prism.languages.cpp, 'C++');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -39,9 +37,7 @@ const page = new NamedPage('home_preference', async () => {
|
|||||||
onChange={(ev) => {
|
onChange={(ev) => {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
[this.success, this.preview] = format(code, `${ev.target.value.trim()} mode=c`);
|
[this.success, this.preview] = format(code, `${ev.target.value.trim()} mode=c`);
|
||||||
const highlight = this.success
|
const highlight = prismjs.highlight(this.preview, prismjs.Prism.languages.cpp, 'C++');
|
||||||
? prismjs.highlight(this.preview, prismjs.Prism.languages.cpp, 'C++')
|
|
||||||
: prismjs.highlight(this.preview, prismjs.Prism.languages.cpp, 'C++');
|
|
||||||
this.setState({ value: ev.target.value, highlight });
|
this.setState({ value: ev.target.value, highlight });
|
||||||
}}
|
}}
|
||||||
className="textbox"
|
className="textbox"
|
||||||
|
|||||||
File renamed without changes.
Reference in new issue
Block a user