Compare commits

..

No commits in common. "0.8.3" and "0.8.2" have entirely different histories.
0.8.3 ... 0.8.2

4 changed files with 12 additions and 21 deletions

View File

@ -2,17 +2,9 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.8.3](https://git.odit.services/lfk/selfservice/compare/0.8.2...0.8.3)
- fix: registration code (broke in merge) [`123509d`](https://git.odit.services/lfk/selfservice/commit/123509d0a6d15fe254e28f7a316bd6c260fe7bd2)
- wip: fix registration code [`51f8d0f`](https://git.odit.services/lfk/selfservice/commit/51f8d0fb42d0dbba268799eb9385686d22fd2284)
#### [0.8.2](https://git.odit.services/lfk/selfservice/compare/0.8.1...0.8.2) #### [0.8.2](https://git.odit.services/lfk/selfservice/compare/0.8.1...0.8.2)
> 3 February 2023
- move /registered/ to props [`c35f943`](https://git.odit.services/lfk/selfservice/commit/c35f943957e5ba84361a437c1d945331248746d1) - move /registered/ to props [`c35f943`](https://git.odit.services/lfk/selfservice/commit/c35f943957e5ba84361a437c1d945331248746d1)
- 🚀Bumped version to v0.8.2 [`f4d1c7b`](https://git.odit.services/lfk/selfservice/commit/f4d1c7b053d1e7210911772bde1b2d80a30ab225)
- /profile/ text cleanups [`64e6ef8`](https://git.odit.services/lfk/selfservice/commit/64e6ef8cec38a8193c4fb28c5f1b26ee0e4d5063) - /profile/ text cleanups [`64e6ef8`](https://git.odit.services/lfk/selfservice/commit/64e6ef8cec38a8193c4fb28c5f1b26ee0e4d5063)
- /profile/ move from anchor tag to button [`ac75828`](https://git.odit.services/lfk/selfservice/commit/ac75828309043532c6ab8aad63e0c40edf450459) - /profile/ move from anchor tag to button [`ac75828`](https://git.odit.services/lfk/selfservice/commit/ac75828309043532c6ab8aad63e0c40edf450459)
- /profile/ toast styles [`c7f3a89`](https://git.odit.services/lfk/selfservice/commit/c7f3a893af8705af12f2e7ae7e40197ca4c28666) - /profile/ toast styles [`c7f3a89`](https://git.odit.services/lfk/selfservice/commit/c7f3a893af8705af12f2e7ae7e40197ca4c28666)

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-selfservice", "name": "@odit/lfk-selfservice",
"version": "0.8.3", "version": "0.8.2",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",

View File

@ -13,4 +13,5 @@ const config = {
url_imprint: '', url_imprint: '',
// optional, will fallback to baseurl_selfservice/privacy // optional, will fallback to baseurl_selfservice/privacy
url_privacy: '', url_privacy: '',
codeformat: 'code39'
}; };

View File

@ -638,19 +638,17 @@ import axios from "redaxios";
import bwipjs from "bwip-js"; import bwipjs from "bwip-js";
function textToBase64Barcode(text) { function textToBase64Barcode(text) {
const canvas = document.createElement("canvas"); var canvas = document.createElement("canvas");
let codeconfig = { bwipjs.toCanvas(canvas, {
bcid: config.code_format || "code39", bcid: config.codeformat || "code39",
text: `${text}`, text: text,
scale: 3, scale: 3,
includetext: false, height: 10,
// width: 10,
includetext: true,
textxalign: "center", textxalign: "center",
backgroundcolor: "ffffff", backgroundcolor: "ffffff",
}; });
if (codeconfig.bcid === "code39" || codeconfig.bcid === "code128"|| codeconfig.bcid === "ean13") {
codeconfig.height = 10;
}
bwipjs.toCanvas(canvas, codeconfig);
return canvas.toDataURL("image/png"); return canvas.toDataURL("image/png");
} }
@ -751,13 +749,13 @@ function get_certificate() {
} else { } else {
var fileURL = window.URL.createObjectURL( var fileURL = window.URL.createObjectURL(
new Blob([response.data], { type: "application/pdf" }) new Blob([response.data], { type: "application/pdf" })
); );
var fileLink = document.createElement("a"); var fileLink = document.createElement("a");
fileLink.href = fileURL; fileLink.href = fileURL;
fileLink.setAttribute("download", "Certificate.pdf"); fileLink.setAttribute("download", "Certificate.pdf");
document.body.appendChild(fileLink); document.body.appendChild(fileLink);
fileLink.click(); fileLink.click();
fileLink.remove(); fileLink.remove();
toast.clear(); toast.clear();