adaptive styles for file uploads
This commit is contained in:
@@ -456,19 +456,20 @@ export default function UploadSectionFile({
|
||||
{
|
||||
selectedFiles.length > 0 && (
|
||||
<div className="mt-6" >
|
||||
<div className="flex justify-between items-center mb-4" >
|
||||
<div className="selected-file-action-panel" >
|
||||
<div>
|
||||
<p className="text-gray-700 font-medium" >
|
||||
{t('total-files')}: {selectedFiles.length} |
|
||||
{t('uploading')}: {uploadingCount} |
|
||||
{t('completed')}: {completedCount}
|
||||
<p className="selected-file-action-info" >
|
||||
<span>{t('total-files')}: {selectedFiles.length}</span>
|
||||
<span>{t('uploading')}: {uploadingCount}</span>
|
||||
<span>{t('completed')}: {completedCount}</span>
|
||||
</p>
|
||||
<div className="w-full bg-gray-200 rounded-full h-2.5 mt-2">
|
||||
<div
|
||||
className="bg-blue-600 h-2.5 rounded-full transition-all duration-300"
|
||||
style={{ width: `${getTotalProgress}%` }
|
||||
}
|
||||
> </div>
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -491,7 +492,7 @@ export default function UploadSectionFile({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
< div className="space-y-4 max-h-96 overflow-y-auto" >
|
||||
<div className="selected-file-wrapper">
|
||||
{
|
||||
selectedFiles.map((file, index) => (
|
||||
<div
|
||||
@@ -527,9 +528,9 @@ export default function UploadSectionFile({
|
||||
)
|
||||
}
|
||||
</div>
|
||||
< div className="flex items-center" >
|
||||
<div className="selected-file-right-block">
|
||||
<span className={
|
||||
`font-medium text-lg mr-4 ${file.status === 'completed' ? 'text-green-600' :
|
||||
`upload-progress ${file.status === 'completed' ? 'text-green-600' :
|
||||
file.status === 'uploading' ? 'text-blue-600' :
|
||||
'text-gray-600'
|
||||
}`
|
||||
@@ -537,7 +538,7 @@ export default function UploadSectionFile({
|
||||
{file.progress} %
|
||||
</span>
|
||||
< button
|
||||
className="btn btn-cancel text-sm py-1 px-3"
|
||||
className="btn btn-cancel"
|
||||
onClick={() => handleClearFile(file.uploadId || file.name)}
|
||||
type="button"
|
||||
>
|
||||
@@ -559,9 +560,9 @@ export default function UploadSectionFile({
|
||||
|
||||
{
|
||||
file.status === 'pending' && (
|
||||
<div className="mt-3 text-center" >
|
||||
<div className="mt-2 text-center" >
|
||||
<button
|
||||
className="btn btn-confirm text-sm py-1 px-4"
|
||||
className="btn btn-confirm"
|
||||
onClick={() => uploadSingleFile(file)
|
||||
}
|
||||
type="button"
|
||||
|
||||
@@ -395,6 +395,11 @@
|
||||
text-align: left;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.uploaded-image {
|
||||
@@ -439,6 +444,10 @@
|
||||
font-size: 16px;
|
||||
transition: 0.3s;
|
||||
min-width: 120px;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
max-height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
@@ -446,6 +455,50 @@
|
||||
box-shadow: 0 8px 25px v.$shadow-1;
|
||||
}
|
||||
}
|
||||
|
||||
.selected-file-action-panel {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@media (max-width: 900px) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.selected-file-right-block {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
flex-direction: column-reverse;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.upload-progress {
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
margin-right: 16px;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.selected-file-action-info {
|
||||
color: #374151;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.selected-file-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.page-row {
|
||||
|
||||
@@ -214,13 +214,13 @@
|
||||
"error-user-not-have-tokens-for-protect": "User not have tokens for protect",
|
||||
"registration-date": "Registration date",
|
||||
"copied": "Copied",
|
||||
"uploading": "uploading",
|
||||
"clear-all": "clear-all",
|
||||
"upload-all": "upload-all",
|
||||
"remove": "remove",
|
||||
"uploading": "Uploading",
|
||||
"clear-all": "Clear all",
|
||||
"upload-all": "Upload all",
|
||||
"remove": "Remove",
|
||||
"start-upload": "Start upload",
|
||||
"completed": "completed",
|
||||
"pending": "pending"
|
||||
"completed": "Completed",
|
||||
"pending": "Pending"
|
||||
},
|
||||
"Login-register-form": {
|
||||
"and": "and",
|
||||
|
||||
@@ -214,13 +214,13 @@
|
||||
"error-user-not-have-tokens-for-protect": "У пользователя нет токенов для защиты.",
|
||||
"registration-date": "Дата регистрации",
|
||||
"copied": "Скопировано",
|
||||
"uploading": "загрузка",
|
||||
"clear-all": "очистить всё",
|
||||
"upload-all": "загрузить всё",
|
||||
"remove": "удалить",
|
||||
"uploading": "Загрузка",
|
||||
"clear-all": "Очистить всё",
|
||||
"upload-all": "Загрузить всё",
|
||||
"remove": "Удалить",
|
||||
"start-upload": "Начать загрузку",
|
||||
"completed": "завершено",
|
||||
"pending": "в ожидании"
|
||||
"completed": "Завершено",
|
||||
"pending": "В ожидании"
|
||||
},
|
||||
"Login-register-form": {
|
||||
"and": "и",
|
||||
|
||||
Reference in New Issue
Block a user