mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
upgrade dep:
css-loader 0.28->3.5 del 4.1->5.1 eslint 5.18->6.8 eslint-config-airbnb 17.1->18.1 eslint-loader 2.1->4.0 file-loader 2.0->6.0 fs.extra 8.0->9.0 gulp 2.0->3.0 gulp-nunjucks 4.0->5.0 json-loader 0.5->Removed style-loader 0.23->1.1 uglifyjs-webpack-plugin 1.3->2.2 yargs 13.2->15.3 katex 0.10->0.11 react-monaco-editor 0.35->0.36 timeage-react 1.2->3.0 timeago.js 3.0->4.0 uuid 3.3->7.0
This commit is contained in:
1 parent
9cb68397b9
commit
f9468536de
55 files changed
+776
-1032
No files matched your search
@@ -29,7 +29,7 @@ const page = new NamedPage('domain_manage_role', () => {
|
||||
function ensureAndGetSelectedRoles() {
|
||||
const roles = _.map(
|
||||
$('.domain-roles tbody [type="checkbox"]:checked'),
|
||||
ch => $(ch).closest('tr').attr('data-role'),
|
||||
(ch) => $(ch).closest('tr').attr('data-role'),
|
||||
);
|
||||
if (roles.length === 0) {
|
||||
Notification.error(i18n('Please select at least one role to perform this operation.'));
|
||||
|
||||
@@ -73,7 +73,7 @@ const page = new NamedPage('domain_manage_user', () => {
|
||||
function ensureAndGetSelectedUsers() {
|
||||
const users = _.map(
|
||||
$('.domain-users tbody [type="checkbox"]:checked'),
|
||||
ch => $(ch).closest('tr').attr('data-uid'),
|
||||
(ch) => $(ch).closest('tr').attr('data-uid'),
|
||||
);
|
||||
if (users.length === 0) {
|
||||
Notification.error(i18n('Please select at least one user to perform this operation.'));
|
||||
@@ -153,7 +153,7 @@ const page = new NamedPage('domain_manage_user', () => {
|
||||
$('[name="add_user"]').click(() => handleClickAddUser());
|
||||
$('[name="remove_selected"]').click(() => handleClickRemoveSelected());
|
||||
$('[name="set_roles"]').click(() => handleClickSetSelected());
|
||||
$('.domain-users [name="role"]').change(ev => handleChangeUserRole(ev));
|
||||
$('.domain-users [name="role"]').change((ev) => handleChangeUserRole(ev));
|
||||
});
|
||||
|
||||
export default page;
|
||||
@@ -26,7 +26,7 @@ const page = new NamedPage('home_messages', () => {
|
||||
}
|
||||
|
||||
async function mountComponent() {
|
||||
const SockJs = await import('sockjs-client');
|
||||
const { default: SockJs } = await import('sockjs-client');
|
||||
const { default: MessagePadApp } = await import('../components/messagepad');
|
||||
const { default: MessagePadReducer } = await import('../components/messagepad/reducers');
|
||||
const {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { parse as parseMongoId } from 'vj/utils/mongoId';
|
||||
const page = new NamedPage('homework_main', () => {
|
||||
// Homework Calendar
|
||||
if (Context.docs) {
|
||||
const events = Context.docs.map(doc => ({
|
||||
const events = Context.docs.map((doc) => ({
|
||||
beginAt: doc.begin_at * 1000,
|
||||
endAt: doc.end_at * 1000,
|
||||
title: doc.title,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { NamedPage } from 'vj/misc/PageLoader';
|
||||
import * as recordEnum from 'vj/constant/record';
|
||||
|
||||
const page = new NamedPage('judge_playground', async () => {
|
||||
const SockJs = await import('sockjs-client');
|
||||
const { default: SockJs } = await import('sockjs-client');
|
||||
|
||||
const sock = new SockJs('/judge/consume-conn');
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
|
||||
if (reactLoaded) return;
|
||||
$('.loader-container').show();
|
||||
|
||||
const SockJs = await import('sockjs-client');
|
||||
const { default: SockJs } = await import('sockjs-client');
|
||||
const { default: ScratchpadApp } = await import('../components/scratchpad');
|
||||
const { default: ScratchpadReducer } = await import('../components/scratchpad/reducers');
|
||||
const {
|
||||
|
||||
@@ -20,7 +20,7 @@ function setDomSelected($dom, selected) {
|
||||
async function updateSelection(sendRequest = true) {
|
||||
dirtyCategories.forEach(({ type, category, subcategory }) => {
|
||||
let item = categories[category];
|
||||
const isSelected = item.select || _.some(item.children, c => c.select);
|
||||
const isSelected = item.select || _.some(item.children, (c) => c.select);
|
||||
setDomSelected(item.$tag, isSelected);
|
||||
if (isSelected) {
|
||||
selections.push(category);
|
||||
@@ -43,8 +43,8 @@ async function updateSelection(sendRequest = true) {
|
||||
if (sendRequest) {
|
||||
// a list of categories which subcategory is selected
|
||||
const requestCategoryTags = _.uniq(selections
|
||||
.filter(s => s.indexOf(',') !== -1)
|
||||
.map(s => s.split(',')[0]));
|
||||
.filter((s) => s.indexOf(',') !== -1)
|
||||
.map((s) => s.split(',')[0]));
|
||||
// drop the category if its subcategory is selected
|
||||
const requestTags = _.uniq(_.pullAll(selections, requestCategoryTags));
|
||||
let url;
|
||||
@@ -53,7 +53,7 @@ async function updateSelection(sendRequest = true) {
|
||||
} else {
|
||||
url = substitute(decodeURIComponent(Context.getProblemUrlWithCategory), {
|
||||
category: requestTags
|
||||
.map(tag => tag.split(',').map(encodeURIComponent).join(','))
|
||||
.map((tag) => tag.split(',').map(encodeURIComponent).join(','))
|
||||
.join('+'), // build a beautiful URL
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NamedPage } from 'vj/misc/PageLoader';
|
||||
|
||||
const page = new NamedPage('record_detail', async () => {
|
||||
const SockJs = await import('sockjs-client');
|
||||
const { default: SockJs } = await import('sockjs-client');
|
||||
const { DiffDOM } = await import('diff-dom');
|
||||
|
||||
const sock = new SockJs(Context.socketUrl);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NamedPage } from 'vj/misc/PageLoader';
|
||||
import UserSelectAutoComplete from 'vj/components/autocomplete/UserSelectAutoComplete';
|
||||
|
||||
const page = new NamedPage('record_main', async () => {
|
||||
const SockJs = await import('sockjs-client');
|
||||
const { default: SockJs } = await import('sockjs-client');
|
||||
const { DiffDOM } = await import('diff-dom');
|
||||
|
||||
const sock = new SockJs(Context.socketUrl);
|
||||
|
||||
Reference in new issue
Block a user