mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: upgrade to blueprintjs6
This commit is contained in:
21 files changed
+101
-93
No files matched your search
@@ -92,7 +92,8 @@ export default defineConfig([
|
||||
'default-param-last': 'off',
|
||||
|
||||
'func-call-spacing': 'off',
|
||||
'@stylistic/func-call-spacing': ['error', 'never'],
|
||||
'function-call-spacing': 'off',
|
||||
'@stylistic/function-call-spacing': ['error', 'never'],
|
||||
indent: 'off',
|
||||
|
||||
'@stylistic/indent': ['warn', 4, {
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
"main": "base.mjs",
|
||||
"dependencies": {
|
||||
"@eslint-react/eslint-plugin": "^1.52.2",
|
||||
"@eslint/compat": "^1.3.0",
|
||||
"@eslint/compat": "^1.3.1",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@stylistic/eslint-plugin": "^4.4.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
||||
"@typescript-eslint/parser": "^8.34.1",
|
||||
"@stylistic/eslint-plugin": "^5.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.35.0",
|
||||
"@typescript-eslint/parser": "^8.35.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-plugin-de-morgan": "^1.3.0",
|
||||
"eslint-plugin-github": "^6.0.0",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"saslprep": "^1.0.3",
|
||||
"schemastery": "^3.16.1",
|
||||
"shorty.js": "^1.0.1",
|
||||
"ws": "^8.18.2"
|
||||
"ws": "^8.18.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
|
||||
+3
-3
@@ -43,8 +43,8 @@
|
||||
"cross-env": "^7.0.3",
|
||||
"cross-spawn": "^7.0.6",
|
||||
"esbuild": "0.25.2",
|
||||
"eslint": "^9.29.0",
|
||||
"eslint-import-resolver-typescript": "^4.4.3",
|
||||
"eslint": "^9.30.0",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-import-resolver-webpack": "^0.13.10",
|
||||
"fs-extra": "^11.3.0",
|
||||
"globals": "^16.2.0",
|
||||
@@ -53,7 +53,7 @@
|
||||
"mongodb-memory-server": "10.1.4",
|
||||
"nyc": "^17.1.0",
|
||||
"ora": "^8.2.0",
|
||||
"oxlint": "^1.3.0",
|
||||
"oxlint": "^1.4.0",
|
||||
"package-json": "^10.0.1",
|
||||
"semver": "^7.7.2",
|
||||
"simple-git": "^3.28.0",
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&>span.bp5-icon>svg {
|
||||
&>span.bp6-icon>svg {
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
@@ -104,7 +104,7 @@
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
&>span.bp5-icon>svg {
|
||||
&>span.bp6-icon>svg {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
background-color: #fafafa;
|
||||
font-weight: 600;
|
||||
|
||||
&>span.bp5-icon>svg {
|
||||
&>span.bp6-icon>svg {
|
||||
color: #1890ff;
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@
|
||||
background-color: #e6f7ff;
|
||||
cursor: pointer;
|
||||
|
||||
&>span.bp5-icon>svg {
|
||||
&>span.bp6-icon>svg {
|
||||
color: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"devDependencies": {
|
||||
"@types/diff": "^8.0.0",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/lodash": "^4.17.18",
|
||||
"@types/lodash": "^4.17.19",
|
||||
"sass": "^1.89.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"semver": "^7.7.2",
|
||||
"shell-quote": "^1.8.3",
|
||||
"superagent": "^10.2.1",
|
||||
"ws": "^8.18.2"
|
||||
"ws": "^8.18.3"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
||||
@@ -48,7 +48,7 @@ function judgeCase(c: NormalizedCase) {
|
||||
if (code < 32 && signalled) message = signals[code];
|
||||
else message = { message: 'Your program returned {0}.', params: [code] };
|
||||
} else {
|
||||
const result = parse(resInteractor.stderr, c.score);
|
||||
const result = parse(resInteractor.stderr, c.score, ctx.config.detail);
|
||||
status = result.status;
|
||||
score = result.score;
|
||||
message = result.message;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"mongodb": "^6.17.0",
|
||||
"mongodb-uri": "^0.9.7",
|
||||
"nanoid": "^5.1.5",
|
||||
"nodemailer": "^7.0.3",
|
||||
"nodemailer": "^7.0.4",
|
||||
"notp": "^2.0.3",
|
||||
"p-queue": "^8.1.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
@@ -52,7 +52,7 @@
|
||||
"superagent": "^10.2.1",
|
||||
"tar": "6.2.1",
|
||||
"thirty-two": "^1.0.2",
|
||||
"ua-parser-js": "^2.0.3"
|
||||
"ua-parser-js": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/adm-zip": "^0.5.7",
|
||||
@@ -60,8 +60,8 @@
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/koa-static-cache": "^5.1.4",
|
||||
"@types/lodash": "^4.17.18",
|
||||
"@types/mime-types": "^2.1.4",
|
||||
"@types/lodash": "^4.17.19",
|
||||
"@types/mime-types": "^3.0.1",
|
||||
"@types/mongodb-uri": "^0.9.4",
|
||||
"@types/nodemailer": "^6.4.17",
|
||||
"@types/notp": "^2.0.5",
|
||||
|
||||
@@ -127,7 +127,7 @@ export function SubtaskConfigTree() {
|
||||
<div className={Classes.TREE}>
|
||||
<ul className={`${Classes.TREE_NODE_LIST} ${Classes.TREE_ROOT}`}>
|
||||
<li className={Classes.TREE_NODE} onClick={autoConfigure}>
|
||||
<div className={`${Classes.TREE_NODE_CONTENT} bp5-tree-node-content-0`}>
|
||||
<div className={`${Classes.TREE_NODE_CONTENT} ${Classes.TREE_NODE_CONTENT}-0`}>
|
||||
<Icon icon="clean" />
|
||||
<span className={Classes.TREE_NODE_LABEL}>{i18n('Auto configure')}</span>
|
||||
</div>
|
||||
@@ -138,7 +138,7 @@ export function SubtaskConfigTree() {
|
||||
className={Classes.TREE_NODE}
|
||||
onClick={() => dispatch({ type: 'problemconfig/addSubtask' })}
|
||||
>
|
||||
<div className={`${Classes.TREE_NODE_CONTENT} bp5-tree-node-content-0`}>
|
||||
<div className={`${Classes.TREE_NODE_CONTENT} ${Classes.TREE_NODE_CONTENT}-0`}>
|
||||
<Icon icon="folder-new" />
|
||||
<span className={Classes.TREE_NODE_LABEL}>{i18n('Add new subtask')}</span>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@ export default function ProblemType() {
|
||||
renderActiveTabPanelOnly
|
||||
>
|
||||
<span className={Classes.TAB}>{i18n('Problem Type')}</span>
|
||||
<Tabs.Expander />
|
||||
<TabsExpander />
|
||||
<Tab
|
||||
id="default"
|
||||
title={i18n('problem_type.default')}
|
||||
|
||||
@@ -84,7 +84,7 @@ export function AddTestcase() {
|
||||
|
||||
return (<>
|
||||
<li className={Classes.TREE_NODE} onClick={auto}>
|
||||
<div className="bp5-tree-node-content bp5-tree-node-content-0">
|
||||
<div className={`${Classes.TREE_NODE_CONTENT} ${Classes.TREE_NODE_CONTENT}-0`}>
|
||||
<Icon icon="clean" />
|
||||
<span className={Classes.TREE_NODE_LABEL}>{i18n('Auto detect')}</span>
|
||||
</div>
|
||||
@@ -99,7 +99,7 @@ export function AddTestcase() {
|
||||
setOpen(true);
|
||||
}}
|
||||
>
|
||||
<div className="bp5-tree-node-content bp5-tree-node-content-0">
|
||||
<div className={`${Classes.TREE_NODE_CONTENT} ${Classes.TREE_NODE_CONTENT}-0`}>
|
||||
<Icon icon="clean" />
|
||||
<span className={Classes.TREE_NODE_LABEL}>{i18n('Add testcase')}</span>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CustomSelectAutoComplete } from '@hydrooj/components';
|
||||
import { parseMemoryMB, parseTimeMS } from '@hydrooj/utils/lib/common';
|
||||
import {
|
||||
Button, ControlGroup,
|
||||
Button, Classes, ControlGroup,
|
||||
Dialog, DialogBody, DialogFooter,
|
||||
Icon, InputGroup, Tag,
|
||||
} from '@blueprintjs/core';
|
||||
@@ -101,35 +101,35 @@ export function SubtaskSettings(props: SubtaskSettingsProps) {
|
||||
</DialogBody>
|
||||
<DialogFooter actions={<Button className="primary rounded button" onClick={onConfirm} intent="primary" text="Save" />} />
|
||||
</Dialog>
|
||||
<li className="bp5-tree-node" onClick={() => setOpen(true)}>
|
||||
<div className="bp5-tree-node-content">
|
||||
<span className="bp5-tree-node-caret-none bp5-icon-standard"></span>
|
||||
<li className={Classes.TREE_NODE} onClick={() => setOpen(true)}>
|
||||
<div className={Classes.TREE_NODE_CONTENT}>
|
||||
<span className={`${Classes.TREE_NODE_CARET_NONE} ${Classes.ICON_STANDARD}`}></span>
|
||||
<Icon icon="time" />
|
||||
|
||||
<span className={`bp5-tree-node-label${time ? '' : ' text-gray'}`}>{time || props.time || '1s'}</span>
|
||||
<span className={`${Classes.TREE_NODE_LABEL}${time ? '' : ' text-gray'}`}>{time || props.time || '1s'}</span>
|
||||
<Icon icon="comparison" />
|
||||
|
||||
<span className={`bp5-tree-node-label${memory ? '' : ' text-gray'}`}>{memory || props.memory || '256m'}</span>
|
||||
<span className={`${Classes.TREE_NODE_LABEL}${memory ? '' : ' text-gray'}`}>{memory || props.memory || '256m'}</span>
|
||||
<Icon icon="star" />
|
||||
{' '}
|
||||
<span className="bp5-tree-node-secondary-label">{score || 0}</span>
|
||||
<span className={Classes.TREE_NODE_SECONDARY_LABEL}>{score || 0}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li className="bp5-tree-node" onClick={() => setDepsOpen(true)}>
|
||||
<div className="bp5-tree-node-content">
|
||||
<span className="bp5-tree-node-caret-none bp5-icon-standard"></span>
|
||||
<li className={Classes.TREE_NODE} onClick={() => setDepsOpen(true)}>
|
||||
<div className={Classes.TREE_NODE_CONTENT}>
|
||||
<span className={`${Classes.TREE_NODE_CARET_NONE} ${Classes.ICON_STANDARD}`}></span>
|
||||
<Icon icon="diagram-tree" />
|
||||
|
||||
<span className="bp5-tree-node-label">{i18n('Dependencies')}: {deps.length ? deps.join(', ') : i18n('(None)')}</span>
|
||||
<span className={Classes.TREE_NODE_LABEL}>{i18n('Dependencies')}: {deps.length ? deps.join(', ') : i18n('(None)')}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li className="bp5-tree-node">
|
||||
<div className="bp5-tree-node-content">
|
||||
<span className="bp5-tree-node-caret-none bp5-icon-standard"></span>
|
||||
<li className={Classes.TREE_NODE}>
|
||||
<div className={Classes.TREE_NODE_CONTENT}>
|
||||
<span className={`${Classes.TREE_NODE_CARET_NONE} ${Classes.ICON_STANDARD}`}></span>
|
||||
<Icon icon="asterisk" />
|
||||
|
||||
<span className="bp5-tree-node-label">{i18n('Scoring method')}</span>
|
||||
<span className="bp5-tree-node-secondary-label">
|
||||
<span className={Classes.TREE_NODE_LABEL}>{i18n('Scoring method')}</span>
|
||||
<span className={Classes.TREE_NODE_SECONDARY_LABEL}>
|
||||
<select className="compact select" value={ctype} onChange={(e) => setType(e.target.value)}>
|
||||
<option value="min">Min</option>
|
||||
<option value="max">Max</option>
|
||||
@@ -184,14 +184,14 @@ export function GlobalSettings() {
|
||||
</DialogBody>
|
||||
<DialogFooter actions={<Button className="primary rounded button" onClick={onConfirm} intent="primary" text="Save" />} />
|
||||
</Dialog>
|
||||
<li className="bp5-tree-node" onClick={() => setOpen(true)}>
|
||||
<div className="bp5-tree-node-content">
|
||||
<li className="bp6-tree-node" onClick={() => setOpen(true)}>
|
||||
<div className="bp6-tree-node-content">
|
||||
<Icon icon="time" />
|
||||
|
||||
<span className={`bp5-tree-node-label${time ? '' : ' text-gray'}`}>{time || '1s'}</span>
|
||||
<span className={`bp6-tree-node-label${time ? '' : ' text-gray'}`}>{time || '1s'}</span>
|
||||
<Icon icon="comparison" />
|
||||
{' '}
|
||||
<span className={`bp5-tree-node-secondary-label${memory ? '' : ' text-gray'}`}>{memory || '256MB'}</span>
|
||||
<span className={`bp6-tree-node-secondary-label${memory ? '' : ' text-gray'}`}>{memory || '256MB'}</span>
|
||||
</div>
|
||||
</li>
|
||||
</>);
|
||||
|
||||
+22
-15
@@ -1,7 +1,9 @@
|
||||
import { Classes } from '@blueprintjs/core';
|
||||
import $ from 'jquery';
|
||||
import { Dialog } from 'vj/components/dialog/index';
|
||||
import Notification from 'vj/components/notification';
|
||||
import {
|
||||
delay, i18n, pjax, request,
|
||||
delay, i18n, pjax, request, tpl,
|
||||
} from 'vj/utils';
|
||||
|
||||
function onBeforeUnload(e) {
|
||||
@@ -17,15 +19,20 @@ interface UploadOptions {
|
||||
}
|
||||
export default async function uploadFiles(endpoint = '', files: File[] | FileList = [], options: UploadOptions = {}) {
|
||||
const dialog = new Dialog({
|
||||
$body: `
|
||||
<div class="file-label" style="text-align: center; margin-bottom: 5px; color: gray; font-size: small;"></div>
|
||||
<div class="bp5-progress-bar bp5-intent-primary bp5-no-stripes">
|
||||
<div class="file-progress bp5-progress-meter" style="width: 0"></div>
|
||||
$body: $(tpl(<>
|
||||
<div className="file-label" style={{
|
||||
textAlign: 'center', marginBottom: '5px', color: 'gray', fontSize: 'small',
|
||||
}}></div>
|
||||
<div className={`${Classes.PROGRESS_BAR} ${Classes.INTENT_PRIMARY} bp5-no-stripes`}>
|
||||
<div className={`file-progress ${Classes.PROGRESS_METER}`} style={{ width: 0 }}></div>
|
||||
</div>
|
||||
<div class="upload-label" style="text-align: center; margin: 5px 0; color: gray; font-size: small;"></div>
|
||||
<div class="bp5-progress-bar bp5-intent-primary bp5-no-stripes">
|
||||
<div class="upload-progress bp5-progress-meter" style="width: 0"></div>
|
||||
</div>`,
|
||||
<div className="upload-label" style={{
|
||||
textAlign: 'center', margin: '5px 0', color: 'gray', fontSize: 'small',
|
||||
}}></div>
|
||||
<div className={`${Classes.PROGRESS_BAR} ${Classes.INTENT_PRIMARY} bp5-no-stripes`}>
|
||||
<div className={`upload-progress ${Classes.PROGRESS_METER}`} style={{ width: 0 }}></div>
|
||||
</div>
|
||||
</>)),
|
||||
});
|
||||
try {
|
||||
Notification.info(i18n('Uploading files...'));
|
||||
@@ -47,8 +54,8 @@ export default async function uploadFiles(endpoint = '', files: File[] | FileLis
|
||||
xhr() {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.upload.addEventListener('loadstart', () => {
|
||||
$fileLabel.text(`[${+i + 1}/${files.length}] ${file.name}`);
|
||||
$fileProgress.width(`${Math.round((+i + 1) / files.length * 100)}%`);
|
||||
$fileLabel.text(`[${+i + 1}/${files.length}] ${file.name} `);
|
||||
$fileProgress.width(`${Math.round((+i + 1) / files.length * 100)}% `);
|
||||
$uploadLabel.text(i18n('Uploading... ({0}%)', 0));
|
||||
$uploadProgress.width(0);
|
||||
});
|
||||
@@ -57,7 +64,7 @@ export default async function uploadFiles(endpoint = '', files: File[] | FileLis
|
||||
const percentComplete = Math.round((e.loaded / e.total) * 100);
|
||||
if (percentComplete === 100) $uploadLabel.text(i18n('Processing...'));
|
||||
else $uploadLabel.text(i18n('Uploading... ({0}%)', percentComplete));
|
||||
$uploadProgress.width(`${percentComplete}%`);
|
||||
$uploadProgress.width(`${percentComplete}% `);
|
||||
}
|
||||
}, false);
|
||||
return xhr;
|
||||
@@ -69,9 +76,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 = ${options.type} `;
|
||||
if (options.sidebar) params += `${params ? '&' : '?'} sidebar = true`;
|
||||
await pjax.request({ push: false, url: `${endpoint}${params || ''} ` });
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
@@ -11,7 +11,7 @@
|
||||
"cli": false
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blueprintjs/core": "^5.19.0",
|
||||
"@blueprintjs/core": "^6.0.0",
|
||||
"@fontsource/dm-mono": "^5.2.6",
|
||||
"@fontsource/fira-code": "^5.2.6",
|
||||
"@fontsource/inconsolata": "^5.2.6",
|
||||
@@ -21,7 +21,7 @@
|
||||
"@fontsource/source-code-pro": "^5.2.6",
|
||||
"@fontsource/ubuntu-mono": "^5.2.6",
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@sentry/browser": "^9.30.0",
|
||||
"@sentry/browser": "^9.33.0",
|
||||
"@sentry/webpack-plugin": "^3.5.0",
|
||||
"@simplewebauthn/browser": "13.1.0",
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
.textbox,.select
|
||||
margin: 0
|
||||
|
||||
.bp5-tab-panel
|
||||
.bp6-tab-panel
|
||||
margin-top: 5px
|
||||
|
||||
.bp5-dialog
|
||||
.bp6-dialog
|
||||
font-family: var(--code-font-family)
|
||||
background: #fff
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
font-size: 0.875rem
|
||||
color: #666
|
||||
|
||||
.bp5-dialog-footer-fixed
|
||||
.bp6-dialog-footer-fixed
|
||||
border-top: 0
|
||||
|
||||
.button
|
||||
@@ -32,7 +32,7 @@
|
||||
input::placeholder
|
||||
color: rgba(95,107,124,.6)!important
|
||||
|
||||
.bp5-input-group
|
||||
.bp6-input-group
|
||||
input
|
||||
appearance: none
|
||||
display: block
|
||||
@@ -49,10 +49,10 @@
|
||||
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1)
|
||||
box-shadow: none
|
||||
|
||||
.bp5-tag.bp5-minimal
|
||||
.bp6-tag.bp6-minimal
|
||||
background: transparent
|
||||
|
||||
.bp5-input-action
|
||||
.bp6-input-action
|
||||
pointer-events: none
|
||||
|
||||
.problem-config-form
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
<h1 class="section__title">{{ tdoc.title }}</h1>
|
||||
</div>
|
||||
<div class="section__body">
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item">{{ _(model.contest.statusText(tdoc, tsdoc)) }}</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-award">{{ _(model.contest.RULES[tdoc.rule].TEXT) }}</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item">{{ _('Start at') }}: {{ contest.render_time(tsdoc.startAt or tdoc.beginAt) }}</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-schedule">{{ contest.render_duration(tdoc) }} {{ _('hour(s)') }}</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item">{{ _('Host') }}: {{ user.render_inline(udict[tdoc.owner], badge=false) }}</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-user--multiple">{{ tdoc['attend']|default(0) }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item">{{ _(model.contest.statusText(tdoc, tsdoc)) }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-award">{{ _(model.contest.RULES[tdoc.rule].TEXT) }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item">{{ _('Start at') }}: {{ contest.render_time(tsdoc.startAt or tdoc.beginAt) }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-schedule">{{ contest.render_duration(tdoc) }} {{ _('hour(s)') }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item">{{ _('Host') }}: {{ user.render_inline(udict[tdoc.owner], badge=false) }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-user--multiple">{{ tdoc['attend']|default(0) }}</span>
|
||||
{% if tsdoc.attend %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-check">{{ _('Attended') }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-check">{{ _('Attended') }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,26 +88,26 @@
|
||||
<div class="section__body">
|
||||
<ul class="problem__tags">
|
||||
{% if not tdoc %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item">{{ _('ID') }}: {{ pdoc.docId }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item">{{ _('ID') }}: {{ pdoc.docId }}</span>
|
||||
{% endif %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-book">{{ _('problem_type.' + pdoc.config.type).format(pdoc.config.subType) }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-book">{{ _('problem_type.' + pdoc.config.type).format(pdoc.config.subType) }}</span>
|
||||
{% if pdoc.config.type == 'default' and pdoc.config.subType %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-book">{{ _('File IO: {0}').format(pdoc.config.subType) }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-book">{{ _('File IO: {0}').format(pdoc.config.subType) }}</span>
|
||||
{% endif %}
|
||||
{% if pdoc.config.type != 'objective' and pdoc.config.type != 'submit_answer' %}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-stopwatch">{{ pdoc.config.timeMax if pdoc.config.timeMax == pdoc.config.timeMin else pdoc.config.timeMin+'~'+pdoc.config.timeMax }}ms</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item icon icon-comparison">{{ pdoc.config.memoryMax if pdoc.config.memoryMax == pdoc.config.memoryMin else pdoc.config.memoryMin+'~'+pdoc.config.memoryMax }}MiB</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-stopwatch">{{ pdoc.config.timeMax if pdoc.config.timeMax == pdoc.config.timeMin else pdoc.config.timeMin+'~'+pdoc.config.timeMax }}ms</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item icon icon-comparison">{{ pdoc.config.memoryMax if pdoc.config.memoryMax == pdoc.config.memoryMin else pdoc.config.memoryMin+'~'+pdoc.config.memoryMax }}MiB</span>
|
||||
{% endif %}
|
||||
{% if not tdoc %}
|
||||
<a class="bp5-tag bp5-large bp5-minimal bp5-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId}) }}">{{ _('Tried') }}: {{ pdoc.nSubmit }}</a>
|
||||
<a class="bp5-tag bp5-large bp5-minimal bp5-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId, status:1}) }}">{{ _('Accepted') }}: {{ pdoc.nAccept if ((not tdoc) or showAccept) else '?' }}</a>
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item">{{ _('Difficulty') }}: {{ pdoc['difficulty'] or lib.difficulty(pdoc.nSubmit, pdoc.nAccept) or _('(None)') }}</span>
|
||||
<span class="bp5-tag bp5-large bp5-minimal bp5-interactive problem__tag-item">{{ _('Uploaded By') }}: {{ user.render_inline(udoc, badge=false) }}</span>
|
||||
<a class="bp6-tag bp6-large bp6-minimal bp6-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId}) }}">{{ _('Tried') }}: {{ pdoc.nSubmit }}</a>
|
||||
<a class="bp6-tag bp6-large bp6-minimal bp6-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId, status:1}) }}">{{ _('Accepted') }}: {{ pdoc.nAccept if ((not tdoc) or showAccept) else '?' }}</a>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item">{{ _('Difficulty') }}: {{ pdoc['difficulty'] or lib.difficulty(pdoc.nSubmit, pdoc.nAccept) or _('(None)') }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal bp6-interactive problem__tag-item">{{ _('Uploaded By') }}: {{ user.render_inline(udoc, badge=false) }}</span>
|
||||
{% endif %}
|
||||
{% if pdoc.tag.length %}
|
||||
<span name="show_tags" class="bp5-tag bp5-large bp5-minimal bp5-interactive problem__tag-item nojs--hide icon icon-tag">{{ _('Tags') + '>' }}</span>
|
||||
<span name="show_tags" class="bp6-tag bp6-large bp6-minimal bp6-interactive problem__tag-item nojs--hide icon icon-tag">{{ _('Tags') + '>' }}</span>
|
||||
{%- for tag in pdoc.tag -%}
|
||||
<span class="bp5-tag bp5-large bp5-minimal problem__tag-item tags hasjs--hide">{{ tag }}</span>
|
||||
<span class="bp6-tag bp6-large bp6-minimal problem__tag-item tags hasjs--hide">{{ tag }}</span>
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@@ -212,7 +212,7 @@ $hover-background-color = #424242
|
||||
.menu__link.highlight
|
||||
background: rgb(40, 11, 20)
|
||||
|
||||
.bp5-tag.bp5-minimal:not([class*="bp5-intent-"])
|
||||
.bp6-tag.bp6-minimal:not([class*="bp6-intent-"])
|
||||
background-color: rgba(87, 100, 117, .2)
|
||||
color: #d9dfe7
|
||||
|
||||
@@ -391,16 +391,16 @@ $hover-background-color = #424242
|
||||
background-color: $main-background-color !important
|
||||
border-color: #3d3d3d !important
|
||||
|
||||
.bp5-tab
|
||||
.bp6-tab
|
||||
color: #aaa
|
||||
|
||||
&[aria-disabled=true]
|
||||
color: #555
|
||||
|
||||
.bp5-card,.bp5-dialog,.bp5-dialog-header,.bp5-dialog-footer
|
||||
.bp6-card,.bp6-dialog,.bp6-dialog-header,.bp6-dialog-footer
|
||||
background-color: #1f1f1f !important
|
||||
|
||||
.bp5-input-group input
|
||||
.bp6-input-group input
|
||||
border-color: #3d3d3d!important
|
||||
|
||||
&.hasjs .collapsed #status:not([data-status="7"]) .compiler-text-mask
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vitejs/plugin-react": "^4.5.2",
|
||||
"@vitejs/plugin-react": "^4.6.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
@@ -16,6 +16,6 @@
|
||||
"@types/react": "^18.3.23",
|
||||
"@types/react-dom": "^18.3.7",
|
||||
"@vitejs/plugin-react-swc": "^3.10.2",
|
||||
"vite": "^6.3.5"
|
||||
"vite": "^7.0.0"
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
"js-yaml": "^4.1.0",
|
||||
"reggol": "^2.1.0",
|
||||
"search-query-parser": "^1.6.0",
|
||||
"systeminformation": "^5.27.6"
|
||||
"systeminformation": "^5.27.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.4"
|
||||
|
||||
Reference in new issue
Block a user