mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-28 12:23:31 +01:00
Show error if debug log upload fails
This commit is contained in:
@@ -55,16 +55,25 @@
|
||||
this.$('.buttons, textarea').remove();
|
||||
this.$('.result').addClass('loading');
|
||||
|
||||
const publishedLogURL = await window.log.publish(text);
|
||||
const view = new Whisper.DebugLogLinkView({
|
||||
url: publishedLogURL,
|
||||
el: this.$('.result'),
|
||||
});
|
||||
this.$('.loading').removeClass('loading');
|
||||
view.render();
|
||||
this.$('.link')
|
||||
.focus()
|
||||
.select();
|
||||
try {
|
||||
const publishedLogURL = await window.log.publish(text);
|
||||
const view = new Whisper.DebugLogLinkView({
|
||||
url: publishedLogURL,
|
||||
el: this.$('.result'),
|
||||
});
|
||||
this.$('.loading').removeClass('loading');
|
||||
view.render();
|
||||
this.$('.link')
|
||||
.focus()
|
||||
.select();
|
||||
} catch (error) {
|
||||
console.log(
|
||||
'DebugLogView error:',
|
||||
error && error.stack ? error.stack : error
|
||||
);
|
||||
this.$('.loading').removeClass('loading');
|
||||
this.$('.result').text(i18n('debugLogError'));
|
||||
}
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user