Skip to content

Commit 703cab4

Browse files
committed
Suport camera input from local device .
1 parent 486f0c0 commit 703cab4

File tree

5 files changed

+754
-83
lines changed

5 files changed

+754
-83
lines changed

public/js/html5-qrcode.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/web.config

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,21 @@
2020
</rules>
2121
</rewrite>
2222
<staticContent>
23-
<remove fileExtension=".woff2" />
24-
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
23+
<remove fileExtension=".woff2" />
24+
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
2525
</staticContent>
26+
27+
<!-- Thêm phần này để CHO PHÉP dùng camera -->
28+
<httpProtocol>
29+
<customHeaders>
30+
<!-- Sửa Feature-Policy: cho phép camera cho chính site này -->
31+
<add name="Feature-Policy"
32+
value="accelerometer 'none'; autoplay 'none'; camera 'self'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; fullscreen 'self'; geolocation 'none'; sync-xhr 'none'; usb 'none'; xr-spatial-tracking 'none'" />
33+
34+
<!-- Permissions-Policy mới: cho phép camera -->
35+
<add name="Permissions-Policy" value="camera=self" />
36+
</customHeaders>
37+
</httpProtocol>
38+
2639
</system.webServer>
2740
</configuration>

resources/lang/en-US/general.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,6 @@
536536
'serial_number' => 'Serial Number',
537537
'item_notes' => ':item Notes',
538538
'item_name_var' => ':item Name',
539-
'light_mode' => 'Light Mode',
540-
'dark_mode' => 'Dark Mode',
541539
'error_user_company' => 'Checkout target company and asset company do not match',
542540
'error_user_company_multiple' => 'One or more of the checkout target company and asset company do not match',
543541
'error_user_company_accept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager',
@@ -736,5 +734,25 @@
736734

737735
'months_plural' => '1 month|:count months',
738736

737+
// QR Code Scanner translations
738+
'scan_or_type' => 'Scan QR code or type asset tag',
739+
'quickscan_instructions' => 'Scan QR codes with your camera or manually enter asset tags. Press Enter to add, then click Audit to submit all scanned tags at once.',
740+
'scan_assets' => 'Scan Assets',
741+
'scan_assets_help' => 'Scan QR codes or enter asset tags to quickly add assets to checkout. Scanned assets will automatically be added to the selection above.',
742+
'scanned_assets' => 'Scanned Assets',
743+
'asset_not_found' => 'Asset not found',
744+
'start_scanner' => 'Start Camera',
745+
'stop_scanner' => 'Stop Camera',
746+
'scanned_tags' => 'Scanned Tags',
747+
'select_camera' => 'Select Camera',
748+
'detecting_cameras' => 'Detecting cameras...',
749+
'camera_ready' => 'Camera detected and ready',
750+
'no_camera_found' => 'No camera found. Grant camera permission and try again.',
751+
'using_default_camera' => 'Using default camera',
752+
'scanner_running' => 'Scanner is running',
753+
'scanner_active' => 'Scanner is active',
754+
'point_camera_qr' => 'Point your camera at a QR code',
755+
'scanner_library_failed' => 'Scanner library failed to load. Check Content Security Policy (CSP) settings or try again.',
756+
'camera' => 'Camera',
739757

740758
];

0 commit comments

Comments
 (0)