ui: fix display issue

pull/142/head
undefined 3 years ago
parent cb8549f1db
commit 18b4f3e33b

@ -14,6 +14,7 @@
.problem__tag-item
padding: rem(0px)
margin-left: rem(3px)
margin-bottom: rem(2px)
&:hover
text-decoration: none

@ -14,7 +14,7 @@
+above(rupture.mobile-cutoff)
.immersive--center
width: 200px
width: 230px
margin: 0 auto
.immersive--center

@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.8.26",
"version": "4.8.27",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",

@ -89,13 +89,13 @@ const page = new NamedPage('problem_files', () => {
window.addEventListener('beforeunload', onBeforeUnload);
const dialog = new Dialog({
$body: `\
<div class="upload-label" style="text-align: center;margin-bottom: 8px;color: gray;"></div>
<div class="bp3-progress-bar bp3-intent-primary bp3-no-stripes">
<div class="upload-progress bp3-progress-meter" style="width: 0"></div>
</div>
<div class="file-label" style="text-align: center;margin: 5px 0;color: gray;font-size: small;"></div>
<div class="bp3-progress-bar bp3-intent-primary bp3-no-stripes">
<div class="file-progress bp3-progress-meter" style="width: 0"></div>
</div>
<div class="upload-label" style="text-align: center;margin-bottom: 8px;color: gray;"></div>
<div class="bp3-progress-bar bp3-intent-primary bp3-no-stripes">
<div class="upload-progress bp3-progress-meter" style="width: 0"></div>
</div>`,
});
dialog.open();
@ -116,7 +116,7 @@ const page = new NamedPage('problem_files', () => {
const xhr = new XMLHttpRequest();
xhr.upload.addEventListener('loadstart', () => {
$fileLabel.text(`[${+i + 1}/${files.length}] ${file.name}`);
$fileProgress.width(`${Math.round((+i + 1) / file.length * 100)}%`);
$fileProgress.width(`${Math.round((+i + 1) / files.length * 100)}%`);
$uploadLabel.text(i18n('Uploading... ({0}%)', 0));
$uploadProgress.width(0);
});

Loading…
Cancel
Save