Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display or not the QR code #10

Open
borishalleux opened this issue Jan 2, 2021 · 3 comments
Open

Display or not the QR code #10

borishalleux opened this issue Jan 2, 2021 · 3 comments

Comments

@borishalleux
Copy link

borishalleux commented Jan 2, 2021

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.

@TeraTech
Copy link
Owner

TeraTech commented Feb 7, 2021

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?

@borishalleux
Copy link
Author

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.

@Binog
Copy link

Binog commented Jun 12, 2021

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

Any Idea, I could try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants