mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
if checkexistence removes the last item in the list, call toggleHeader
This commit is contained in:
@@ -80,6 +80,7 @@ $(document).ready(function() {
|
||||
$copyBtn.attr('data-l10n-id', 'copyUrlFormButton');
|
||||
|
||||
const files = storage.files;
|
||||
console.log(files);
|
||||
if (files.length === 0) {
|
||||
toggleHeader();
|
||||
} else {
|
||||
@@ -90,6 +91,7 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// copy link to clipboard
|
||||
$copyBtn.click(() => {
|
||||
// record copied event from success screen
|
||||
@@ -341,6 +343,9 @@ $(document).ready(function() {
|
||||
}
|
||||
} else if (xhr.status === 404) {
|
||||
storage.remove(id);
|
||||
if (storage.numFiles === 0) {
|
||||
toggleHeader();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user