Show error in case of failed NZB upload

Closes #3233
This commit is contained in:
Safihre
2025-12-19 12:40:34 +01:00
parent e3ea5fdd64
commit b19bd65495
4 changed files with 13 additions and 1 deletions

View File

@@ -6,8 +6,12 @@
<span class="glyphicon glyphicon-open"></span> $T('Glitter-notification-uploading') <span class="main-notification-box-file-count"></span>
</div>
<div class="main-notification-box-uploading-failed">
<span class="glyphicon glyphicon-exclamation-sign"></span> $T('Glitter-notification-upload-failed').replace('%s', '') <span class="main-notification-box-file-count"></span>
</div>
<div class="main-notification-box-queue-repair">
<span class="glyphicon glyphicon glyphicon-wrench"></span> $T('Glitter-repairQueue')
<span class="glyphicon glyphicon-wrench"></span> $T('Glitter-repairQueue')
</div>
<div class="main-notification-box-disconnect">

View File

@@ -726,6 +726,9 @@ function ViewModel() {
$('#nzbname').val('')
$('.btn-file em').html(glitterTranslate.chooseFile + '&hellip;')
}
}).fail(function(xhr, status, error) {
// Update the uploading notification text to show error
showNotification('.main-notification-box-uploading-failed', 0, error)
});
}

View File

@@ -69,6 +69,10 @@ legend,
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.main-notification-box-uploading-failed {
color: #F95151;
}
.container,
.modal-body,
.modal-footer {

View File

@@ -899,6 +899,7 @@ SKIN_TEXT = {
"Glitter-notification-removing1": TT("Removing job"), # Notification window
"Glitter-notification-removing": TT("Removing jobs"), # Notification window
"Glitter-notification-shutdown": TT("Shutting down"), # Notification window
"Glitter-notification-upload-failed": TT("Failed to upload file: %s"), # Notification window
# Wizard
"wizard-quickstart": TT("SABnzbd Quick-Start Wizard"),
"wizard-version": TT("SABnzbd Version"),