mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-08 20:19:30 +00:00
Complete z-related optimizations with documentation and enhanced error handling
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
parent
130b08090a
commit
1e97aa3f22
2 changed files with 68 additions and 1 deletions
|
|
@ -34,9 +34,13 @@ export default class extends Controller {
|
|||
console.log('Init Scanner');
|
||||
|
||||
// Configure ZXing WASM when scanner is actually used (optimization)
|
||||
// This reduces initial app bundle size and improves startup performance
|
||||
import('../../js/zxing_config').then(({ configureZXing }) => {
|
||||
console.log('ZXing WASM configuration loaded on-demand');
|
||||
configureZXing();
|
||||
}).catch(console.error);
|
||||
}).catch((error) => {
|
||||
console.warn('Failed to load ZXing configuration:', error);
|
||||
});
|
||||
|
||||
//This function ensures, that the qrbox is 70% of the total viewport
|
||||
let qrboxFunction = function(viewfinderWidth, viewfinderHeight) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue