Skip to content

Commit 2308989

Browse files
committed
Adjust UI when upload is happening
1 parent 1d7ac18 commit 2308989

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

frontend/src/common/components/Upload/UploadModal.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@
315315
margin: 1.5rem 0;
316316
width: 100%;
317317
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
318+
max-width: 100%;
319+
box-sizing: border-box;
318320
}
319321

320322
&__file-icon {
@@ -333,6 +335,9 @@
333335

334336
&__file-details {
335337
flex: 1;
338+
text-align: left;
339+
width: 100%;
340+
overflow: hidden;
336341
}
337342

338343
&__filename {
@@ -350,6 +355,10 @@
350355
font-size: 0.75rem;
351356
color: #666;
352357
margin-bottom: 0.5rem;
358+
white-space: nowrap;
359+
overflow: hidden;
360+
text-overflow: ellipsis;
361+
max-width: 100%;
353362
}
354363

355364
&__progress {
@@ -358,6 +367,7 @@
358367
margin-top: 0.25rem;
359368
--background: rgba(0, 0, 0, 0.1);
360369
--progress-background: var(--ion-color-primary);
370+
width: 100%;
361371
}
362372

363373
// Fixing the cancel notice styles to match the design exactly

frontend/src/common/components/Upload/UploadModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const UploadModal = ({ isOpen, onClose, onUploadComplete }: UploadModalProps): J
150150
<div className="upload-modal__cancel-notice-icon">
151151
<FontAwesomeIcon icon={faCircleXmark} />
152152
</div>
153-
<span>Upload cancelled.</span>
153+
<span>{t('upload.cancelled', { ns: 'common' })}</span>
154154
</div>
155155
)}
156156

@@ -190,7 +190,7 @@ const UploadModal = ({ isOpen, onClose, onUploadComplete }: UploadModalProps): J
190190
<div className="upload-modal__file-details">
191191
<div className="upload-modal__filename">{file.name}</div>
192192
<div className="upload-modal__file-info">
193-
{formatFileSize(file.size)}{Math.ceil((1 - progress) * 10)} seconds left
193+
{formatFileSize(file.size)}{Math.ceil((1 - progress) * 10)} {t('upload.secondsLeft', { ns: 'common' })}
194194
</div>
195195
{/* Progress bar */}
196196
<IonProgressBar value={progress} className="upload-modal__progress" />

0 commit comments

Comments
 (0)