Skip to content

Commit a29729a

Browse files
committed
QrCode: use qr-creator package from npm
1 parent 3d38ea0 commit a29729a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@nimiq/style": "^0.8.0",
1919
"big-integer": "^1.6.44",
2020
"input-format": "^0.2.8",
21-
"qr-code": "github:nimiq/qr-encoder",
21+
"qr-creator": "^1.0.0",
2222
"qr-scanner": "^1.1.1",
2323
"vue": "^2.6.11",
2424
"vue-property-decorator": "^8.4.0"

src/components/QrCode.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<script lang="ts">
66
import {Component, Prop, Vue, Watch} from 'vue-property-decorator';
77
8-
import QrEncoder from 'qr-code';
8+
import QrCreator from 'qr-creator';
99
1010
/**
1111
* **Nimiq QR Code Component**
@@ -69,7 +69,7 @@
6969
return hasValidGradientStops;
7070
},
7171
})
72-
public fill!: string | QrEncoder.LinearGradient | QrEncoder.RadialGradient;
72+
public fill!: string | QrCreator.LinearGradient | QrCreator.RadialGradient;
7373
7474
@Prop({
7575
default: null,
@@ -99,7 +99,7 @@
9999
private async _updateQrCode() {
100100
if (!this.data) return;
101101
await Vue.nextTick(); // Make sure the canvas is in the DOM (it depends on !!data)
102-
QrEncoder.render({
102+
QrCreator.render({
103103
text: this.data,
104104
radius: this.radius,
105105
ecLevel: this.errorCorrection,

yarn.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10277,9 +10277,10 @@ q@^1.1.2:
1027710277
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
1027810278
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
1027910279

10280-
"qr-code@github:nimiq/qr-encoder":
10280+
qr-creator@^1.0.0:
1028110281
version "1.0.0"
10282-
resolved "https://codeload.github.com/nimiq/qr-encoder/tar.gz/d195110e3c3e44a3867fec878904181c6615899f"
10282+
resolved "https://registry.yarnpkg.com/qr-creator/-/qr-creator-1.0.0.tgz#f350a8f0b5be02bd1fc1ef133a038a06ef8bc5ef"
10283+
integrity sha512-C0cqfbS1P5hfqN4NhsYsUXePlk9BO+a45bAQ3xLYjBL3bOIFzoVEjs79Fado9u9BPBD3buHi3+vY+C8tHh4qMQ==
1028310284

1028410285
qr-scanner@^1.1.1:
1028510286
version "1.1.1"

0 commit comments

Comments
 (0)