mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: add contest private files (#1053)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
9729346ad9
commit
f5ef8b7f38
35 files changed
+781
-843
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user