Show specific message type for loading

This commit is contained in:
Norbert Renner 2021-03-24 09:32:49 +01:00
parent 6a2da2064c
commit 9f5cb05532
2 changed files with 9 additions and 1 deletions

View file

@ -174,7 +174,7 @@ BR.LayersConfig = L.Class.extend({
_showOverpassLoadingIndicator: function () {
this._overpassActiveRequestCount++;
this._overpassLoadingIndicator.showInfo(i18next.t('layers.overpass-loading-indicator'));
this._overpassLoadingIndicator.showLoading(i18next.t('layers.overpass-loading-indicator'));
},
_hideOverpassLoadingIndicator: function () {

View file

@ -24,6 +24,10 @@ BR.Message = L.Class.extend({
iconClass = 'fa-exclamation-triangle';
alertClass = 'alert-warning';
break;
case 'loading':
iconClass = 'fa-spinner fa-pulse';
alertClass = 'alert-secondary';
break;
default:
case 'info':
iconClass = 'fa-info-circle';
@ -83,6 +87,10 @@ BR.Message = L.Class.extend({
showInfo: function (msg) {
this._show(msg, 'info');
},
showLoading: function (msg) {
this._show(msg, 'loading');
},
});
// static instance as global control