mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Debug Log: Copy URL instead of open in browser
This commit is contained in:
committed by
Scott Nonnenberg
parent
dc81bf2bba
commit
7bb7c0d1e1
@@ -7,17 +7,33 @@
|
||||
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.LinkedCopiedToast = Whisper.ToastView.extend({
|
||||
render_attributes() {
|
||||
return { toastMessage: i18n('debugLogLinkCopied') };
|
||||
},
|
||||
});
|
||||
|
||||
Whisper.DebugLogLinkView = Whisper.View.extend({
|
||||
templateName: 'debug-log-link',
|
||||
initialize(options) {
|
||||
this.url = options.url;
|
||||
},
|
||||
events: {
|
||||
'click .copy': 'copy',
|
||||
},
|
||||
render_attributes() {
|
||||
return {
|
||||
url: this.url,
|
||||
reportIssue: i18n('reportIssue'),
|
||||
debugLogCopy: i18n('debugLogCopy'),
|
||||
debugLogCopyAlt: i18n('debugLogCopyAlt'),
|
||||
};
|
||||
},
|
||||
copy(e) {
|
||||
e.preventDefault();
|
||||
window.copyText(e.currentTarget.href);
|
||||
Whisper.ToastView.show(Whisper.LinkedCopiedToast, document.body);
|
||||
},
|
||||
});
|
||||
Whisper.DebugLogView = Whisper.View.extend({
|
||||
templateName: 'debug-log',
|
||||
|
||||
Reference in New Issue
Block a user