Fix upload more than 10 media
This commit is contained in:
parent
ac061d22fe
commit
0760bbaf0f
@ -210,6 +210,10 @@ export default class PopupNewMedia extends PopupElement {
|
||||
const container = this.container;
|
||||
const willAttach = this.willAttach;
|
||||
|
||||
if(files.length > 10 && willAttach.type == 'media') {
|
||||
willAttach.type = 'document';
|
||||
}
|
||||
|
||||
files = files.filter(file => {
|
||||
if(willAttach.type == 'media') {
|
||||
return ['image/', 'video/'].find(s => file.type.indexOf(s) === 0);
|
||||
|
@ -318,7 +318,7 @@ export function wrapDocument(doc: MyDocument, withTime = false, uploading = fals
|
||||
icoDiv.classList.add('document-ico');
|
||||
|
||||
if(doc.thumbs?.length || (uploading && doc.url)) {
|
||||
docDiv.classList.add('photo');
|
||||
docDiv.classList.add('document-with-thumb');
|
||||
|
||||
if(uploading) {
|
||||
icoDiv.innerHTML = `<img src="${doc.url}">`;
|
||||
|
@ -6,7 +6,10 @@
|
||||
background-color: $color-blue;
|
||||
border-radius: .5rem;
|
||||
line-height: 10px;
|
||||
padding: 0 .25rem;
|
||||
|
||||
.document:not(.document-with-thumb) & {
|
||||
padding: 1.5rem .25rem 0 .25rem;
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: "";
|
||||
@ -60,14 +63,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.photo) {
|
||||
.document-ico {
|
||||
padding-top: 1.5rem;
|
||||
//background-image: url('../assets/img/doc-in.svg');
|
||||
}
|
||||
}
|
||||
|
||||
&.photo {
|
||||
&.document-with-thumb {
|
||||
.document-ico {
|
||||
background: #000;
|
||||
border-radius: $border-radius;
|
||||
|
@ -34,11 +34,7 @@
|
||||
> div {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-document, &.is-album {
|
||||
#{$parent}-photo {
|
||||
img, video {
|
||||
object-fit: cover;
|
||||
width: 100%;
|
||||
|
Loading…
Reference in New Issue
Block a user