Skip to content

Commit

Permalink
frontend: add note about dismissing PNotify (botlabs-gg#1443)
Browse files Browse the repository at this point in the history
Add a friendly note about dismissing PNotify alerts.
It isn't much, but a nice info to have nonetheless, QoL wise.
(I used to wait a while too until I figured you can click it to dismiss it)

Signed-off-by: Luca Zeuch <l-zeuch@email.de>
  • Loading branch information
l-zeuch authored Feb 17, 2023
1 parent b01a89d commit 07d76ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/static/js/spongebob.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ function showAlerts(alertsJson) {
if (alert.Style === "success") {
notice = new PNotify({
title: alert.Message,
text: "(Click to dismiss)",
type: 'success',
addclass: 'stack-bar-top click-2-close',
stack: stack_bar_top,
Expand All @@ -163,7 +164,7 @@ function showAlerts(alertsJson) {
} else if (alert.Style === "danger") {
notice = new PNotify({
title: alert.Message,
text: "Read the docs and contact support if you don't know what went wrong.",
text: "Read the docs and contact support if you don't know what went wrong.\n(Click to dismiss)",
type: 'error',
addclass: 'stack-bar-top click-2-close',
stack: stack_bar_top,
Expand Down Expand Up @@ -809,4 +810,4 @@ function loadWidget(destinationParentID, path) {
createRequest("GET", path + "?partial=1", null, function () {
$("#" + destinationParentID).html(this.responseText);
})
}
}

0 comments on commit 07d76ac

Please sign in to comment.