mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 19:19:29 +00:00
Optimize z-related components: Bundle analyzer, Brotli compression, ZXing lazy loading
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
parent
cb26e6d181
commit
130b08090a
4 changed files with 45 additions and 16 deletions
|
|
@ -33,6 +33,11 @@ export default class extends Controller {
|
|||
connect() {
|
||||
console.log('Init Scanner');
|
||||
|
||||
// Configure ZXing WASM when scanner is actually used (optimization)
|
||||
import('../../js/zxing_config').then(({ configureZXing }) => {
|
||||
configureZXing();
|
||||
}).catch(console.error);
|
||||
|
||||
//This function ensures, that the qrbox is 70% of the total viewport
|
||||
let qrboxFunction = function(viewfinderWidth, viewfinderHeight) {
|
||||
let minEdgePercentage = 0.7; // 70%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue