diff --git a/13783.33bb241c.async.js b/13783.14319e83.async.js
similarity index 97%
rename from 13783.33bb241c.async.js
rename to 13783.14319e83.async.js
index 55ad2543a0..9056cdda02 100644
--- a/13783.33bb241c.async.js
+++ b/13783.14319e83.async.js
@@ -209,7 +209,9 @@ var UploadModal = function UploadModal(_ref) {
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
_ref$onSuccess = _ref.onSuccess,
- onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
+ onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
+ _ref$isResource = _ref.isResource,
+ isResource = _ref$isResource === void 0 ? false : _ref$isResource;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),
_useState2 = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
btnLoading = _useState2[0],
@@ -226,7 +228,7 @@ var UploadModal = function UploadModal(_ref) {
}, [visible]);
var handleOk = /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
- var _value$;
+ var _value$, _value$2;
var res;
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
@@ -239,25 +241,45 @@ var UploadModal = function UploadModal(_ref) {
return _context.abrupt("return");
case 3:
setBtnLoading(true);
- _context.next = 6;
+ if (!isResource) {
+ _context.next = 10;
+ break;
+ }
+ _context.next = 7;
+ return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP)("/api/virtual_classrooms/".concat(query.virtual_spacesId, "/files/move.json"), {
+ method: 'put',
+ body: {
+ id: fileItem.id,
+ folder_id: Number(value === null || value === void 0 || (_value$ = value[0]) === null || _value$ === void 0 || (_value$ = _value$.split('_')) === null || _value$ === void 0 ? void 0 : _value$[1]),
+ is_folder: 0
+ }
+ });
+ case 7:
+ _context.t0 = _context.sent;
+ _context.next = 13;
+ break;
+ case 10:
+ _context.next = 12;
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP)("/api/virtual_classrooms/".concat(query.virtual_spacesId, "/subject_plans/adjust_file_depth.json"), {
method: 'put',
body: {
attachment_id: fileItem.id,
- folder_id: Number(value === null || value === void 0 || (_value$ = value[0]) === null || _value$ === void 0 || (_value$ = _value$.split('_')) === null || _value$ === void 0 ? void 0 : _value$[1])
+ folder_id: Number(value === null || value === void 0 || (_value$2 = value[0]) === null || _value$2 === void 0 || (_value$2 = _value$2.split('_')) === null || _value$2 === void 0 ? void 0 : _value$2[1])
}
});
- case 6:
- res = _context.sent;
+ case 12:
+ _context.t0 = _context.sent;
+ case 13:
+ res = _context.t0;
if (!((res === null || res === void 0 ? void 0 : res.status) !== -1)) {
- _context.next = 10;
+ _context.next = 17;
break;
}
onSuccess();
return _context.abrupt("return");
- case 10:
+ case 17:
setBtnLoading(false);
- case 11:
+ case 18:
case "end":
return _context.stop();
}
diff --git a/index.html b/index.html
index 4050717793..06264c1656 100644
--- a/index.html
+++ b/index.html
@@ -27,7 +27,7 @@
display: block !important;
}
-
+