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 container = this.container;
|
||||||
const willAttach = this.willAttach;
|
const willAttach = this.willAttach;
|
||||||
|
|
||||||
|
if(files.length > 10 && willAttach.type == 'media') {
|
||||||
|
willAttach.type = 'document';
|
||||||
|
}
|
||||||
|
|
||||||
files = files.filter(file => {
|
files = files.filter(file => {
|
||||||
if(willAttach.type == 'media') {
|
if(willAttach.type == 'media') {
|
||||||
return ['image/', 'video/'].find(s => file.type.indexOf(s) === 0);
|
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');
|
icoDiv.classList.add('document-ico');
|
||||||
|
|
||||||
if(doc.thumbs?.length || (uploading && doc.url)) {
|
if(doc.thumbs?.length || (uploading && doc.url)) {
|
||||||
docDiv.classList.add('photo');
|
docDiv.classList.add('document-with-thumb');
|
||||||
|
|
||||||
if(uploading) {
|
if(uploading) {
|
||||||
icoDiv.innerHTML = `<img src="${doc.url}">`;
|
icoDiv.innerHTML = `<img src="${doc.url}">`;
|
||||||
|
@ -6,7 +6,10 @@
|
|||||||
background-color: $color-blue;
|
background-color: $color-blue;
|
||||||
border-radius: .5rem;
|
border-radius: .5rem;
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
padding: 0 .25rem;
|
|
||||||
|
.document:not(.document-with-thumb) & {
|
||||||
|
padding: 1.5rem .25rem 0 .25rem;
|
||||||
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: "";
|
content: "";
|
||||||
@ -60,14 +63,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.photo) {
|
&.document-with-thumb {
|
||||||
.document-ico {
|
|
||||||
padding-top: 1.5rem;
|
|
||||||
//background-image: url('../assets/img/doc-in.svg');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.photo {
|
|
||||||
.document-ico {
|
.document-ico {
|
||||||
background: #000;
|
background: #000;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
@ -34,11 +34,7 @@
|
|||||||
> div {
|
> div {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-document, &.is-album {
|
|
||||||
#{$parent}-photo {
|
|
||||||
img, video {
|
img, video {
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user