Add link to WebSocket test if WebSocket connection failed
This commit is contained in:
@ -620,7 +620,8 @@ configureEditors: function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.flash.danger({
|
$.flash.danger({
|
||||||
text: $('#flash').data('message-failure')
|
text: $('#flash').data('websocket-failure'),
|
||||||
|
showPermanent: true
|
||||||
});
|
});
|
||||||
Sentry.captureException(JSON.stringify(error));
|
Sentry.captureException(JSON.stringify(error));
|
||||||
},
|
},
|
||||||
|
@ -77,6 +77,11 @@ span.caret {
|
|||||||
|
|
||||||
.flash {
|
.flash {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
|
|
||||||
|
a, a:hover {
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown {
|
.markdown {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#flash-container.container
|
#flash-container.container
|
||||||
#flash.container.fixed_error_messages data-message-failure=t('shared.message_failure')
|
#flash.container.fixed_error_messages data-message-failure=t('shared.message_failure') data-websocket-failure=t('shared.websocket_failure')
|
||||||
- %w[alert danger info notice success warning].each do |severity|
|
- %w[alert danger info notice success warning].each do |severity|
|
||||||
div.alert.flash class="alert-#{{'alert' => 'warning', 'notice' => 'success'}.fetch(severity, severity)} alert-dismissible fade show"
|
div.alert.flash class="alert-#{{'alert' => 'warning', 'notice' => 'success'}.fetch(severity, severity)} alert-dismissible fade show"
|
||||||
p.mb-0 id="flash-#{severity}" = flash[severity]
|
p.mb-0 id="flash-#{severity}" = flash[severity]
|
||||||
|
@ -739,6 +739,7 @@ de:
|
|||||||
link: Hilfe
|
link: Hilfe
|
||||||
index: Index
|
index: Index
|
||||||
message_failure: Leider ist ein Fehler auf unserer Plattform aufgetreten. Bitte probieren Sie es später noch einmal.
|
message_failure: Leider ist ein Fehler auf unserer Plattform aufgetreten. Bitte probieren Sie es später noch einmal.
|
||||||
|
websocket_failure: Leider ist ein Verbindungsproblem aufgetreten. <a href="https://websocketstest.com">Bitte überprüfen Sie Websocket-Verbindungen mit diesem Tool</a> und versuchen Sie es erneut.
|
||||||
new: Hinzufügen
|
new: Hinzufügen
|
||||||
new_model: '%{model} hinzufügen'
|
new_model: '%{model} hinzufügen'
|
||||||
number: Nummer
|
number: Nummer
|
||||||
|
@ -739,6 +739,7 @@ en:
|
|||||||
link: Help
|
link: Help
|
||||||
index: Index
|
index: Index
|
||||||
message_failure: 'Sorry, something went wrong.'
|
message_failure: 'Sorry, something went wrong.'
|
||||||
|
websocket_failure: Sorry, a connection issue occoured. <a href="https://websocketstest.com">Please check WebSocket connections with this tool</a> and try again.
|
||||||
new: Add
|
new: Add
|
||||||
new_model: 'Add %{model}'
|
new_model: 'Add %{model}'
|
||||||
number: Number
|
number: Number
|
||||||
|
@ -7,7 +7,7 @@ $( document ).on('turbolinks:load', function() {
|
|||||||
var container = options.container;
|
var container = options.container;
|
||||||
var html = (options.icon ? '<i class="' + options.icon.join(' ') + '"></i>' : '') + options.text;
|
var html = (options.icon ? '<i class="' + options.icon.join(' ') + '"></i>' : '') + options.text;
|
||||||
container.html(html);
|
container.html(html);
|
||||||
showFlashes();
|
showFlashes(options.showPermanent);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ $( document ).on('turbolinks:load', function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var showFlashes = function() {
|
var showFlashes = function(showPermanent) {
|
||||||
$('.flash').each(function() {
|
$('.flash').each(function() {
|
||||||
var container = $(this);
|
var container = $(this);
|
||||||
var message = container.find('p');
|
var message = container.find('p');
|
||||||
@ -36,6 +36,7 @@ $( document ).on('turbolinks:load', function() {
|
|||||||
|
|
||||||
if (message.html() !== '') {
|
if (message.html() !== '') {
|
||||||
container.slideDown();
|
container.slideDown();
|
||||||
|
if (showPermanent !== true)
|
||||||
container.animation = setTimeout(hide, DURATION);
|
container.animation = setTimeout(hide, DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user