pull/461/head
Mikunj 6 years ago
parent 3d179909c7
commit 21dad58537

@ -1922,8 +1922,7 @@
},
"showQRCode": {
"message": "Show QR code",
"description":
"Button action that the user can click to view their QR code"
"description": "Button action that the user can click to view their QR code"
},
"seedViewTitle": {

@ -14,9 +14,7 @@
initialize(options = {}) {
this.okText = options.okText || i18n('ok');
this.render();
this.$('.qr-dialog').bind('keyup', event =>
this.onKeyup(event)
);
this.$('.qr-dialog').bind('keyup', event => this.onKeyup(event));
if (options.string) {
this.qr = new QRCode(this.$('#qr')[0], {

@ -402,16 +402,16 @@ window.Signal.Logs = require('./js/modules/logs');
// Add right-click listener for selected text and urls
const contextMenu = require('electron-context-menu');
const isQR = (params) => params.mediaType === 'image' && params.titleText === 'Scan me!';
const isQR = params =>
params.mediaType === 'image' && params.titleText === 'Scan me!';
// QR saving doesn't work so we just disable it
contextMenu({
showInspectElement: false,
shouldShowMenu: (event, params) => {
const isRegular = params.mediaType === 'none' && (params.linkURL || params.selectionText);
return Boolean(
!params.isEditable && (isQR(params) || isRegular)
)
const isRegular =
params.mediaType === 'none' && (params.linkURL || params.selectionText);
return Boolean(!params.isEditable && (isQR(params) || isRegular));
},
menu: (actions, params) => {
// If it's not a QR then show the default options

@ -862,7 +862,6 @@ $loading-height: 16px;
}
.qr-dialog {
.content {
width: 300px !important;
max-width: none !important;

@ -333,7 +333,7 @@ export class MainHeader extends React.Component<Props, any> {
onClick: () => {
trigger('showQRDialog');
},
}
},
];
const passItem = (type: string) => ({

Loading…
Cancel
Save