Skip to content

Commit 26fd403

Browse files
committed
Add dual QR code layout for checkin command to accomodate pre-filled AS attendance form when needed
1 parent e5683f3 commit 26fd403

File tree

9 files changed

+12542
-3096
lines changed

9 files changed

+12542
-3096
lines changed

package-lock.json

Lines changed: 9319 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
"@discordjs/builders": "^0.6.0",
2626
"@discordjs/rest": "^0.1.1-canary.0",
2727
"@psibean/discord.js-pagination": "^4.0.0",
28-
"canvas": "^2.11.0",
28+
"canvas": "^3.1.0",
2929
"cron": "^1.8.2",
3030
"discord-api-types": "^0.23.1",
3131
"discord.js": "^13.1.0",
3232
"dotenv": "^8.2.0",
33-
"easyqrcodejs-nodejs": "^4.4.0",
34-
"gm": "^1.23.1",
33+
"easyqrcodejs-nodejs": "^4.5.2",
34+
"gm": "^1.22.0",
3535
"got": "^11.8.2",
36-
"jsonwebtoken": "^8.5.1",
36+
"jsonwebtoken": "^9.0.2",
3737
"lodash": "^4.17.21",
3838
"luxon": "^1.26.0",
3939
"node-schedule": "^2.0.0",

src/assets/as-background.png

6.52 KB
Loading

src/assets/as-qr-logo.png

20.6 KB
Loading
263 KB
Loading

src/commands/Checkin.ts

Lines changed: 161 additions & 72 deletions
Large diffs are not rendered by default.

src/commands/QR.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ export default class QR extends Command {
4747
* @param subtitle event description
4848
* @returns newly generated QR code url
4949
*/
50-
public static generateQR(data: string, title: string, subtitle: string): string {
50+
public static generateQR(data: string, title: string, subtitle: string, org: string = 'acm'): string {
5151
return new QRCode({
5252
text: data,
5353
colorDark: '#000000',
5454
colorLight: 'rgba(0,0,0,0)',
5555
correctLevel: QRCode.CorrectLevel.H,
56-
logo: 'src/assets/acm-qr-logo.png',
56+
logo: `src/assets/${org}-qr-logo.png`,
5757
logoBackgroundTransparent: false,
58-
backgroundImage: 'src/assets/background.png',
58+
backgroundImage: `src/assets/${org}-background.png`,
5959
quietZone: 40,
6060
title: title.substring(0, 36) === title ? title : title.substring(0, 36).concat('...'),
6161
titleTop: -20,

yarn.lock

Lines changed: 3055 additions & 3017 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)