mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
- The General/ level is gone: its 109 files moved up into the folders of the same name, and its topic table is the "Shared topics" section of Features.md. - Accessibility is one folder, docs/Features/Accessibility/, with the Admin Panel's accessibility page in it. - Every folder's main page is README.md (110 X/X.md pages renamed with git mv, five merged with an existing README.md, 26 index pages added for folders that had none), so a folder opened on GitHub shows its page. - The 73 "# Moved" forwarding pages are deleted, with the folders that held only them; every link that went to one goes to its final page. - docs/Features/README.md has the website's "Features in WeKan" overview, each feature linking to its page here. 1,129 Markdown links in 262 files and 352 doc paths in code, tests, compose, snap and release files follow. tests/docsFeaturesLayout.test.cjs fails when General/ or a "# Moved" page comes back, a folder has no README.md, or a relative link in the docs or README.md does not resolve. Thanks to xet7 !
3.6 KiB
3.6 KiB
Card menu / QR code
What it is
Card menu (☰ in the opened card's header, Card Actions) → QR code
shows the card's link as a QR code, to open the card on a phone or tablet
(#2015; cardQrCodePopup in
client/components/cards/cardDetails.jade). Point the phone's camera at the
screen and the card opens there, without typing its address.
Read more
- QR code on Wikipedia - the symbol, its versions and error correction levels (the standard is ISO/IEC 18004).
- Reed–Solomon error correction - how a QR code still reads with part of it hidden.
- In WeKan: Board item links.
How to use it
- Open the card and click ☰ in its header (Card Actions).
- Under Share and history, click QR code.
- Scan the code with a phone or tablet, and sign in there if asked.
Who sees it
Every signed-in user who can open the card. It changes nothing.
What it shows
- The QR code of the card's absolute address (the same one Copy link to clipboard copies; see Board item links), 264 × 264 pixels.
- Scan it to open this card on a phone or tablet. and the address as text.
- If the address is too long for the encoder: The link of this card is too long for a QR code.
The code is drawn in the browser by models/lib/qrCode.js (byte mode, error
correction level M, versions 1-10, up to 213 bytes). Nothing is sent
anywhere. Whoever scans it still has to sign in and have access to the
board.
How the numbers are calculated
From models/lib/qrCode.js:
- Version: the smallest of versions 1-10 whose level-M byte capacity holds
the address's UTF-8 bytes (
versionFor). Capacity is the sum of the data codewords of its blocks (BLOCKS_M), less the mode and length bits; version 1 holds 14 bytes, version 10 holds 213. Over 213 bytes there is no code, and the "too long" message is shown. - Size: version × 4 + 17 modules a side (21 for version 1, 57 for version 10), plus a quiet zone of 4 modules on every side.
- Mask: each of the eight masks is tried and the one with the lowest penalty
score of the standard is used (
penalty). - Error correction: Reed–Solomon over GF(256) with the polynomial x^8 + x^4 + x^3 + x^2 + 1; level M restores about 15 % of the codewords.
- Picture: drawn as SVG at 6 pixels a module (
qrSvg(url, { scale: 6 })) and shown 264 × 264 pixels.
How it works in WeKan
- Client:
Template.cardQrCodePopupin client/components/cards/cardDetails.js takescard.absoluteUrl(), callsqrSvg, and shows it as adata:image/svg+xmlimage. The SVG is the encoder's own markup, never the link's text. - Encoder: models/lib/qrCode.js, pure, with no dependency.
- Tests: tests/qrCode.test.cjs checks the encoder against qrcode-svg, the encoder Meteor's own accounts-2fa ships, and the popup's template.