mirror of
https://github.com/nicolabs/mastodon-timeline-widget.git
synced 2026-04-10 07:56:02 +02:00
update add error message if token turns invalid
This commit is contained in:
parent
42efc47e2f
commit
efaaa63188
|
|
@ -71,6 +71,13 @@
|
|||
border-radius: 5px;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.mt-error {
|
||||
color: darkred;
|
||||
background: lightpink;
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
}
|
||||
/* <<< */
|
||||
|
||||
/* light theme >>> */
|
||||
|
|
|
|||
|
|
@ -73,6 +73,13 @@ MastodonApi.prototype.listStatuses = function() {
|
|||
// fix content link target
|
||||
$('a', this.widget).attr('target', '_blank');
|
||||
}
|
||||
,error: function(d_) {
|
||||
//console.log( d_ );
|
||||
if(d_.responseJSON) {
|
||||
$('.mt-header', mapi.widget).html('ERROR');
|
||||
$('.mt-body', mapi.widget).html( '<div class="mt-error">' + d_.responseJSON.error + '</div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue