MMM-WiFiPassword icon indicating copy to clipboard operation
MMM-WiFiPassword copied to clipboard

Display or not the QR code

Open borishalleux opened this issue 4 years ago • 3 comments

Hello, One feature that I would find interesting is the ability to display or not the QR code. I tried so and it works fine:

In MMM-WiFiPassword.js:

  • Add the variable: 'showQR: true'
  • Modification of the following code:
if (this.config.showQR) {
	  var qrDiv = document.createElement("div");
	  qrDiv.id = "qrdiv";
	  qrDiv.className = "qr-image";
	  qrDiv.style = "width:" + this.config.qrSize + "px; background-color:" + this.config.colorLight;
	  if (this.config.layoutVertical) {
		qrDiv.className += " layout-vertical";
	  } else {
		qrDiv.className += " layout-horizontal";
	  }  
	  div.appendChild(qrDiv);
	  }

So we only keep the text, which is sometimes enough.

FR / EN translation by Google, sorry.

borishalleux avatar Jan 02 '21 12:01 borishalleux

The variable qrDiv is a fundamental piece of this module. It is used in multiple places throughout the code. What you requested is certainly doable, but will require more testing with the rest of the module before implementing.

Have you tried the change you proposed yourself?

TeraTech avatar Feb 07 '21 03:02 TeraTech

Hello,

I made this change in the module on my MagicMirror and everything works impeccably, the QR is not displayed or nothing instead.

But I don't use MMM-MODAL and WIFIPASSWORD_MODAL so I don't know the impact of this change on that.

borishalleux avatar Feb 14 '21 15:02 borishalleux

do have the same problem, have no QR-Code generated and thus not shown up.

Any Idea, I could try?

Binog avatar Jun 12 '21 19:06 Binog