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

QRсode add ability for groups, channels, users #857

Closed
piratov opened this issue Apr 26, 2023 · 4 comments
Closed

QRсode add ability for groups, channels, users #857

piratov opened this issue Apr 26, 2023 · 4 comments

Comments

@piratov
Copy link

piratov commented Apr 26, 2023

1 Add possibility for groups and channels shares QRCode
2 Share QRCode user contacts (vCard)

Screenshot_6Screenshot_7

thx!

@Grabber
Copy link

Grabber commented Aug 4, 2023

nayuki

https://github.com/nayuki/QR-Code-generator/releases

html

<script src="/qrcodegen-v1.8.0-es6.min.js"></script>

js/utils

export function drawNayukiQrCanvas(qr, scale, border, lightColor, darkColor, canvas) {
  if (scale <= 0) scale = 1;
  if (border < 0) border = 0;
  const width = (qr.size + border * 2) * scale;
  canvas.width = width;
  canvas.height = width;
  let ctx = canvas.getContext("2d");
  for (let y = -border; y < qr.size + border; y++) {
    for (let x = -border; x < qr.size + border; x++) {
      ctx.fillStyle = qr.getModule(x, y) ? darkColor : lightColor;
      ctx.fillRect((x + border) * scale, (y + border) * scale, scale, scale);
    }
  }
}

js

const text = "Hello, world!";
const errCorLvl = qrcodegen.QrCode.Ecc.MEDIUM;
const qr = qrcodegen.QrCode.encodeText(text, errCorLvl);
drawNayukiQrCanvas(qr, 12, 1, "#ffffff", "#000000", qrcodeRef);

@or-else
Copy link
Contributor

or-else commented Jan 31, 2024

Android: added in tinode/tindroid@d594bcb

@or-else or-else closed this as completed Jan 31, 2024
@or-else or-else reopened this Jan 31, 2024
or-else added a commit to tinode/ios that referenced this issue Feb 1, 2024
@or-else
Copy link
Contributor

or-else commented Feb 1, 2024

IOS: tinode/ios@57e96aa

@or-else
Copy link
Contributor

or-else commented Feb 3, 2024

WebApp: tinode/webapp@9eaa172

@or-else or-else closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants