diff --git a/components/ColorInput.vue b/components/ColorInput.vue new file mode 100644 index 00000000..d162bd17 --- /dev/null +++ b/components/ColorInput.vue @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/package-lock.json b/package-lock.json index 5879b100..5370d777 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14222,6 +14222,11 @@ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, + "qrcode.vue": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-1.7.0.tgz", + "integrity": "sha512-R7t6Y3fDDtcU7L4rtqwGUDP9xD64gJhIwpfjhRCTKmBoYF6SS49PIJHRJ048cse6OI7iwTwgyy2C46N9Ygoc6g==" + }, "qs": { "version": "6.10.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", diff --git a/package.json b/package.json index 054995dc..794a1e3e 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "crypto-js": "^4.0.0", "nuxt": "^2.15.6", "nuxt-i18n": "^6.27.0", + "qrcode.vue": "^1.7.0", "vuetify": "^2.5.0", "vuetify-toast-snackbar": "^0.6.1" }, diff --git a/pages/tools/web/qrcode-generator.vue b/pages/tools/web/qrcode-generator.vue new file mode 100644 index 00000000..d3165796 --- /dev/null +++ b/pages/tools/web/qrcode-generator.vue @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + download as png + + + download as svg + + + + + + + + diff --git a/types/qrcode.vue.d.ts b/types/qrcode.vue.d.ts new file mode 100644 index 00000000..875768b0 --- /dev/null +++ b/types/qrcode.vue.d.ts @@ -0,0 +1 @@ +declare module 'qrcode.vue'; diff --git a/utils/file.ts b/utils/file.ts new file mode 100644 index 00000000..9f545ef7 --- /dev/null +++ b/utils/file.ts @@ -0,0 +1,10 @@ +const downloadBase64File = (dataUrl: string, name = 'file') => { + const a = document.createElement('a') + a.href = dataUrl + a.download = name + a.click() +} + +export { + downloadBase64File +}