mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Load all frontend packages conditionally
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
@if (!GROCY_FEATURE_FLAG_DISABLE_BROWSER_BARCODE_CAMERA_SCANNING)
|
||||
|
||||
@php require_frontend_packages(['quagga2']); @endphp
|
||||
|
||||
@once
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/barcodescanner.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@once
|
||||
@push('pageScripts')
|
||||
<script src="{{ $U('/node_modules/@ericblade/quagga2/dist/quagga.min.js?v=', true) }}{{ $version }}"></script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@push('pageStyles')
|
||||
<style>
|
||||
#barcodescanner-start-button {
|
||||
@@ -25,7 +21,6 @@
|
||||
.combobox-container #barcodescanner-start-button {
|
||||
margin-right: 36px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
|
Reference in New Issue
Block a user