mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
fix "and 2 other files" div not cleared properly
This commit is contained in:
parent
6679ef7529
commit
c71bf456e3
2 changed files with 24 additions and 24 deletions
|
@ -695,20 +695,20 @@ class ReceiveDialog extends Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
_parseFileData(displayName, connectionHash, files, imagesOnly, totalSize) {
|
_parseFileData(displayName, connectionHash, files, imagesOnly, totalSize) {
|
||||||
if (files.length > 1) {
|
let fileOther = "";
|
||||||
let fileOther;
|
|
||||||
if (files.length === 2) {
|
if (files.length === 2) {
|
||||||
fileOther = imagesOnly
|
fileOther = imagesOnly
|
||||||
? Localization.getTranslation("dialogs.file-other-description-image")
|
? Localization.getTranslation("dialogs.file-other-description-image")
|
||||||
: Localization.getTranslation("dialogs.file-other-description-file");
|
: Localization.getTranslation("dialogs.file-other-description-file");
|
||||||
} else {
|
} else if (files.length >= 2) {
|
||||||
fileOther = imagesOnly
|
fileOther = imagesOnly
|
||||||
? Localization.getTranslation("dialogs.file-other-description-image-plural", null, {count: files.length - 1})
|
? Localization.getTranslation("dialogs.file-other-description-image-plural", null, {count: files.length - 1})
|
||||||
: Localization.getTranslation("dialogs.file-other-description-file-plural", null, {count: files.length - 1});
|
: Localization.getTranslation("dialogs.file-other-description-file-plural", null, {count: files.length - 1});
|
||||||
}
|
|
||||||
this.$fileOther.innerText = fileOther;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$fileOther.innerText = fileOther;
|
||||||
|
|
||||||
const fileName = files[0].name;
|
const fileName = files[0].name;
|
||||||
const fileNameSplit = fileName.split('.');
|
const fileNameSplit = fileName.split('.');
|
||||||
const fileExtension = '.' + fileNameSplit[fileNameSplit.length - 1];
|
const fileExtension = '.' + fileNameSplit[fileNameSplit.length - 1];
|
||||||
|
|
|
@ -696,20 +696,20 @@ class ReceiveDialog extends Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
_parseFileData(displayName, connectionHash, files, imagesOnly, totalSize) {
|
_parseFileData(displayName, connectionHash, files, imagesOnly, totalSize) {
|
||||||
if (files.length > 1) {
|
let fileOther = "";
|
||||||
let fileOther;
|
|
||||||
if (files.length === 2) {
|
if (files.length === 2) {
|
||||||
fileOther = imagesOnly
|
fileOther = imagesOnly
|
||||||
? Localization.getTranslation("dialogs.file-other-description-image")
|
? Localization.getTranslation("dialogs.file-other-description-image")
|
||||||
: Localization.getTranslation("dialogs.file-other-description-file");
|
: Localization.getTranslation("dialogs.file-other-description-file");
|
||||||
} else {
|
} else if (files.length >= 2) {
|
||||||
fileOther = imagesOnly
|
fileOther = imagesOnly
|
||||||
? Localization.getTranslation("dialogs.file-other-description-image-plural", null, {count: files.length - 1})
|
? Localization.getTranslation("dialogs.file-other-description-image-plural", null, {count: files.length - 1})
|
||||||
: Localization.getTranslation("dialogs.file-other-description-file-plural", null, {count: files.length - 1});
|
: Localization.getTranslation("dialogs.file-other-description-file-plural", null, {count: files.length - 1});
|
||||||
}
|
|
||||||
this.$fileOther.innerText = fileOther;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.$fileOther.innerText = fileOther;
|
||||||
|
|
||||||
const fileName = files[0].name;
|
const fileName = files[0].name;
|
||||||
const fileNameSplit = fileName.split('.');
|
const fileNameSplit = fileName.split('.');
|
||||||
const fileExtension = '.' + fileNameSplit[fileNameSplit.length - 1];
|
const fileExtension = '.' + fileNameSplit[fileNameSplit.length - 1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue