core&ui: add contest private files (#1053)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda authored and GitHub committed 2025-10-17 10:24:38 +01:00
1 parent 9729346ad9
commit f5ef8b7f38
35 files changed
+781 -843

No files matched your search

+4 -3
View File
@@ -1,5 +1,6 @@
import { Classes } from '@blueprintjs/core';
import $ from 'jquery';
import React from 'react';
import { Dialog } from 'vj/components/dialog/index';
import Notification from 'vj/components/notification';
import {
@@ -82,9 +83,9 @@ export default async function uploadFiles(endpoint = '', files: File[] | FileLis
Notification.success(i18n('File uploaded successfully.'));
if (options.pjax) {
let params = '';
if (options.type) params += `? d = ${options.type} `;
if (options.sidebar) params += `${params ? '&' : '?'} sidebar = true`;
await pjax.request({ push: false, url: `${endpoint}${params || ''} ` });
if (options.type) params += `?d=${encodeURIComponent(options.type)}`;
if (options.sidebar) params += `${params ? '&' : '?'}sidebar=true`;
await pjax.request({ push: false, url: `${endpoint}${params || ''}` });
}
} catch (e) {
console.error(e);