You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2241 lines
110 KiB
2241 lines
110 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[6270],{
|
|
|
|
/***/ 43275:
|
|
/*!****************************************!*\
|
|
!*** ./src/components/Hooks/index.tsx ***!
|
|
\****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ y: function() { return /* binding */ useDisableAction; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
const useDisableAction = (disable) => {
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
if (disable) {
|
|
const handleKeyDown = (event) => {
|
|
if (event.key === "F12") {
|
|
event.preventDefault();
|
|
console.log("F12\u88AB\u7981\u7528");
|
|
}
|
|
};
|
|
const handleContextmenu = (event) => {
|
|
event.preventDefault();
|
|
};
|
|
document.addEventListener("keydown", handleKeyDown);
|
|
document.addEventListener("contextmenu", handleContextmenu);
|
|
return () => {
|
|
document.removeEventListener("keydown", handleKeyDown);
|
|
document.removeEventListener("contextmenu", handleContextmenu);
|
|
};
|
|
}
|
|
}, [disable]);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 74198:
|
|
/*!*******************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx ***!
|
|
\*******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 31797);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 78241);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 43418);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd */ 86383);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 20008);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd */ 95237);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! antd */ 43604);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/exercise */ 53669);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ 9498);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! umi */ 23852);
|
|
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/util */ 75798);
|
|
/* harmony import */ var _components_Exercise_ip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/Exercise/ip */ 40974);
|
|
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/authority */ 77883);
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { Countdown } = antd__WEBPACK_IMPORTED_MODULE_7__["default"];
|
|
const Unlock = ({ exercise, successCb, dispatch }) => {
|
|
var _a, _b, _c, _d;
|
|
const params = (0,umi__WEBPACK_IMPORTED_MODULE_3__.useParams)();
|
|
const [form] = antd__WEBPACK_IMPORTED_MODULE_8__["default"].useForm();
|
|
const [isLoading, setIsLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
const localIpRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
const { actionTabs } = exercise;
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
if (exercise.actionTabs.key === "student-unlock") {
|
|
setIsLoading(false);
|
|
form.resetFields();
|
|
}
|
|
}, [exercise.actionTabs.key]);
|
|
const getLocalIp = () => {
|
|
return new Promise((resolve) => __async(void 0, null, function* () {
|
|
var _a2, _b2, _c2;
|
|
localIpRef.current = yield (0,_components_Exercise_ip__WEBPACK_IMPORTED_MODULE_5__/* .findLocalIp */ .y)({ ip_limit: (_a2 = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _a2.ip_limit, ip_bind: (_b2 = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _b2.ip_bind, ip_bind_type: (_c2 = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _c2.ip_bind_type });
|
|
return resolve();
|
|
}));
|
|
};
|
|
const handleOk = () => __async(void 0, null, function* () {
|
|
var _a2, _b2, _c2, _d2, _e, _f, _g;
|
|
yield form.validateFields();
|
|
const formValue = form.getFieldsValue();
|
|
setIsLoading(true);
|
|
if (((_a2 = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _a2.ip_limit) !== "no" || ((_b2 = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _b2.ip_bind))
|
|
yield getLocalIp();
|
|
const unlockRes = yield (0,_service_exercise__WEBPACK_IMPORTED_MODULE_1__/* .unlockUser */ .ZD)((_c2 = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _c2.id, { exercise_user_id: (_d2 = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _d2.exercise_user_id, unlock_key: formValue.unlock_key, ip: localIpRef.current });
|
|
if (unlockRes.status === 0) {
|
|
if (successCb) {
|
|
dispatch({
|
|
type: "exercise/setActionTabs",
|
|
payload: {}
|
|
});
|
|
successCb();
|
|
return;
|
|
}
|
|
if (formValue.time) {
|
|
const delayedParams = {
|
|
time: moment__WEBPACK_IMPORTED_MODULE_2___default()(formValue.time).format("YYYY-MM-DD HH:mm"),
|
|
exercise_user_id: (_e = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _e.exercise_user_id,
|
|
id: (_f = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _f.id
|
|
};
|
|
yield (0,_service_exercise__WEBPACK_IMPORTED_MODULE_1__/* .delayedTime */ .qz)(delayedParams);
|
|
}
|
|
const v = actionTabs == null ? void 0 : actionTabs.exerciseParams;
|
|
(0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .startExercise */ .nr)({
|
|
inner_ip: v.inner_ip,
|
|
public_ip: v.public_ip,
|
|
open_camera: v.open_camera,
|
|
ip_limit: v.ip_limit,
|
|
ip_bind: v.ip_bind,
|
|
ip_bind_type: v.ip_bind_type,
|
|
exercise_tips: v.exercise_tips,
|
|
exerciseId: v.id,
|
|
screen_open: v.screen_open,
|
|
screen_num: v.screen_num,
|
|
screen_sec: v.screen_sec,
|
|
coursesId: params.coursesId,
|
|
login: (_g = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_6__/* .userInfo */ .eY)()) == null ? void 0 : _g.login,
|
|
history,
|
|
identity_verify: v.identity_verify,
|
|
open_phone_video_recording: v.open_phone_video_recording,
|
|
current_status: v.current_status
|
|
});
|
|
dispatch({
|
|
type: "exercise/setActionTabs",
|
|
payload: {}
|
|
});
|
|
}
|
|
setIsLoading(false);
|
|
});
|
|
const columns = [
|
|
{
|
|
title: "IP\u5730\u5740",
|
|
dataIndex: "ip",
|
|
key: "ip",
|
|
render: (text) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: text.indexOf("\u5F02\u5E38") > -1 ? "c-red" : "c-green" }, text)
|
|
},
|
|
{
|
|
title: "\u6D4F\u89C8\u5668",
|
|
dataIndex: "browser",
|
|
key: "browser",
|
|
render: (text) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: text.indexOf("\u5F02\u5E38") > -1 ? "c-red" : "c-green" }, text)
|
|
},
|
|
{
|
|
title: "\u4E0A\u6B21\u767B\u5F55\u65F6\u95F4",
|
|
dataIndex: "last_login_time",
|
|
key: "last_login_time"
|
|
}
|
|
];
|
|
const hasError5 = ((_a = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _a.errorMessage) && typeof ((_b = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _b.errorMessage) === "object";
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_9__["default"],
|
|
{
|
|
width: 514,
|
|
centered: true,
|
|
closable: !!((_c = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _c.unlockClose),
|
|
maskClosable: false,
|
|
keyboard: false,
|
|
maskStyle: { background: "#000" },
|
|
title: "\u63D0\u793A",
|
|
open: exercise.actionTabs.key === "student-unlock",
|
|
footer: null,
|
|
onCancel: () => {
|
|
dispatch({
|
|
type: "exercise/setActionTabs",
|
|
payload: {}
|
|
});
|
|
}
|
|
},
|
|
hasError5 && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { style: { marginBottom: 16 } }, "\u8BE5\u8D26\u53F7\u5DF2\u7ECF\u5B58\u5728\u5F02\u5E38\u60C5\u51B5\uFF0C\u82E5\u975E\u672C\u4EBA\u64CD\u4F5C\uFF0C\u8BF7\u8054\u7CFB\u76D1\u8003\u8001\u5E08\u8BF4\u660E\u60C5\u51B5\u3002 "),
|
|
!hasError5 && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { style: { marginBottom: 16 } }, "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u5728\u8003\u8BD5\u65F6\u4E2D\u9014\u9000\u51FA\uFF0C\u73B0\u5DF2\u5C06\u8003\u8BD5\u9501\u5B9A\u3002\u5982\u9700\u7EE7\u7EED\u8FDB\u884C\u8003\u8BD5\uFF0C \u8BF7\u5C3D\u5FEB\u8054\u7CFB\u8BFE\u5802\u8001\u5E08\u8FDB\u884C\u89E3\u9501\uFF01"),
|
|
hasError5 && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_10__["default"], { className: "mb20", pagination: { hideOnSinglePage: true }, dataSource: [((_d = actionTabs == null ? void 0 : actionTabs.exerciseParams) == null ? void 0 : _d.errorMessage) || {}], columns }),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
{
|
|
form,
|
|
layout: "vertical",
|
|
autoComplete: "off"
|
|
},
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_8__["default"].Item, { label: "\u8003\u8BD5\u89E3\u9501\u7801", name: "unlock_key", rules: [{ required: true, message: "\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801" }] }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_11__["default"].Password, { autoComplete: "off", placeholder: "\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801", visibilityToggle: false }))
|
|
)),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { justify: "space-between", align: "middle" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, null), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP, { loading: isLoading, onClick: handleOk }, "\u8FDB\u5165\u8003\u8BD5")))
|
|
));
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_3__.connect)(
|
|
({ exercise }) => ({
|
|
exercise
|
|
})
|
|
)(Unlock));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 43195:
|
|
/*!****************************************************!*\
|
|
!*** ./src/pages/MyProblem/index.tsx + 14 modules ***!
|
|
\****************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ MyProblem; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/FormOutlined.js + 1 modules
|
|
var FormOutlined = __webpack_require__(23333);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/PoweroffOutlined.js + 1 modules
|
|
var PoweroffOutlined = __webpack_require__(23742);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/statistic/index.js + 5 modules
|
|
var statistic = __webpack_require__(31797);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
var es_select = __webpack_require__(57809);
|
|
// EXTERNAL MODULE: ./src/pages/MyProblem/service.ts
|
|
var service = __webpack_require__(29128);
|
|
// EXTERNAL MODULE: ./src/service/exercise.ts
|
|
var exercise = __webpack_require__(53669);
|
|
// EXTERNAL MODULE: ./src/utils/fullscreen.ts
|
|
var fullscreen = __webpack_require__(91676);
|
|
// EXTERNAL MODULE: ./src/components/SplitContainer/index.tsx + 1 modules
|
|
var SplitContainer = __webpack_require__(70225);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(19351);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
var ExclamationCircleOutlined = __webpack_require__(6246);
|
|
// EXTERNAL MODULE: ./src/pages/Problems/OjForm/CodePanel/index.tsx + 1 modules
|
|
var CodePanel = __webpack_require__(48458);
|
|
// EXTERNAL MODULE: ./src/pages/tasks/code-repository/action-bar/notice.gif
|
|
var notice = __webpack_require__(60141);
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
var base64 = __webpack_require__(24334);
|
|
// EXTERNAL MODULE: ./src/pages/Problems/OjForm/index.less?modules
|
|
var OjFormmodules = __webpack_require__(654);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/index.less
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
// EXTERNAL MODULE: ./src/pages/MyProblem/TestCasePanel/index.tsx + 1 modules
|
|
var TestCasePanel = __webpack_require__(43459);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var LeftPanelmodules = ({"flex_box_center":"flex_box_center___rM3g8","flex_space_between":"flex_space_between___Oc7SE","flex_box_vertical_center":"flex_box_vertical_center___MnmYE","flex_box_center_end":"flex_box_center_end___QQh83","flex_box_column":"flex_box_column___ZRFbL","left-panel":"left-panel___SKGyd","tab-panel-body":"tab-panel-body___gABdv","b1":"b1___QpbmK","oj-width-input":"oj-width-input___eJQWT","oj-mr":"oj-mr___AxILO","s-navs":"s-navs___FXwOi","bg-white":"bg-white___kbZ6r","active":"active___QGOnZ","list":"list___PXTsq","btns":"btns___F8yZK","drawer":"drawer___xdGaT"});
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/SubmitList/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var SubmitListmodules = ({"pagination":"pagination___yDAjZ","info":"info___ATmsa","wrap":"wrap____KX19"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(86383);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(36697);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
var LoadingOutlined = __webpack_require__(45161);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CopyOutlined.js + 1 modules
|
|
var CopyOutlined = __webpack_require__(29117);
|
|
// EXTERNAL MODULE: ./src/pages/MyProblem/interface.ts
|
|
var MyProblem_interface = __webpack_require__(54590);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(75798);
|
|
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
|
|
var PreviewAll = __webpack_require__(95391);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var utils_fetch = __webpack_require__(64841);
|
|
// EXTERNAL MODULE: ./node_modules/_xterm@4.8.1@xterm/lib/xterm.js
|
|
var xterm = __webpack_require__(34376);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/SubmitList/index.tsx
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { Column } = table["default"];
|
|
/* harmony default export */ var SubmitList = (({
|
|
submitResult,
|
|
submitting,
|
|
submitRecords,
|
|
page,
|
|
onPageChange,
|
|
topicId
|
|
}) => {
|
|
const {
|
|
status,
|
|
id,
|
|
input,
|
|
output,
|
|
expected_output,
|
|
is_file,
|
|
input_file_url,
|
|
output_file_url,
|
|
expected_output_file_url,
|
|
error_msg
|
|
} = submitResult || {};
|
|
const outputRef = (0,_react_17_0_2_react.useRef)();
|
|
const inputRef = (0,_react_17_0_2_react.useRef)();
|
|
const openTerm = (0,_react_17_0_2_react.useRef)(false);
|
|
const errormsgRef = (0,_react_17_0_2_react.useRef)();
|
|
const expectedOutputRef = (0,_react_17_0_2_react.useRef)();
|
|
const term = (0,_react_17_0_2_react.useRef)(new xterm.Terminal({
|
|
fontSize: 14,
|
|
letterSpacing: 0,
|
|
cols: Math.floor(window.innerWidth * 0.4 / 9),
|
|
rows: 6
|
|
}));
|
|
const term2 = (0,_react_17_0_2_react.useRef)(new xterm.Terminal({
|
|
fontSize: 14,
|
|
letterSpacing: 0,
|
|
cols: Math.floor(window.innerWidth * 0.4 / 9),
|
|
rows: 6
|
|
}));
|
|
const term3 = (0,_react_17_0_2_react.useRef)(new xterm.Terminal({
|
|
fontSize: 14,
|
|
letterSpacing: 0,
|
|
cols: Math.floor(window.innerWidth * 0.4 / 9),
|
|
rows: 6
|
|
}));
|
|
const term4 = (0,_react_17_0_2_react.useRef)(new xterm.Terminal({
|
|
fontSize: 14,
|
|
letterSpacing: 0,
|
|
cols: Math.floor(window.innerWidth * 0.4 / 9),
|
|
rows: 6
|
|
}));
|
|
const ulRef = (0,_react_17_0_2_react.useRef)();
|
|
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
|
|
const { records, records_count } = submitRecords || {};
|
|
const [data, setData] = (0,_react_17_0_2_react.useState)("");
|
|
const [monacoValue, setMonacoValue] = (0,_react_17_0_2_react.useState)("");
|
|
const location = (0,_umi_production_exports.useLocation)();
|
|
const isProgram = searchParams.get("type") === "1";
|
|
function onCopy() {
|
|
if (!is_file) {
|
|
navigator.clipboard.writeText(base64.Base64.decode(output)).then(() => {
|
|
message/* default */.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F");
|
|
});
|
|
} else {
|
|
navigator.clipboard.writeText(base64.Base64.decode(error_msg)).then(() => {
|
|
message/* default */.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F");
|
|
});
|
|
}
|
|
}
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (output && !is_file && status !== MyProblem_interface/* ExecuteStatus */.h.OK && id && outputRef.current) {
|
|
if (!openTerm.current)
|
|
term.current.open(outputRef.current);
|
|
const actual_output_format = (0,util/* findEndWhitespace */.pp)(base64.Base64.decode(output));
|
|
term.current.reset();
|
|
term.current.write(actual_output_format);
|
|
setTimeout(() => {
|
|
openTerm.current = true;
|
|
}, 100);
|
|
window.terms = term;
|
|
window.outputs = base64.Base64.decode(output);
|
|
term.current.setOption("theme", {
|
|
background: "#fafafa",
|
|
foreground: "#333"
|
|
});
|
|
}
|
|
if (input && !is_file && status !== MyProblem_interface/* ExecuteStatus */.h.OK && id && inputRef.current) {
|
|
if (!openTerm.current)
|
|
term2.current.open(inputRef.current);
|
|
term2.current.reset();
|
|
term2.current.write((0,util/* findEndWhitespace */.pp)(input));
|
|
term2.current.setOption("theme", {
|
|
background: "#fafafa",
|
|
foreground: "#333"
|
|
});
|
|
}
|
|
if (expected_output && !is_file && status !== MyProblem_interface/* ExecuteStatus */.h.OK && id) {
|
|
if (!openTerm.current)
|
|
term3.current.open(expectedOutputRef.current);
|
|
term3.current.reset();
|
|
term3.current.write((0,util/* findEndWhitespace */.pp)(base64.Base64.decode(expected_output)));
|
|
term3.current.setOption("theme", {
|
|
background: "#fafafa",
|
|
selection: "#fff",
|
|
foreground: "#333"
|
|
});
|
|
}
|
|
if (errormsgRef.current) {
|
|
if (!openTerm.current)
|
|
term4.current.open(errormsgRef.current);
|
|
term4.current.write((0,util/* findEndWhitespace */.pp)(base64.Base64.decode(error_msg)));
|
|
term4.current.reset();
|
|
term4.current.setOption("theme", {
|
|
background: "#fafafa",
|
|
selection: "#fff",
|
|
foreground: "#333"
|
|
});
|
|
}
|
|
}, [output, error_msg, expected_output, input]);
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
spin/* default */.Z,
|
|
{
|
|
spinning: submitting,
|
|
tip: "\u8BC4\u6D4B\u4E2D...",
|
|
indicator: /* @__PURE__ */ _react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, { style: { fontSize: 24 }, spin: true })
|
|
},
|
|
id ? /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: SubmitListmodules.wrap }, /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { ref: ulRef, className: SubmitListmodules.info }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u6267\u884C\u7ED3\u679C\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"span",
|
|
{
|
|
className: status === MyProblem_interface/* ExecuteStatus */.h.OK ? "c-green" : "c-red"
|
|
},
|
|
TestCasePanel/* ExecuteDict */.Im[status]
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement("li", { className: SubmitListmodules.error }, /* @__PURE__ */ _react_17_0_2_react.createElement("a", { onClick: onCopy }, "\u590D\u5236\u9519\u8BEF\u4FE1\u606F ", /* @__PURE__ */ _react_17_0_2_react.createElement(CopyOutlined/* default */.Z, null), " ")), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement(_umi_production_exports.Link, { to: `/myproblems/${topicId}/record-detail/${id}` }, "\u663E\u793A\u8BE6\u60C5 >", " "))), status !== MyProblem_interface/* ExecuteStatus */.h.OK ? /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "c-red" }, "\u5B9E\u9645\u8F93\u5165\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("pre", null, !is_file && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { ref: inputRef }), is_file && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
style: { fontSize: "16px" },
|
|
onClick: () => __async(void 0, null, function* () {
|
|
const res = yield fetch(input_file_url, {
|
|
method: "Get",
|
|
headers: {
|
|
"Content-Type": "application/octet-stream",
|
|
"Accept": "*/*"
|
|
}
|
|
});
|
|
setMonacoValue(yield res.text());
|
|
setTimeout(() => {
|
|
setData(input_file_url);
|
|
}, 200);
|
|
})
|
|
},
|
|
input
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "c-red" }, "\u5B9E\u9645\u8F93\u51FA\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("pre", null, (status === 4 || status === 5) && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { ref: errormsgRef }), status != 4 && status != 5 && (is_file ? /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
style: { fontSize: "16px" },
|
|
onClick: () => __async(void 0, null, function* () {
|
|
const res = yield (0,utils_fetch/* default */.ZP)(output_file_url, {
|
|
method: "Get",
|
|
headers: {
|
|
"Content-Type": "application/xml",
|
|
"Accept": "*/*"
|
|
}
|
|
});
|
|
try {
|
|
setMonacoValue(res);
|
|
} catch (e) {
|
|
setMonacoValue("");
|
|
}
|
|
setTimeout(() => {
|
|
setData(output_file_url);
|
|
}, 200);
|
|
})
|
|
},
|
|
output
|
|
) : /* @__PURE__ */ _react_17_0_2_react.createElement("div", { ref: outputRef }))), /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "c-red" }, "\u9884\u671F\u8F93\u51FA\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("pre", null, !is_file && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { ref: expectedOutputRef }), is_file && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
style: { fontSize: "16px" },
|
|
onClick: () => __async(void 0, null, function* () {
|
|
const res = yield fetch(expected_output_file_url, {
|
|
method: "Get",
|
|
headers: {
|
|
"Content-Type": "application/octet-stream",
|
|
"Accept": "*/*"
|
|
}
|
|
});
|
|
setMonacoValue(yield res.text());
|
|
setTimeout(() => {
|
|
setData(expected_output_file_url);
|
|
}, 200);
|
|
})
|
|
},
|
|
expected_output
|
|
))) : null) : null,
|
|
(records == null ? void 0 : records.length) > 0 ? /* @__PURE__ */ _react_17_0_2_react.createElement(table["default"], { dataSource: records, rowKey: "id", pagination: false }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Column,
|
|
{
|
|
title: "\u63D0\u4EA4\u65F6\u95F4",
|
|
dataIndex: "created_at",
|
|
key: "created_at",
|
|
render: (text, record) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, " ", dayjs_min_default()(text).format("YYYY-MM-DD HH:mm:ss"))
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Column,
|
|
{
|
|
title: "\u63D0\u4EA4\u7ED3\u679C",
|
|
dataIndex: "status",
|
|
key: "status",
|
|
render: (text, record) => {
|
|
var _a;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
className: text === 0 ? "c-green" : "c-red",
|
|
to: `/myproblems/${topicId}/record-detail/${record.id}`
|
|
},
|
|
(_a = TestCasePanel/* ExecuteDict */.Im[text]) == null ? void 0 : _a.replace("\u8C03\u8BD5", "\u8BC4\u6D4B")
|
|
);
|
|
}
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Column,
|
|
{
|
|
title: `\u6267\u884C\u7528\u65F6 (${isProgram ? "MS" : "S"})`,
|
|
dataIndex: "execute_time",
|
|
key: "execute_time",
|
|
render: (e) => e ? isProgram ? e : e / 1e3 : ""
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Column,
|
|
{
|
|
title: `\u5185\u5B58\u6D88\u8017\uFF08${isProgram ? "KB" : "MB"}\uFF09`,
|
|
dataIndex: "execute_memory",
|
|
key: "execute_memory",
|
|
render: (e) => e ? isProgram ? e : parseFloat((e / 1024).toFixed(2)) : ""
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(Column, { title: "\u8BED\u8A00", dataIndex: "language", key: "language" }), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Column,
|
|
{
|
|
title: "\u64CD\u4F5C",
|
|
dataIndex: "status",
|
|
key: "status",
|
|
render: (text, record) => /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
className: "c-light-primary",
|
|
to: `/myproblems/${topicId}/record-detail/${record.id}`
|
|
},
|
|
"\u67E5\u770B"
|
|
)
|
|
}
|
|
)) : /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { height: 300, width: "100%" } }),
|
|
records_count > 15 ? /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
pagination/* default */.Z,
|
|
{
|
|
className: SubmitListmodules.pagination,
|
|
current: page,
|
|
pageSize: 15,
|
|
total: records_count,
|
|
onChange: onPageChange
|
|
}
|
|
) : null,
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
PreviewAll/* default */.Z,
|
|
{
|
|
close: true,
|
|
data,
|
|
type: !!data.length ? "txt" : "",
|
|
onClose: () => setData(""),
|
|
monacoEditor: {
|
|
value: monacoValue,
|
|
language: "txt",
|
|
onChange: () => {
|
|
},
|
|
options: {
|
|
fontSize: 14,
|
|
readOnly: true,
|
|
minimap: {
|
|
enabled: false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
)
|
|
);
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(46948);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tag/index.js + 5 modules
|
|
var tag = __webpack_require__(12563);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules
|
|
var space = __webpack_require__(81327);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Description/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Descriptionmodules = ({"desc":"desc___iOAgd","info":"info___GPALq","commit-info":"commit-info___Hk6Za"});
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
|
|
var RenderHtml = __webpack_require__(92936);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Description/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
const DifficultDesc = {
|
|
1: {
|
|
name: "\u7B80\u5355",
|
|
color: "#52c41a"
|
|
},
|
|
2: {
|
|
name: "\u4E2D\u7B49",
|
|
color: "#faad14"
|
|
},
|
|
3: {
|
|
name: "\u56F0\u96BE",
|
|
color: "#f5222d"
|
|
}
|
|
};
|
|
/* harmony default export */ var Description = (({ hack, onTriggerPraise, toDiscuss }) => {
|
|
const { language, difficult, time_limit, username, user_path, user_praise, comments_count, praises_count, description, pass_count, submit_count } = hack;
|
|
const location = (0,_umi_production_exports.useLocation)();
|
|
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
|
|
const diffItem = DifficultDesc[difficult];
|
|
console.log("----description", hack);
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Descriptionmodules.info }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u7F16\u7A0B\u8BED\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, language)), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u96BE\u5EA6\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement(tag["default"], { color: diffItem.color }, diffItem.name)), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, time_limit, "\u79D2"))), searchParams.get("qtype") === "8" ? /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { value: description, showProgramFill: true, className: Descriptionmodules.desc }) : /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { value: description, className: Descriptionmodules.desc }), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Descriptionmodules["commit-info"] }, searchParams.get("type") === "1" || searchParams.get("type") === "exercises" ? "" : /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement(space/* default */.Z, { size: 4 }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u901A\u8FC7\u6B21\u6570"), " ", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, pass_count))), searchParams.get("type") === "1" || searchParams.get("type") === "exercises" ? "" : /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement(space/* default */.Z, { size: 4 }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u63D0\u4EA4\u6B21\u6570"), " ", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, submit_count)), " "), /* @__PURE__ */ _react_17_0_2_react.createElement("li", { style: { flex: "1 0 0" } }), searchParams.get("type") !== "exercises" && /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement(space/* default */.Z, { size: 4 }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-huifu1", onClick: toDiscuss }), " ", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, comments_count)), " ")));
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
var mediator = __webpack_require__(50993);
|
|
// EXTERNAL MODULE: ./src/components/modal.tsx
|
|
var components_modal = __webpack_require__(9805);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Discuss/index.less
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Discuss/service.ts
|
|
|
|
function getComments(id, page) {
|
|
return (0,utils_fetch/* get */.U2)(`/problems/${id}/comments.json`, {
|
|
page,
|
|
limit: 10
|
|
});
|
|
}
|
|
function plusDiscuss(id) {
|
|
return (0,utils_fetch/* post */.v_)(`/discusses/${id}/plus.json`, {
|
|
container_type: "Discuss",
|
|
type: 1
|
|
});
|
|
}
|
|
function replyDiscuss(identifier, id, value) {
|
|
return (0,utils_fetch/* post */.v_)(`/problems/${identifier}/comments/reply.json`, {
|
|
comments: {
|
|
content: value,
|
|
parent_id: id
|
|
}
|
|
});
|
|
}
|
|
function createDiscuss(identifier, value) {
|
|
return (0,utils_fetch/* post */.v_)(`/problems/${identifier}/comments.json`, {
|
|
comments: {
|
|
content: value
|
|
}
|
|
});
|
|
}
|
|
function hiddenDiscuss(identifier, id, params) {
|
|
return (0,utils_fetch/* post */.v_)(`/problems/${identifier}/comments/${id}/hidden.json`, params);
|
|
}
|
|
function deleteDiscuss(identifier, id) {
|
|
return (0,utils_fetch/* del */.IV)(`/problems/${identifier}/comments/${id}`);
|
|
}
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Discuss/discuss-item/index.less
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
// EXTERNAL MODULE: ./src/pages/tasks/left-panel/discuss/discuss-editor/index.tsx + 1 modules
|
|
var discuss_editor = __webpack_require__(5695);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Discuss/discuss-item/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
function UserPhoto({ author }) {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("a", { href: `/users/${author.login}`, target: "_blank" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"img",
|
|
{
|
|
alt: "\u7528\u6237\u5934\u50CF",
|
|
height: "50",
|
|
style: { borderRadius: "50%" },
|
|
src: `${env/* default */.Z.IMG_SERVER}/images/${author.image_url}`,
|
|
width: "50"
|
|
}
|
|
));
|
|
}
|
|
function SecondLevelDiscuss({
|
|
data,
|
|
index,
|
|
parentDiscussIndex,
|
|
user,
|
|
onSetActionType
|
|
}) {
|
|
const { author, can_delete, content, id, time } = data;
|
|
function onDeleteDiscuss() {
|
|
onSetActionType({
|
|
id,
|
|
index,
|
|
type: "delete-discuss",
|
|
parentDiscussIndex,
|
|
message: "\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"
|
|
});
|
|
}
|
|
const canDelete = user.admin || can_delete || author.user_id === user.user_id;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "discuss-item-container second-discuss " }, /* @__PURE__ */ _react_17_0_2_react.createElement(UserPhoto, { author }), /* @__PURE__ */ _react_17_0_2_react.createElement("section", null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "discuss-info" }, /* @__PURE__ */ _react_17_0_2_react.createElement("a", { href: `/users/${author.login}`, target: "_blank" }, author.name), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "grey" }, time), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "btn-group", style: { marginBottom: 0 } }, canDelete ? /* @__PURE__ */ _react_17_0_2_react.createElement("a", { onClick: onDeleteDiscuss, title: "\u5220\u9664" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-shanchu" })) : null)), /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { className: "discuss-content", value: content })));
|
|
}
|
|
/* harmony default export */ var discuss_item = (({
|
|
user,
|
|
data,
|
|
index,
|
|
onPlusDiscuss,
|
|
onSetActionType,
|
|
activeDiscussIndex,
|
|
onReplyDiscuss,
|
|
onSetActiveDiscussIndex
|
|
}) => {
|
|
const {
|
|
content,
|
|
children,
|
|
hidden,
|
|
id,
|
|
praise_count,
|
|
time,
|
|
user_praise,
|
|
can_delete,
|
|
author
|
|
} = data;
|
|
function onActiveDiscussIndex() {
|
|
onSetActiveDiscussIndex(id);
|
|
}
|
|
function onPlus() {
|
|
onPlusDiscuss(id, !user_praise, index);
|
|
}
|
|
function onDeleteDiscuss() {
|
|
onSetActionType({
|
|
id,
|
|
index,
|
|
type: "delete-discuss",
|
|
message: "\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"
|
|
});
|
|
}
|
|
function onHiddenDiscuss() {
|
|
onSetActionType({
|
|
id,
|
|
index,
|
|
params: { hidden: !hidden ? "1" : "0" },
|
|
type: "hidden-discuss",
|
|
message: !hidden ? "\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417" : "\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"
|
|
});
|
|
}
|
|
const adminOrOperator = user.admin || user.user_id === author.user_id;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "discuss-item-container", key: id }, /* @__PURE__ */ _react_17_0_2_react.createElement(UserPhoto, { author }), /* @__PURE__ */ _react_17_0_2_react.createElement("section", null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "discuss-info" }, /* @__PURE__ */ _react_17_0_2_react.createElement("a", { href: `/users/${author.login}`, target: "_blank" }, " ", author.name, " "), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "grey" }, time)), /* @__PURE__ */ _react_17_0_2_react.createElement(RenderHtml/* default */.Z, { className: "discuss-content", value: content }), children && children.length > 0 ? /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "reply-discuss-container" }, children.map((item, i) => /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
SecondLevelDiscuss,
|
|
{
|
|
key: item.id,
|
|
data: item,
|
|
index: i,
|
|
user,
|
|
onSetActionType,
|
|
parentDiscussIndex: index
|
|
}
|
|
))) : null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "btn-group" }, adminOrOperator ? /* @__PURE__ */ _react_17_0_2_react.createElement("a", { onClick: onHiddenDiscuss, title: hidden ? "\u53D6\u6D88\u9690\u85CF" : "\u9690\u85CF\u8BC4\u8BBA" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: hidden ? "iconfont icon-yincangbiyan" : "fa fa-eye" })) : null, can_delete && (!children || children.length == 0) ? /* @__PURE__ */ _react_17_0_2_react.createElement("a", { onClick: onDeleteDiscuss, title: "\u5220\u9664" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-shanchu" })) : null, /* @__PURE__ */ _react_17_0_2_react.createElement("a", { onClick: onActiveDiscussIndex, title: "\u56DE\u590D" }, " ", /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-huifu1" }), " "), /* @__PURE__ */ _react_17_0_2_react.createElement("a", { onClick: onPlus, className: user_praise ? "c-orange" : "" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"i",
|
|
{
|
|
className: user_praise ? "iconfont icon-dianzan mr3" : "iconfont icon-dianzan-xian mr3 "
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, praise_count ? praise_count : ""))), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
discuss_editor/* default */.Z,
|
|
{
|
|
id,
|
|
activeDiscussIndex,
|
|
onReplyDiscuss
|
|
}
|
|
)));
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./src/components/image-preview/index.tsx + 1 modules
|
|
var image_preview = __webpack_require__(35894);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Discuss/discuss-input-editor/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var discuss_input_editormodules = ({"dis-input-editor-container":"dis-input-editor-container___nKGxx","active":"active___tmt7T","input-mask":"input-mask___epEle","text-area":"text-area___Vry8W","tip-container":"tip-container___plpA3","hide":"hide___kPfyC","md-container":"md-container___u85aq","btn-send":"btn-send___deQ5v"});
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 15 modules
|
|
var markdown_editor = __webpack_require__(16393);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Discuss/discuss-input-editor/index.tsx
|
|
var discuss_input_editor_async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
/* harmony default export */ var discuss_input_editor = (({ user_praise, praise_count, praisePlus, onCreateDiscuss, discuss_count }) => {
|
|
const [showMd, setShowMd] = (0,_react_17_0_2_react.useState)(false);
|
|
const [value, setValue] = (0,_react_17_0_2_react.useState)("");
|
|
function onChangeHandler(v) {
|
|
setValue(v);
|
|
}
|
|
function onShowMd() {
|
|
setShowMd(true);
|
|
}
|
|
function onCancel() {
|
|
setShowMd(false);
|
|
}
|
|
function onCommit() {
|
|
return discuss_input_editor_async(this, null, function* () {
|
|
onCreateDiscuss(value);
|
|
setValue("");
|
|
setShowMd(false);
|
|
});
|
|
}
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${discuss_input_editormodules["dis-input-editor-container"]} ${showMd ? discuss_input_editormodules.active : ""} ` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: showMd ? `hide ${discuss_input_editormodules["text-area"]}` : discuss_input_editormodules["text-area"] }, /* @__PURE__ */ _react_17_0_2_react.createElement("input", { placeholder: "\u8BF4\u70B9\u4EC0\u4E48", onClick: onShowMd }), /* @__PURE__ */ _react_17_0_2_react.createElement("a", null, " ", /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-huifu1" }), " \xA0 \xA0", discuss_count, " "), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
className: "c-light-black",
|
|
onClick: praisePlus,
|
|
title: user_praise ? "\u53D6\u6D88\u70B9\u8D5E" : "\u70B9\u8D5E"
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"i",
|
|
{
|
|
className: `mr3 ${user_praise ? "iconfont icon-dianzan c-orange" : "iconfont icon-dianzan-xian"} `
|
|
}
|
|
),
|
|
praise_count ? /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, praise_count) : ""
|
|
)), showMd ? /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: discuss_input_editormodules["input-mask"], onClick: onCancel }) : null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: showMd ? discuss_input_editormodules["md-container"] : `${discuss_input_editormodules["md-container"]} hide` }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
markdown_editor/* default */.Z,
|
|
{
|
|
id: "discuss-input-editor",
|
|
miniToolbar: true,
|
|
watch: false,
|
|
noStorage: true,
|
|
defaultValue: value,
|
|
height: 240,
|
|
onChange: onChangeHandler
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: discuss_input_editormodules["tip-container"], onClick: onCancel }, /* @__PURE__ */ _react_17_0_2_react.createElement("a", { className: discuss_input_editormodules["btn-send"], onClick: onCommit }, " \u53D1\u9001 "))));
|
|
});
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/Discuss/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
var Discuss_async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const initialState = {
|
|
loading: false,
|
|
page: 1,
|
|
data: [],
|
|
count: 0,
|
|
actionType: null,
|
|
activeDiscussIndex: null
|
|
};
|
|
var Types = /* @__PURE__ */ ((Types2) => {
|
|
Types2[Types2["GET_DISCUSSES"] = 0] = "GET_DISCUSSES";
|
|
Types2[Types2["TOP_OR_DOWN_DISCUSS"] = 1] = "TOP_OR_DOWN_DISCUSS";
|
|
Types2[Types2["ACTIVE_DISCUSS_INDEX"] = 2] = "ACTIVE_DISCUSS_INDEX";
|
|
Types2[Types2["PLUS_DISCUSS"] = 3] = "PLUS_DISCUSS";
|
|
Types2[Types2["SET_ACTION_TYPE"] = 4] = "SET_ACTION_TYPE";
|
|
Types2[Types2["SET_PAGE"] = 5] = "SET_PAGE";
|
|
Types2[Types2["SHOW_DISCUSSES_LOADING"] = 6] = "SHOW_DISCUSSES_LOADING";
|
|
return Types2;
|
|
})(Types || {});
|
|
function reducer(state, action) {
|
|
switch (action.type) {
|
|
case 6 /* SHOW_DISCUSSES_LOADING */:
|
|
return __spreadProps(__spreadValues({}, state), { loading: true });
|
|
case 0 /* GET_DISCUSSES */:
|
|
return __spreadValues(__spreadValues({}, state), action.payload);
|
|
case 1 /* TOP_OR_DOWN_DISCUSS */:
|
|
return __spreadValues(__spreadValues({}, state), action.payload);
|
|
case 4 /* SET_ACTION_TYPE */:
|
|
return __spreadValues(__spreadValues({}, state), action.payload);
|
|
case 3 /* PLUS_DISCUSS */:
|
|
return __spreadValues(__spreadValues({}, state), action.payload);
|
|
case 5 /* SET_PAGE */:
|
|
return __spreadProps(__spreadValues({}, state), { page: action.payload });
|
|
case 2 /* ACTIVE_DISCUSS_INDEX */:
|
|
return __spreadValues(__spreadValues({}, state), action.payload);
|
|
default:
|
|
throw new Error();
|
|
}
|
|
}
|
|
/* harmony default export */ var Discuss = (({ user, identifier, hack, onTriggerPraise }) => {
|
|
const [state, dispatch] = (0,_react_17_0_2_react.useReducer)(reducer, initialState);
|
|
const { loading, page, data, count, actionType, activeDiscussIndex } = state;
|
|
const initData = (0,_react_17_0_2_react.useCallback)(() => Discuss_async(void 0, null, function* () {
|
|
dispatch({
|
|
type: 6 /* SHOW_DISCUSSES_LOADING */
|
|
});
|
|
const response = yield getComments(identifier, page);
|
|
const { comments, disscuss_count } = response;
|
|
dispatch({
|
|
type: 0 /* GET_DISCUSSES */,
|
|
payload: {
|
|
data: comments,
|
|
count: disscuss_count,
|
|
loading: false
|
|
}
|
|
});
|
|
}), [page, identifier]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
initData();
|
|
}, [identifier, page]);
|
|
function onPaginationChange(value) {
|
|
dispatch({
|
|
type: 5 /* SET_PAGE */,
|
|
payload: value
|
|
});
|
|
}
|
|
function onSetActionType(value) {
|
|
dispatch({
|
|
type: 4 /* SET_ACTION_TYPE */,
|
|
payload: {
|
|
actionType: value
|
|
}
|
|
});
|
|
}
|
|
function onSetActiveDiscussIndex(value) {
|
|
if (activeDiscussIndex === value) {
|
|
dispatch({
|
|
type: 2 /* ACTIVE_DISCUSS_INDEX */,
|
|
payload: {
|
|
activeDiscussIndex: null
|
|
}
|
|
});
|
|
} else {
|
|
dispatch({
|
|
type: 2 /* ACTIVE_DISCUSS_INDEX */,
|
|
payload: {
|
|
activeDiscussIndex: value
|
|
}
|
|
});
|
|
}
|
|
}
|
|
function onPlusDiscuss(id, user_praise, index) {
|
|
return Discuss_async(this, null, function* () {
|
|
try {
|
|
const response = yield plusDiscuss(id);
|
|
data[index].user_praise = user_praise;
|
|
data[index].praise_count = response.praise_count;
|
|
dispatch({
|
|
type: 3 /* PLUS_DISCUSS */,
|
|
payload: {
|
|
data: [...data]
|
|
}
|
|
});
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
});
|
|
}
|
|
function onProcessAction() {
|
|
return Discuss_async(this, null, function* () {
|
|
const { id, params, type, index, parentDiscussIndex } = actionType;
|
|
if (type === "hidden-discuss") {
|
|
yield hiddenDiscuss(identifier, id, params);
|
|
if (!parentDiscussIndex) {
|
|
data[index].hidden = params.hidden == 1 ? true : false;
|
|
} else {
|
|
data[parentDiscussIndex].children[index].hidden = params.hidden == 1 ? true : false;
|
|
}
|
|
dispatch({
|
|
type: 4 /* SET_ACTION_TYPE */,
|
|
payload: {
|
|
actionType: null,
|
|
data: [...data]
|
|
}
|
|
});
|
|
}
|
|
if (type === "delete-discuss") {
|
|
yield deleteDiscuss(identifier, id);
|
|
if (parentDiscussIndex || parentDiscussIndex === 0) {
|
|
let secondDicusses = data[parentDiscussIndex].children;
|
|
for (let i = secondDicusses.length - 1; i >= 0; i--) {
|
|
if (secondDicusses[i].id === id) {
|
|
secondDicusses.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
data[parentDiscussIndex].children = secondDicusses;
|
|
} else {
|
|
for (let i = data.length - 1; i >= 0; i--) {
|
|
if (data[i].id === id) {
|
|
data.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
dispatch({
|
|
type: 4 /* SET_ACTION_TYPE */,
|
|
payload: {
|
|
actionType: null,
|
|
data: [...data]
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function onCancelAction() {
|
|
dispatch({
|
|
type: 4 /* SET_ACTION_TYPE */,
|
|
payload: {
|
|
actionType: null
|
|
}
|
|
});
|
|
}
|
|
function onReplyDiscuss(id, value) {
|
|
return Discuss_async(this, null, function* () {
|
|
try {
|
|
yield replyDiscuss(identifier, id, value);
|
|
initData();
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
});
|
|
}
|
|
function onCreateDiscuss(value) {
|
|
return Discuss_async(this, null, function* () {
|
|
dispatch({
|
|
type: 6 /* SHOW_DISCUSSES_LOADING */
|
|
});
|
|
yield createDiscuss(identifier, value);
|
|
initData();
|
|
});
|
|
}
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "discuss-panel" }, data.length === 0 ? /* @__PURE__ */ _react_17_0_2_react.createElement(NoData/* default */.Z, null) : data.map((item, index) => /* @__PURE__ */ _react_17_0_2_react.createElement(discuss_item, { onReplyDiscuss, onPlusDiscuss, onSetActiveDiscussIndex, onSetActionType, data: item, index, user, activeDiscussIndex })), count > 10 ? /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "pagination-container" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
pagination/* default */.Z,
|
|
{
|
|
showQuickJumper: true,
|
|
onChange: onPaginationChange,
|
|
current: page,
|
|
total: count
|
|
}
|
|
)) : null), /* @__PURE__ */ _react_17_0_2_react.createElement(discuss_input_editor, { user_praise: hack.user_praise, praise_count: hack.praises_count, praisePlus: onTriggerPraise, discuss_count: hack.comments_count, onCreateDiscuss }), /* @__PURE__ */ _react_17_0_2_react.createElement(components_modal/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
modal["default"],
|
|
{
|
|
centered: true,
|
|
title: "\u63D0\u793A",
|
|
open: !!actionType,
|
|
onOk: onProcessAction,
|
|
onCancel: onCancelAction
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", null, actionType ? actionType.message : "")
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(image_preview/* default */.Z, null)));
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/drawer/index.js + 9 modules
|
|
var drawer = __webpack_require__(43428);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(20008);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/LeftPanel/index.tsx
|
|
var LeftPanel_defProp = Object.defineProperty;
|
|
var LeftPanel_defProps = Object.defineProperties;
|
|
var LeftPanel_getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var LeftPanel_getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var LeftPanel_hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var LeftPanel_propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var LeftPanel_defNormalProp = (obj, key, value) => key in obj ? LeftPanel_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var LeftPanel_spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (LeftPanel_hasOwnProp.call(b, prop))
|
|
LeftPanel_defNormalProp(a, prop, b[prop]);
|
|
if (LeftPanel_getOwnPropSymbols)
|
|
for (var prop of LeftPanel_getOwnPropSymbols(b)) {
|
|
if (LeftPanel_propIsEnum.call(b, prop))
|
|
LeftPanel_defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var LeftPanel_spreadProps = (a, b) => LeftPanel_defProps(a, LeftPanel_getOwnPropDescs(b));
|
|
var LeftPanel_async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const difficultyMapping = {
|
|
1: "\u7B80\u5355",
|
|
2: "\u9002\u4E2D",
|
|
3: "\u56F0\u96BE"
|
|
};
|
|
const difficultyMappingcolor = {
|
|
1: "#2fa34f",
|
|
2: "#0152d9",
|
|
3: "#fa6400"
|
|
};
|
|
/* harmony default export */ var LeftPanel = (({
|
|
hack,
|
|
onTriggerPraise,
|
|
topicId,
|
|
page,
|
|
onPageChange,
|
|
user,
|
|
submitRecords,
|
|
submitting,
|
|
submitResult
|
|
}) => {
|
|
var _a;
|
|
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
|
|
const [index, setIndex] = (0,_react_17_0_2_react.useState)("0");
|
|
const location = (0,_umi_production_exports.useLocation)();
|
|
const [isopen, setisopen] = (0,_react_17_0_2_react.useState)(false);
|
|
const [datas, setdatas] = (0,_react_17_0_2_react.useState)([]);
|
|
let [params, setparams] = (0,_react_17_0_2_react.useState)(LeftPanel_spreadProps(LeftPanel_spreadValues({}, (0,_umi_production_exports.useParams)()), {
|
|
page: 1,
|
|
per_page: 20,
|
|
name: ""
|
|
}));
|
|
function onTabIndexChange(e) {
|
|
let id = e.target.id;
|
|
setIndex(id);
|
|
}
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
const unSub = mediator/* default */.Z.subscribe("to-commit-info", () => {
|
|
setIndex("1");
|
|
});
|
|
return unSub;
|
|
}, []);
|
|
function toDiscuss() {
|
|
setIndex("2");
|
|
}
|
|
function getdatas() {
|
|
return LeftPanel_async(this, null, function* () {
|
|
let res = yield (0,utils_fetch/* default */.ZP)(`/api/problems/my_hack_list.json`, {
|
|
method: "get",
|
|
params: LeftPanel_spreadValues({
|
|
identifier: params == null ? void 0 : params.id
|
|
}, params)
|
|
});
|
|
setdatas(res);
|
|
});
|
|
}
|
|
console.log(submitRecords, "submitRecords");
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: LeftPanelmodules["left-panel"] }, /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: `${LeftPanelmodules["s-navs"]} ${LeftPanelmodules["bg-white"]} ${LeftPanelmodules.b1}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
className: index === "0" ? LeftPanelmodules.active : "",
|
|
id: "0",
|
|
onClick: onTabIndexChange
|
|
},
|
|
"\u4EFB\u52A1\u63CF\u8FF0"
|
|
)), searchParams.get("qtype") !== "8" && /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
className: index === "1" ? LeftPanelmodules.active : "",
|
|
id: "1",
|
|
onClick: onTabIndexChange
|
|
},
|
|
"\u63D0\u4EA4\u8BB0\u5F55"
|
|
)), searchParams.get("type") !== "exercises" && /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
className: index === "2" ? LeftPanelmodules.active : "",
|
|
id: "2",
|
|
onClick: onTabIndexChange
|
|
},
|
|
"\u8BC4\u8BBA"
|
|
))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${LeftPanelmodules["tab-panel-body"]} ${index === "0" ? "" : "hide"}` }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Description,
|
|
{
|
|
hack,
|
|
onTriggerPraise,
|
|
toDiscuss
|
|
}
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { padding: "0 12px" }, className: `${LeftPanelmodules["tab-panel-body"]} ${index === "1" ? "" : "hide"}` }, !!(submitRecords == null ? void 0 : submitRecords.records_count) || submitting ? /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
SubmitList,
|
|
{
|
|
page,
|
|
onPageChange,
|
|
topicId,
|
|
submitting,
|
|
key: (submitResult == null ? void 0 : submitResult.id) || 1,
|
|
submitRecords,
|
|
submitResult
|
|
}
|
|
) : /* @__PURE__ */ _react_17_0_2_react.createElement(NoData/* default */.Z, null)), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"div",
|
|
{
|
|
className: `${LeftPanelmodules["tab-panel-body"]} ${index === "2" ? "" : "hide"}`,
|
|
style: { padding: 0 }
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Discuss,
|
|
{
|
|
user,
|
|
identifier: hack.identifier,
|
|
hack,
|
|
onTriggerPraise
|
|
}
|
|
)
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(drawer/* default */.Z, { rootClassName: LeftPanelmodules.drawer, headerStyle: { background: "#000", border: 0 }, closable: false, title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#fff" } }, "\u9898\u76EE\u5217\u8868"), /* @__PURE__ */ _react_17_0_2_react.createElement(input["default"].Search, { onSearch: (e) => {
|
|
params.name = e;
|
|
params.page = 1;
|
|
setparams(LeftPanel_spreadValues({}, params));
|
|
getdatas();
|
|
}, style: { width: 180, margin: "0px 20px", marginLeft: "auto" }, placeholder: "\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22" }), /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"], { style: { width: 100 }, placeholder: "\u8BF7\u9009\u62E9\u96BE\u5EA6", onChange: (e) => {
|
|
params.page = 1;
|
|
params.difficult = e ? e : null;
|
|
setparams(LeftPanel_spreadValues({}, params));
|
|
getdatas();
|
|
} }, /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"].Option, { value: 0 }, "\u5168\u90E8"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"].Option, { value: 1 }, "\u7B80\u5355"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"].Option, { value: 2 }, "\u9002\u4E2D"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"].Option, { value: 3 }, "\u56F0\u96BE"))), bodyStyle: { background: "#0f1e31", padding: "20px 0px" }, footerStyle: { background: "#0f1e31", border: 0, textAlign: "center" }, footer: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
pagination/* default */.Z,
|
|
{
|
|
current: params.page,
|
|
className: "mt10 mb10",
|
|
hideOnSinglePage: true,
|
|
total: datas == null ? void 0 : datas.count,
|
|
pageSize: params.per_page,
|
|
onChange: (page2, perpage) => {
|
|
params.page = page2;
|
|
params.per_page = perpage;
|
|
getdatas();
|
|
}
|
|
}
|
|
)), width: 530, placement: "left", onClose: () => setisopen(false), open: isopen }, (_a = datas == null ? void 0 : datas.data) == null ? void 0 : _a.map((item, index2) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { onClick: () => LeftPanel_async(void 0, null, function* () {
|
|
let res = yield (0,utils_fetch/* default */.ZP)(`/api/problems/${item == null ? void 0 : item.identifier}/start.json`, {
|
|
method: "get",
|
|
params: {
|
|
hack_user_id: user == null ? void 0 : user.user_id
|
|
}
|
|
});
|
|
if (res) {
|
|
_umi_production_exports.history.replace(`/myproblems/${res == null ? void 0 : res.identifier}?type=1`);
|
|
window.location.reload();
|
|
}
|
|
}), className: `${LeftPanelmodules.list} ${(item == null ? void 0 : item.checked) ? LeftPanelmodules.active : ""}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, (item == null ? void 0 : item.opened) && (item == null ? void 0 : item.passed) && /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-wancheng1 c-green-29b" }), (item == null ? void 0 : item.opened) && !(item == null ? void 0 : item.passed) && /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-cuowu c-red" }), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "rgb(186, 196, 205)", fontWeight: 400, fontSize: 14, marginLeft: 10 } }, item.name)), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: difficultyMappingcolor[item.difficult] } }, difficultyMapping[item.difficult]));
|
|
})), (hack == null ? void 0 : hack.is_program) && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { onClick: () => {
|
|
getdatas();
|
|
setisopen(true);
|
|
}, className: LeftPanelmodules.btns }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-timuliebiao" }), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u9898\u76EE\u5217\u8868")));
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./src/assets/images/question/internal.png
|
|
var internal = __webpack_require__(62522);
|
|
// EXTERNAL MODULE: ./src/components/Exercise/ip.tsx
|
|
var Exercise_ip = __webpack_require__(40974);
|
|
// EXTERNAL MODULE: ./src/components/Timepiece/index.tsx
|
|
var Timepiece = __webpack_require__(73329);
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx
|
|
var Unlock = __webpack_require__(74198);
|
|
// EXTERNAL MODULE: ./src/utils/hooks/useRemindModal.tsx
|
|
var useRemindModal = __webpack_require__(52322);
|
|
// EXTERNAL MODULE: ./src/components/Exercise/recordScreen.tsx + 3 modules
|
|
var recordScreen = __webpack_require__(26077);
|
|
// EXTERNAL MODULE: ./src/components/Hooks/index.tsx
|
|
var Hooks = __webpack_require__(43275);
|
|
// EXTERNAL MODULE: ./src/assets/images/question/time.svg
|
|
var time = __webpack_require__(86210);
|
|
// EXTERNAL MODULE: ./src/assets/images/question/title.svg
|
|
var title = __webpack_require__(38246);
|
|
;// CONCATENATED MODULE: ./src/pages/MyProblem/index.tsx
|
|
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
|
|
var MyProblem_defProp = Object.defineProperty;
|
|
var MyProblem_defProps = Object.defineProperties;
|
|
var MyProblem_getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var MyProblem_getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var MyProblem_hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var MyProblem_propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var MyProblem_defNormalProp = (obj, key, value) => key in obj ? MyProblem_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var MyProblem_spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (MyProblem_hasOwnProp.call(b, prop))
|
|
MyProblem_defNormalProp(a, prop, b[prop]);
|
|
if (MyProblem_getOwnPropSymbols)
|
|
for (var prop of MyProblem_getOwnPropSymbols(b)) {
|
|
if (MyProblem_propIsEnum.call(b, prop))
|
|
MyProblem_defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var MyProblem_spreadProps = (a, b) => MyProblem_defProps(a, MyProblem_getOwnPropDescs(b));
|
|
var __objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (MyProblem_hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && MyProblem_getOwnPropSymbols)
|
|
for (var prop of MyProblem_getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && MyProblem_propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var MyProblem_async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { Countdown } = statistic["default"];
|
|
const LanguageSuf = {
|
|
"Java": "java",
|
|
"C": "c",
|
|
"Python": "py",
|
|
"C++": "c"
|
|
};
|
|
var MyProblem_Types = /* @__PURE__ */ ((Types2) => {
|
|
Types2[Types2["SET_LOADING"] = 0] = "SET_LOADING";
|
|
Types2[Types2["GET_DATA"] = 1] = "GET_DATA";
|
|
Types2[Types2["GET_SUBMIT_RECORDS"] = 2] = "GET_SUBMIT_RECORDS";
|
|
Types2[Types2["SET_DATA"] = 3] = "SET_DATA";
|
|
Types2[Types2["SET_DEBUGING"] = 4] = "SET_DEBUGING";
|
|
Types2[Types2["SET_SUBMITING"] = 5] = "SET_SUBMITING";
|
|
Types2[Types2["SET_EXECUTE_MESSAGE"] = 6] = "SET_EXECUTE_MESSAGE";
|
|
Types2[Types2["SET_EXECUTE_RESULT"] = 7] = "SET_EXECUTE_RESULT";
|
|
Types2[Types2["SET_SUBMIT_RESULT"] = 8] = "SET_SUBMIT_RESULT";
|
|
Types2[Types2["SET_SHOW_NOTE"] = 9] = "SET_SHOW_NOTE";
|
|
Types2[Types2["SET_PAGE"] = 10] = "SET_PAGE";
|
|
return Types2;
|
|
})(MyProblem_Types || {});
|
|
function getTimeStamp() {
|
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
}
|
|
const initalilState = {
|
|
loading: true,
|
|
data: void 0,
|
|
showNote: false,
|
|
debugResult: void 0,
|
|
submitResult: void 0,
|
|
debuging: false,
|
|
submitting: false,
|
|
submitRecords: void 0,
|
|
submitRecordPage: 1,
|
|
executingMessage: ""
|
|
};
|
|
function MyProblem_reducer(state, action) {
|
|
switch (action.type) {
|
|
case 1 /* GET_DATA */:
|
|
return MyProblem_spreadValues(MyProblem_spreadValues({}, state), action.payload);
|
|
case 3 /* SET_DATA */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { data: action.payload });
|
|
case 0 /* SET_LOADING */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { loading: action.payload });
|
|
case 9 /* SET_SHOW_NOTE */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { showNote: action.payload });
|
|
case 4 /* SET_DEBUGING */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { debuging: action.payload });
|
|
case 5 /* SET_SUBMITING */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { submitting: action.payload });
|
|
case 2 /* GET_SUBMIT_RECORDS */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { submitRecords: action.payload });
|
|
case 10 /* SET_PAGE */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { submitRecordPage: action.payload });
|
|
case 6 /* SET_EXECUTE_MESSAGE */:
|
|
return MyProblem_spreadProps(MyProblem_spreadValues({}, state), { executingMessage: action.payload });
|
|
case 7 /* SET_EXECUTE_RESULT */:
|
|
return MyProblem_spreadValues(MyProblem_spreadValues({}, state), action.payload);
|
|
case 8 /* SET_SUBMIT_RESULT */:
|
|
return MyProblem_spreadValues(MyProblem_spreadValues({}, state), action.payload);
|
|
default:
|
|
throw new Error();
|
|
}
|
|
}
|
|
/* harmony default export */ var MyProblem = (({ children }) => {
|
|
var _a, _b, _c, _d, _e;
|
|
const [state, dispatch] = (0,_react_17_0_2_react.useReducer)(MyProblem_reducer, initalilState);
|
|
const { id } = (0,_umi_production_exports.useParams)();
|
|
const location = (0,_umi_production_exports.useLocation)();
|
|
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
|
|
const { loading, data, debugResult, submitResult, submitRecords, submitRecordPage, showNote, debuging, submitting, executingMessage } = state;
|
|
const [countDownColor, setCountDownColor] = (0,_react_17_0_2_react.useState)("#37AD83");
|
|
const [countDownTime, setCountDownTime] = (0,_react_17_0_2_react.useState)(null);
|
|
const [exerciseData, setExerciseData] = (0,_react_17_0_2_react.useState)({});
|
|
const [isLoading, setIsLoading] = (0,_react_17_0_2_react.useState)(true);
|
|
const [passModalData, setPassModalData] = (0,_react_17_0_2_react.useState)(false);
|
|
const timer = (0,_react_17_0_2_react.useRef)(null);
|
|
const time_save = (0,_react_17_0_2_react.useRef)(0);
|
|
const user = data == null ? void 0 : data.user;
|
|
const hack = data == null ? void 0 : data.hack;
|
|
const runTypeRef = (0,_react_17_0_2_react.useRef)(1);
|
|
const lockExitFullRef = (0,_react_17_0_2_react.useRef)(false);
|
|
(0,Hooks/* useDisableAction */.y)(searchParams.get("type") === "exercises");
|
|
const clearCountdownTimeout = (0,useRemindModal/* useRemindModal */._)(exerciseData);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
function init() {
|
|
return MyProblem_async(this, null, function* () {
|
|
var _a2, _b2;
|
|
setIsLoading(true);
|
|
const response = yield (0,service/* getProgrammingTopic */.fu)(id, {
|
|
exercise_id: searchParams.get("exercisesId")
|
|
});
|
|
setTimeout(() => {
|
|
setIsLoading(false);
|
|
}, 800);
|
|
if (response.status === 401) {
|
|
} else {
|
|
try {
|
|
response.hack.code = base64.Base64.decode(response.hack.code);
|
|
} catch (e) {
|
|
console.log(e);
|
|
}
|
|
response.hack = MyProblem_spreadProps(MyProblem_spreadValues({}, response.hack), {
|
|
is_program: searchParams.get("type") === "1"
|
|
});
|
|
dispatch({
|
|
type: 1 /* GET_DATA */,
|
|
payload: {
|
|
loading: false,
|
|
data: response
|
|
}
|
|
});
|
|
}
|
|
if (searchParams.get("type") === "exercises") {
|
|
if (window.self === window.top) {
|
|
window.top.location.href = "/";
|
|
return;
|
|
}
|
|
let res;
|
|
if (searchParams.get("coursesId") == "coursesId") {
|
|
res = yield (0,exercise/* startSimulateAnswer */._F)({ categoryId: searchParams.get("exercisesId"), login: searchParams.get("login") });
|
|
} else {
|
|
res = yield (0,exercise/* getExerciseStartAnswer */._B)({ categoryId: searchParams.get("exercisesId"), login: searchParams.get("login") });
|
|
}
|
|
setExerciseData(MyProblem_spreadValues({}, res));
|
|
if ((res == null ? void 0 : res.left_banner_id) && ((_a2 = res == null ? void 0 : res.exercise) == null ? void 0 : _a2.left_time)) {
|
|
setCountDownTime(Date.now() + ((_b2 = res == null ? void 0 : res.exercise) == null ? void 0 : _b2.left_time) * 1e3);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
if (id) {
|
|
init();
|
|
}
|
|
}, [id]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a2;
|
|
if (searchParams.get("type") === "exercises" && ((_a2 = exerciseData == null ? void 0 : exerciseData.exercise) == null ? void 0 : _a2.screen_open)) {
|
|
window.removeEventListener("blur", backExercise, false);
|
|
recordScreen/* fullchange */.U.forEach((item, index) => {
|
|
window.addEventListener(item, backExercise, false);
|
|
});
|
|
window.addEventListener("blur", backExercise, false);
|
|
window.focus();
|
|
}
|
|
return () => {
|
|
document.removeEventListener((0,fullscreen/* fullscreenChange */.gH)(), backExercise);
|
|
};
|
|
}, [exerciseData]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (id && (hack == null ? void 0 : hack.language)) {
|
|
getSubmitRecordsData();
|
|
}
|
|
}, [id, submitRecordPage, hack == null ? void 0 : hack.language]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (hack == null ? void 0 : hack.is_program) {
|
|
time_save.current = 0;
|
|
timer.current = setInterval(() => {
|
|
setTime();
|
|
}, 15e3);
|
|
}
|
|
return () => {
|
|
clearInterval(timer.current);
|
|
};
|
|
}, [hack == null ? void 0 : hack.is_program]);
|
|
const setTime = () => MyProblem_async(void 0, null, function* () {
|
|
let res = yield (0,utils_fetch/* default */.ZP)(`/api/myproblems/${id}/save_long_time.json`, {
|
|
method: "get",
|
|
params: {
|
|
answer_long_time: time_save.current
|
|
}
|
|
});
|
|
});
|
|
const backExercise = () => {
|
|
if (!lockExitFullRef.current) {
|
|
(0,fullscreen/* exitFull */.BU)();
|
|
}
|
|
window.parent.postMessage("backExercise", "*");
|
|
};
|
|
function getSubmitRecordsData() {
|
|
return MyProblem_async(this, null, function* () {
|
|
try {
|
|
const response = yield (0,service/* getSubmitRecords */.zO)(id, { limit: 15, page: submitRecordPage, language: hack == null ? void 0 : hack.language });
|
|
dispatch({
|
|
type: 2 /* GET_SUBMIT_RECORDS */,
|
|
payload: response
|
|
});
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
});
|
|
}
|
|
function onPageChange(value) {
|
|
dispatch({ type: 10 /* SET_PAGE */, payload: value });
|
|
}
|
|
function onUpdateCode(value) {
|
|
return MyProblem_async(this, null, function* () {
|
|
var _a2, _b2;
|
|
let ip;
|
|
if (searchParams.get("ip_limit") === "inner" || searchParams.get("ip_bind") === "true") {
|
|
ip = yield (0,Exercise_ip/* findLocalIp */.y)({ ip_limit: searchParams.get("ip_limit"), ip_bind: searchParams.get("ip_bind") === "true" ? true : false, ip_bind_type: (_a2 = exerciseData == null ? void 0 : exerciseData.exercise) == null ? void 0 : _a2.ip_bind_type });
|
|
}
|
|
const response = yield (0,service/* updateCode */.n4)(id, {
|
|
code: base64.Base64.encode(value || hack.code),
|
|
language: hack == null ? void 0 : hack.language,
|
|
exercise_id: searchParams.get("exercisesId"),
|
|
question_id: searchParams.get("questionId"),
|
|
ip
|
|
});
|
|
if (response.status === -5) {
|
|
(0,_umi_production_exports.getDvaApp)()._store.dispatch({
|
|
type: "exercise/setActionTabs",
|
|
payload: {
|
|
key: "student-unlock",
|
|
exerciseParams: MyProblem_spreadProps(MyProblem_spreadValues({ errorMessage: response == null ? void 0 : response.message }, (exerciseData == null ? void 0 : exerciseData.exercise) || {}), { exercise_user_id: (_b2 = exerciseData == null ? void 0 : exerciseData.exercise) == null ? void 0 : _b2.exercise_user_id, id: searchParams.get("exercisesId") })
|
|
}
|
|
});
|
|
}
|
|
return response;
|
|
});
|
|
}
|
|
function onSubmitCode() {
|
|
return MyProblem_async(this, null, function* () {
|
|
runTypeRef.current = 2;
|
|
if (submitting) {
|
|
return;
|
|
}
|
|
dispatch({
|
|
type: 5 /* SET_SUBMITING */,
|
|
payload: true
|
|
});
|
|
try {
|
|
mediator/* default */.Z.publish("to-commit-info");
|
|
const response = yield onUpdateCode();
|
|
console.log(response, 1);
|
|
if (response.status === 0) {
|
|
let submitCodeParams = {};
|
|
if (searchParams.get("type") === "exercises") {
|
|
submitCodeParams.extras = {
|
|
exercise_id: searchParams.get("exercisesId"),
|
|
//试卷id
|
|
question_id: searchParams.get("questionId")
|
|
//题目id
|
|
};
|
|
if (searchParams.get("ip_limit") === "inner" || searchParams.get("ip_bind") === "true")
|
|
submitCodeParams.extras.ip = yield (0,Exercise_ip/* findLocalIp */.y)({ ip_limit: searchParams.get("ip_limit"), ip_bind: searchParams.get("ip_bind") === "true" ? true : false });
|
|
}
|
|
const res = yield (0,service/* sumbitCode */.bM)(id, submitCodeParams);
|
|
if (res.status === -1) {
|
|
window.parent.location.href = `/classrooms/${searchParams.get("coursesId")}/exercise/${searchParams.get("exercisesId")}/detail`;
|
|
return;
|
|
}
|
|
const { time_limit, test_case_size } = hack;
|
|
const startTime = getTimeStamp();
|
|
function executeCode() {
|
|
return MyProblem_async(this, null, function* () {
|
|
const { status, data: data2 } = yield (0,service/* getOperationResult */.rX)(id, "submit");
|
|
const executeTime = getTimeStamp();
|
|
const isTimeOut = executeTime - startTime > (time_limit * test_case_size + 3) * 1e3;
|
|
if (status !== 0 && !isTimeOut) {
|
|
setTimeout(executeCode, 1e3);
|
|
}
|
|
if (isTimeOut) {
|
|
modal["default"].error({
|
|
centered: true,
|
|
okText: "\u77E5\u9053\u5566",
|
|
title: "\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"
|
|
});
|
|
dispatch({
|
|
type: 5 /* SET_SUBMITING */,
|
|
payload: false
|
|
});
|
|
return;
|
|
}
|
|
if (status === 0) {
|
|
if (data2.status === 2) {
|
|
modal["default"].error({
|
|
centered: true,
|
|
okText: "\u77E5\u9053\u5566",
|
|
title: "\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"
|
|
});
|
|
}
|
|
if ((data2 == null ? void 0 : data2.status) === 0 && searchParams.get("type") === "1") {
|
|
setPassModalData(true);
|
|
}
|
|
const submitResponse = yield (0,service/* getSubmitRecords */.zO)(id, { limit: 15, page: submitRecordPage, language: hack == null ? void 0 : hack.language });
|
|
dispatch({
|
|
type: 8 /* SET_SUBMIT_RESULT */,
|
|
payload: MyProblem_spreadProps(MyProblem_spreadValues({}, state), {
|
|
submitResult: data2,
|
|
// debugResult: data,
|
|
submitting: false,
|
|
submitRecords: submitResponse
|
|
})
|
|
});
|
|
}
|
|
});
|
|
}
|
|
executeCode();
|
|
} else {
|
|
dispatch({
|
|
type: 5 /* SET_SUBMITING */,
|
|
payload: false
|
|
});
|
|
}
|
|
} catch (error) {
|
|
console.log(error);
|
|
dispatch({
|
|
type: 5 /* SET_SUBMITING */,
|
|
payload: false
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function onDebugCode() {
|
|
return MyProblem_async(this, null, function* () {
|
|
runTypeRef.current = 1;
|
|
state.debuging = true;
|
|
dispatch({
|
|
type: 4 /* SET_DEBUGING */,
|
|
payload: true
|
|
});
|
|
try {
|
|
const response = yield onUpdateCode();
|
|
if (response.status === 0) {
|
|
const { time_limit } = hack;
|
|
let submitCodeParams = { input: encodeURIComponent(data.test_case.input) };
|
|
if (searchParams.get("type") === "exercises") {
|
|
submitCodeParams.exercise_id = searchParams.get("exercisesId");
|
|
}
|
|
const res = yield (0,service/* debugCode */.MU)(id, submitCodeParams);
|
|
if (res.status === -1) {
|
|
window.parent.location.href = `/classrooms/${searchParams.get("coursesId")}/exercise/${searchParams.get("exercisesId")}/detail`;
|
|
return;
|
|
}
|
|
const startTime = getTimeStamp();
|
|
function executeCode() {
|
|
return MyProblem_async(this, null, function* () {
|
|
const { status, message, data: data2 } = yield (0,service/* getOperationResult */.rX)(id, "debug");
|
|
const executeTime = getTimeStamp();
|
|
const isTimeOut = executeTime - startTime > (time_limit + 3) * 1e3;
|
|
if (status !== 0 && !isTimeOut) {
|
|
dispatch({
|
|
type: 6 /* SET_EXECUTE_MESSAGE */,
|
|
payload: message
|
|
});
|
|
setTimeout(executeCode, 1e3);
|
|
}
|
|
if (isTimeOut) {
|
|
modal["default"].error({
|
|
centered: true,
|
|
okText: "\u77E5\u9053\u5566",
|
|
content: "\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"
|
|
});
|
|
dispatch({
|
|
type: 4 /* SET_DEBUGING */,
|
|
payload: false
|
|
});
|
|
return;
|
|
}
|
|
if (status === 0) {
|
|
dispatch({
|
|
type: 4 /* SET_DEBUGING */,
|
|
payload: false
|
|
});
|
|
if (data2.status === 2) {
|
|
modal["default"].error({
|
|
centered: true,
|
|
okText: "\u77E5\u9053\u5566",
|
|
content: "\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"
|
|
});
|
|
}
|
|
if (data2.status === 2) {
|
|
modal["default"].error({
|
|
centered: true,
|
|
okText: "\u77E5\u9053\u5566",
|
|
content: "\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"
|
|
});
|
|
}
|
|
dispatch({
|
|
type: 7 /* SET_EXECUTE_RESULT */,
|
|
payload: MyProblem_spreadProps(MyProblem_spreadValues({}, state), {
|
|
debugResult: data2,
|
|
debuging: false
|
|
})
|
|
});
|
|
}
|
|
});
|
|
}
|
|
executeCode();
|
|
} else {
|
|
dispatch({
|
|
type: 4 /* SET_DEBUGING */,
|
|
payload: false
|
|
});
|
|
}
|
|
} catch (error) {
|
|
console.log(error);
|
|
} finally {
|
|
}
|
|
});
|
|
}
|
|
function onChangeCode(value) {
|
|
dispatch({
|
|
type: 3 /* SET_DATA */,
|
|
payload: MyProblem_spreadProps(MyProblem_spreadValues({}, data), {
|
|
hack: MyProblem_spreadProps(MyProblem_spreadValues({}, hack), {
|
|
code: value
|
|
})
|
|
})
|
|
});
|
|
}
|
|
const onChangeLanguage = (v) => MyProblem_async(void 0, null, function* () {
|
|
let res = yield (0,utils_fetch/* default */.ZP)(`/api/problems/${hack == null ? void 0 : hack.identifier}/start.json`, {
|
|
method: "get",
|
|
params: {
|
|
language: v === "C++" || v === "c++" ? encodeURIComponent(v) : v,
|
|
hack_user_id: user == null ? void 0 : user.user_id
|
|
}
|
|
});
|
|
if (res.status !== -1) {
|
|
_umi_production_exports.history.replace(`/myproblems/${res == null ? void 0 : res.identifier}?type=${searchParams.get("type")}`);
|
|
}
|
|
});
|
|
function onChangeInput(e) {
|
|
let input = e.target.value;
|
|
dispatch({
|
|
type: 3 /* SET_DATA */,
|
|
payload: MyProblem_spreadProps(MyProblem_spreadValues({}, data), {
|
|
test_case: {
|
|
input
|
|
}
|
|
})
|
|
});
|
|
}
|
|
function onResetCode() {
|
|
return MyProblem_async(this, null, function* () {
|
|
try {
|
|
const response = yield (0,service/* resetCode */.H7)(id);
|
|
if (response.status === 401) {
|
|
} else {
|
|
onChangeCode(base64.Base64.decode(response.code));
|
|
}
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
});
|
|
}
|
|
function onSyncCode() {
|
|
modal["default"].confirm({
|
|
centered: true,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
title: "\u63D0\u793A",
|
|
content: /* @__PURE__ */ React.createElement("p", null, "\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ", /* @__PURE__ */ React.createElement("br", null), "\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),
|
|
onOk() {
|
|
return MyProblem_async(this, null, function* () {
|
|
const response = yield (0,service/* syncCode */.fi)(id);
|
|
if (response.status === 401) {
|
|
} else {
|
|
onChangeCode(base64.Base64.decode(response.code));
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function onShowNote() {
|
|
dispatch({
|
|
type: 9 /* SET_SHOW_NOTE */,
|
|
payload: true
|
|
});
|
|
}
|
|
function onCancelNote() {
|
|
dispatch({
|
|
type: 9 /* SET_SHOW_NOTE */,
|
|
payload: false
|
|
});
|
|
}
|
|
function onAddNote(values) {
|
|
return MyProblem_async(this, null, function* () {
|
|
yield (0,service/* addNotes */.MK)(id, values);
|
|
dispatch({
|
|
type: 1 /* GET_DATA */,
|
|
payload: {
|
|
showNote: false,
|
|
data: MyProblem_spreadProps(MyProblem_spreadValues({}, data), {
|
|
hack: MyProblem_spreadProps(MyProblem_spreadValues({}, hack), {
|
|
notes: values.notes
|
|
})
|
|
})
|
|
}
|
|
});
|
|
});
|
|
}
|
|
const rightPanelOption = {
|
|
hack,
|
|
isLoading,
|
|
input: (_a = data == null ? void 0 : data.test_case) == null ? void 0 : _a.input,
|
|
is_file: (_b = data == null ? void 0 : data.test_case) == null ? void 0 : _b.is_file,
|
|
language: hack == null ? void 0 : hack.language,
|
|
code: hack == null ? void 0 : hack.code,
|
|
title: "main." + LanguageSuf[hack == null ? void 0 : hack.language],
|
|
modify_code: hack == null ? void 0 : hack.modify_code,
|
|
notes: hack == null ? void 0 : hack.notes,
|
|
debugResult,
|
|
debuging,
|
|
submitting,
|
|
executingMessage,
|
|
onCancelNote,
|
|
onAddNote,
|
|
showNote,
|
|
user,
|
|
onShowNote,
|
|
onSubmitCode,
|
|
onChangeCode,
|
|
onChangeInput,
|
|
onDebugCode,
|
|
onResetCode,
|
|
onSyncCode,
|
|
onUpdateCode,
|
|
onChangeLanguage
|
|
};
|
|
function onTriggerPraise() {
|
|
return MyProblem_async(this, null, function* () {
|
|
const { praise_count } = yield (0,service/* triggerPlus */.vl)(hack.id, { container_type: "Hack", type: 1 });
|
|
let rs = MyProblem_spreadProps(MyProblem_spreadValues({}, data), {
|
|
hack: MyProblem_spreadProps(MyProblem_spreadValues({}, hack), {
|
|
praises_count: praise_count,
|
|
user_praise: !hack.user_praise
|
|
})
|
|
});
|
|
dispatch({
|
|
type: 3 /* SET_DATA */,
|
|
payload: rs
|
|
});
|
|
});
|
|
}
|
|
const leftPanelOption = {
|
|
topicId: id,
|
|
submitResult,
|
|
submitRecords,
|
|
submitting,
|
|
page: submitRecordPage,
|
|
onPageChange,
|
|
hack,
|
|
user: data == null ? void 0 : data.user,
|
|
onTriggerPraise
|
|
};
|
|
console.log(exerciseData);
|
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(spin/* default */.Z, { spinning: loading, delay: 500 }, !data ? null : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("header", { className: OjFormmodules/* default */.Z.header }, searchParams.get("type") !== "exercises" && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("img", { src: `${env/* default */.Z.IMG_SERVER}/images/${user == null ? void 0 : user.image_url}`, alt: "user", width: 30 }), /* @__PURE__ */ React.createElement("span", null, user == null ? void 0 : user.name)), searchParams.get("type") === "exercises" && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "exercise_user_info" }, "\u59D3\u540D", /* @__PURE__ */ React.createElement("span", { className: "ml10" }, (_c = exerciseData == null ? void 0 : exerciseData.exercise) == null ? void 0 : _c.user_name)), /* @__PURE__ */ React.createElement("div", { className: "exercise_user_info ml30" }, "\u5B66\u53F7", /* @__PURE__ */ React.createElement("span", { className: "ml10" }, (_d = exerciseData == null ? void 0 : exerciseData.exercise) == null ? void 0 : _d.student_id))), /* @__PURE__ */ React.createElement("h2", { className: "flex-wrp flex_box_column flex_box_center" }, /* @__PURE__ */ React.createElement("div", null, hack.name), (hack == null ? void 0 : hack.is_program) && /* @__PURE__ */ React.createElement(Timepiece/* default */.Z, { defaultValue: hack == null ? void 0 : hack.answer_long_time, onChange: (v) => {
|
|
console.log(v);
|
|
time_save.current = v;
|
|
}, className: "font12 c-grey-999" })), (user == null ? void 0 : user.hack_manager) ? /* @__PURE__ */ React.createElement(_umi_production_exports.Link, { className: OjFormmodules/* default */.Z.btn_back, to: searchParams.get("type") === "1" ? `/problems/newedit/${hack.identifier}?type=1` : `/problems/newedit/${hack.identifier}`, style: { marginRight: 10 } }, " ", /* @__PURE__ */ React.createElement(FormOutlined/* default */.Z, null), " \u7F16\u8F91") : null, ((_e = exerciseData == null ? void 0 : exerciseData.exercise) == null ? void 0 : _e.left_time) && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { style: { color: countDownColor, marginRight: 6 }, className: `iconfont icon-daojishi ${OjFormmodules/* default */.Z.djs}` }), /* @__PURE__ */ React.createElement("span", { className: "c-white mr20" }, /* @__PURE__ */ React.createElement(
|
|
Countdown,
|
|
{
|
|
valueStyle: { color: countDownColor, fontSize: 20, fontWeight: 500 },
|
|
title: /* @__PURE__ */ React.createElement("span", { style: { color: countDownColor, fontSize: 14, marginRight: 10 }, className: "time" }, "\u5269\u4F59\u7B54\u9898\u65F6\u957F"),
|
|
value: countDownTime,
|
|
onFinish: () => MyProblem_async(void 0, null, function* () {
|
|
const res = yield (0,exercise/* submitExerciseAnswer */.VL)({
|
|
categoryId: searchParams.get("exercisesId"),
|
|
commit_method: 2
|
|
});
|
|
if ((res == null ? void 0 : res.status) === 0) {
|
|
onUpdateCode();
|
|
modal["default"].info({
|
|
width: 530,
|
|
title: "\u63D0\u793A",
|
|
centered: true,
|
|
okText: "\u786E\u5B9A",
|
|
content: /* @__PURE__ */ React.createElement("div", { className: "tc font16" }, "\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377", /* @__PURE__ */ React.createElement("br", null), "\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),
|
|
onOk: () => MyProblem_async(void 0, null, function* () {
|
|
window.parent.location.href = `/classrooms/${searchParams.get("coursesId")}/exercise/${searchParams.get("exercisesId")}/detail`;
|
|
})
|
|
});
|
|
}
|
|
if ((res == null ? void 0 : res.status) === -3) {
|
|
const time = parseInt(res == null ? void 0 : res.message);
|
|
setCountDownTime(Date.now() + time * 1e3);
|
|
}
|
|
})
|
|
}
|
|
))), searchParams.get("type") === "exercises" ? /* @__PURE__ */ React.createElement(es_button/* default */.ZP, { type: "primary", onClick: () => {
|
|
onUpdateCode();
|
|
modal["default"].confirm({
|
|
centered: true,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
icon: null,
|
|
title: "\u63D0\u793A",
|
|
content: /* @__PURE__ */ React.createElement("div", { style: { color: "#FF0000" } }, "\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u662F\u5426\u8FDB\u884C\u8BC4\u6D4B\u5E76\u63D0\u4EA4\uFF0C\u672A\u8BC4\u6D4B\u5219\u4F1A\u5BFC\u81F4\u8BE5\u9898\u65E0\u6CD5\u83B7\u5F97\u5206\u6570"),
|
|
onOk() {
|
|
clearCountdownTimeout();
|
|
lockExitFullRef.current = true;
|
|
backExercise();
|
|
}
|
|
});
|
|
} }, /* @__PURE__ */ React.createElement("span", { className: "iconfont icon-yiguanbi mr5 font14" }), " \u8FD4\u56DE\u8BD5\u5377") : /* @__PURE__ */ React.createElement("span", { className: OjFormmodules/* default */.Z.btn_back, onClick: () => {
|
|
var _a2;
|
|
if (searchParams.get("backUrl")) {
|
|
_umi_production_exports.history.push(searchParams.get("backUrl"));
|
|
} else {
|
|
if (searchParams.get("type") === "1") {
|
|
let item = (_a2 = localStorage.getItem("program_homework")) == null ? void 0 : _a2.split(",");
|
|
_umi_production_exports.history.push(`/classrooms/${item == null ? void 0 : item[0]}/program_homework/${item == null ? void 0 : item[1]}/detail`);
|
|
} else {
|
|
_umi_production_exports.history.push(`/problemset`);
|
|
}
|
|
}
|
|
} }, " ", /* @__PURE__ */ React.createElement(PoweroffOutlined/* default */.Z, null), "\u9000\u51FA")), /* @__PURE__ */ React.createElement(spin/* default */.Z, { size: "large", spinning: isLoading }, /* @__PURE__ */ React.createElement(SplitContainer/* default */.Z, { className: "my-problems", leftChild: /* @__PURE__ */ React.createElement(LeftPanel, MyProblem_spreadValues({}, leftPanelOption)), rightChild: /* @__PURE__ */ React.createElement(RightPanel, MyProblem_spreadValues({}, rightPanelOption)) }))), /* @__PURE__ */ React.createElement(
|
|
modal["default"],
|
|
{
|
|
centered: true,
|
|
closable: false,
|
|
width: 680,
|
|
footer: null,
|
|
open: passModalData,
|
|
className: "oj-modal"
|
|
},
|
|
/* @__PURE__ */ React.createElement("section", { className: "oj-modal-content" }, /* @__PURE__ */ React.createElement("div", { className: "oj-modal-head" }, /* @__PURE__ */ React.createElement("img", { src: internal, alt: "" }), /* @__PURE__ */ React.createElement("i", { onClick: () => setPassModalData(false), className: "iconfont icon-guanbi1" })), /* @__PURE__ */ React.createElement("aside", null, /* @__PURE__ */ React.createElement("img", { className: "mr30", src: title/* default */.Z }), "\u8FD0\u884C\u65F6\u95F4:\xA0", /* @__PURE__ */ React.createElement("span", { style: { color: "#75d6ba", marginRight: 100 } }, submitResult == null ? void 0 : submitResult.execute_time, "ms"), "\u4F18\u4E8E", /* @__PURE__ */ React.createElement("span", { style: { color: "#f3b087", margin: "0 5px" } }, (submitResult == null ? void 0 : submitResult.time_better_than) || 100, "%"), "\u7684\u7528\u6237"), /* @__PURE__ */ React.createElement("aside", { className: "mb50" }, /* @__PURE__ */ React.createElement("img", { src: time/* default */.Z, className: "mr30" }), /* @__PURE__ */ React.createElement("span", { className: "oj-modal-tt" }, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", null, "\u5360\u7528\u5185\u5B58:\xA0"), /* @__PURE__ */ React.createElement("span", { className: "c-light-primary" }, submitResult == null ? void 0 : submitResult.execute_memory, "kb")), /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", null))), "\u4F18\u4E8E", /* @__PURE__ */ React.createElement("span", { style: { color: "#f3b087", margin: "0 5px" } }, (submitResult == null ? void 0 : submitResult.memory_better_than) || 100, "%"), "\u7684\u7528\u6237"), /* @__PURE__ */ React.createElement("div", { id: "oj-modal-next", onClick: () => MyProblem_async(void 0, null, function* () {
|
|
var _a2;
|
|
if (submitResult == null ? void 0 : submitResult.next_identifier) {
|
|
let res = yield (0,utils_fetch/* default */.ZP)(`/api/problems/${submitResult == null ? void 0 : submitResult.next_identifier}/start.json`, {
|
|
method: "get",
|
|
params: {
|
|
hack_user_id: user == null ? void 0 : user.user_id
|
|
}
|
|
});
|
|
if (res) {
|
|
_umi_production_exports.history.replace(`/myproblems/${res == null ? void 0 : res.identifier}?type=1`);
|
|
window.location.reload();
|
|
}
|
|
} else {
|
|
let item = (_a2 = localStorage.getItem("program_homework")) == null ? void 0 : _a2.split(",");
|
|
_umi_production_exports.history.push(`/classrooms/${item == null ? void 0 : item[0]}/program_homework/${item == null ? void 0 : item[1]}/detail`);
|
|
}
|
|
}), className: "oj-modal-btn" }, (submitResult == null ? void 0 : submitResult.next_identifier) ? "\u8FDB\u5165\u4E0B\u4E00\u9898" : "\u56DE\u5230\u4F5C\u4E1A\u8BE6\u60C5\u9875"))
|
|
)), /* @__PURE__ */ React.createElement(Unlock/* default */.Z, { successCb: () => {
|
|
if (runTypeRef.current === 1) {
|
|
onDebugCode();
|
|
} else {
|
|
onSubmitCode();
|
|
}
|
|
} }));
|
|
});
|
|
function ActionBar({ title, modify_code, onSyncCode, onShowCodeSetting, onResetCode, hack, onChangeLanguage }) {
|
|
var _a;
|
|
const opneModal = () => {
|
|
modal["default"].confirm({
|
|
title: "\u6062\u590D\u521D\u59CB\u4EE3\u7801",
|
|
icon: /* @__PURE__ */ React.createElement(ExclamationCircleOutlined/* default */.Z, null),
|
|
content: "\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",
|
|
centered: true,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
onOk: onResetCode
|
|
});
|
|
};
|
|
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
|
|
const type = searchParams.get("language");
|
|
const getLanguage = (type2) => {
|
|
if (type2 === "1") {
|
|
return "c++";
|
|
}
|
|
if (type2 === "2") {
|
|
return "C++";
|
|
}
|
|
return type2;
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (type) {
|
|
onChangeLanguage(getLanguage(type));
|
|
}
|
|
}, []);
|
|
console.log(hack, "hack");
|
|
return /* @__PURE__ */ React.createElement("div", { className: "action-bar", style: { paddingLeft: 0 } }, (hack == null ? void 0 : hack.is_program) && /* @__PURE__ */ React.createElement(
|
|
es_select["default"],
|
|
{
|
|
className: "oj-select",
|
|
value: hack == null ? void 0 : hack.language,
|
|
defaultValue: getLanguage(type),
|
|
style: { width: 100 },
|
|
placeholder: "\u9009\u62E9\u8BED\u8A00",
|
|
onChange: onChangeLanguage
|
|
},
|
|
(_a = hack == null ? void 0 : hack.all_language) == null ? void 0 : _a.map((e) => {
|
|
return /* @__PURE__ */ React.createElement(es_select["default"].Option, { key: e, value: e }, e);
|
|
})
|
|
), /* @__PURE__ */ React.createElement("span", null), modify_code ? /* @__PURE__ */ React.createElement("a", { title: "\u66F4\u65B0\u901A\u77E5", onClick: onSyncCode }, /* @__PURE__ */ React.createElement("img", { src: notice, alt: "notice", style: { height: 13, transform: "translateY(-2px)" } })) : null, /* @__PURE__ */ React.createElement("a", { title: "\u6062\u590D\u521D\u59CB\u4EE3\u7801", onClick: opneModal }, /* @__PURE__ */ React.createElement("i", { className: "iconfont icon-zhongzhi font-20 " })), /* @__PURE__ */ React.createElement("a", { onClick: onShowCodeSetting }, /* @__PURE__ */ React.createElement("i", { className: "iconfont icon-shezhi" })));
|
|
}
|
|
function RightPanel(_a) {
|
|
var _b = _a, { input, is_file, showNote, onShowNote, notes, onCancelNote, onAddNote, debugResult, language, debuging, submitting, executingMessage, code, onSubmitCode, onDebugCode, onChangeCode, onChangeInput, onUpdateCode, user, isLoading } = _b, actionBarOpation = __objRest(_b, ["input", "is_file", "showNote", "onShowNote", "notes", "onCancelNote", "onAddNote", "debugResult", "language", "debuging", "submitting", "executingMessage", "code", "onSubmitCode", "onDebugCode", "onChangeCode", "onChangeInput", "onUpdateCode", "user", "isLoading"]);
|
|
function ActionBarEL(onShowCodeSetting) {
|
|
return /* @__PURE__ */ React.createElement(ActionBar, MyProblem_spreadProps(MyProblem_spreadValues({}, actionBarOpation), { onShowCodeSetting }));
|
|
}
|
|
const testCasePanelOption = MyProblem_spreadValues({
|
|
input,
|
|
is_file,
|
|
debugResult,
|
|
debuging,
|
|
submitting,
|
|
executingMessage,
|
|
onDebugCode,
|
|
onChangeCode,
|
|
onSubmitCode,
|
|
onChangeInput,
|
|
user
|
|
}, actionBarOpation);
|
|
return /* @__PURE__ */ React.createElement("div", { className: "right-panel" }, /* @__PURE__ */ React.createElement(CodePanel/* default */.Z, { isLoading, language, value: code, onChange: onChangeCode, onUpdateCode, ActionBarRender: ActionBarEL }), /* @__PURE__ */ React.createElement(TestCasePanel/* default */.ZP, MyProblem_spreadValues({}, testCasePanelOption)));
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 52322:
|
|
/*!********************************************!*\
|
|
!*** ./src/utils/hooks/useRemindModal.tsx ***!
|
|
\********************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ _: function() { return /* binding */ useRemindModal; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd */ 43418);
|
|
|
|
|
|
const useRemindModal = (answerData) => {
|
|
var _a, _b;
|
|
const countDownRefArr = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]);
|
|
const clearCountdownTimeout = () => {
|
|
for (const id of countDownRefArr.current) {
|
|
clearTimeout(id);
|
|
}
|
|
countDownRefArr.current = [];
|
|
};
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
var _a2, _b2, _c, _d, _e, _f;
|
|
clearCountdownTimeout();
|
|
if (((_a2 = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _a2.left_time) && ((_c = (_b2 = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _b2.exercise_events) == null ? void 0 : _c.length) > 0) {
|
|
for (const eventItem of (_d = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _d.exercise_events) {
|
|
if (((_e = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _e.left_time) > (eventItem == null ? void 0 : eventItem.reminder_time) * 60) {
|
|
const timeoutId = setTimeout(() => {
|
|
antd__WEBPACK_IMPORTED_MODULE_1__["default"].info({
|
|
content: `${eventItem == null ? void 0 : eventItem.reminder_content}`,
|
|
icon: null,
|
|
title: "\u63D0\u793A",
|
|
centered: true,
|
|
okText: "\u77E5\u9053\u4E86"
|
|
});
|
|
}, (((_f = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _f.left_time) - (eventItem == null ? void 0 : eventItem.reminder_time) * 60) * 1e3);
|
|
countDownRefArr.current.push(timeoutId);
|
|
}
|
|
}
|
|
}
|
|
}, [(_a = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _a.left_time, (_b = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _b.exercise_events]);
|
|
return clearCountdownTimeout;
|
|
};
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 60141:
|
|
/*!***************************************************************!*\
|
|
!*** ./src/pages/tasks/code-repository/action-bar/notice.gif ***!
|
|
\***************************************************************/
|
|
/***/ (function(module) {
|
|
|
|
module.exports = "data:image/gif;base64,R0lGODlh6QDIAPf/APrMTf789vrMUPvdi/zfkfi4CvvYef713fnKSfzosP7wyvrSZfjAKPzmqf3wzP767fnHPv7xzf3wzvjFOfe2BP767vi8F/i8GPvagfnGO/jDMv3uxv3svfrNUvzkov724fvWcfzinPvbhPi5DfrTZv734vi6EPzglfnKSP3tw/nJR/3qtv3nrPrRYPjAJf/++/702PvVbvrUbfrUafrQX/rOVvnLTfrWcvi+H/i7Fv7y0P3y0/3wyv3uxPzjoPzglvi/I/vejvvZfPe5D/rTaPrPWvrOVPrKSf3vyPzlpPnNU/nKRvnENfe6E/Ly8v3sv+Xl5frZf9ra2vnIQOjo6Pv7+9jY2PX19d7e3tTU1Ovr6/n5+dzc3O7u7uLi4tDQ0M7Oztvb2/j4+N3d3ezs7NHR0f7+/tXV1fHx8fDw8NLS0uHh4d/f3/jAJvb29vT09M/Pz+/v7/f39+rq6uPj49bW1vr6+uDg4NfX1+Tk5PPz89PT0+np6efn59nZ2e3t7frPWfzmqvnFN/39/fz8/P756/723/vdif3ru/745/zhmObm5vrUav3ps/zim/zdiv757Pzlpvzruvzhmfe3Bve3B/zimvvhmvnCK/jAJ//56v/9+f7z1f702vvciPvXdfnBJ/jFN/jDL/735PvZe/e7Ffzjn/e3CPznq/3twf3ruvi+IPnFNvvdjPzps/3psvrOWP702/rQXfvYevnOWfvUav3quPrWdP302//56/i9G/zejP712/778/nIQv3orfnOV/i3BvnGO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