Skip to content

Commit

Permalink
Merge tag 'v1.15.1' into order-details
Browse files Browse the repository at this point in the history
# Conflicts:
#	templates/parts/info/_main_infos.html.twig
  • Loading branch information
Fabian Wunsch committed Jan 21, 2025
2 parents 756a201 + 0f42382 commit 3f061af
Show file tree
Hide file tree
Showing 164 changed files with 24,329 additions and 9,857 deletions.
1 change: 1 addition & 0 deletions .docker/symfony.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
PassEnv PROVIDER_OCTOPART_CLIENT_ID PROVIDER_OCTOPART_SECRET PROVIDER_OCTOPART_CURRENCY PROVIDER_OCTOPART_COUNTRY PROVIDER_OCTOPART_SEARCH_LIMIT PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS
PassEnv PROVIDER_MOUSER_KEY PROVIDER_MOUSER_SEARCH_OPTION PROVIDER_MOUSER_SEARCH_LIMIT PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE
PassEnv PROVIDER_LCSC_ENABLED PROVIDER_LCSC_CURRENCY
PassEnv PROVIDER_OEMSECRETS_KEY PROVIDER_OEMSECRETS_COUNTRY_CODE PROVIDER_OEMSECRETS_CURRENCY PROVIDER_OEMSECRETS_ZERO_PRICE PROVIDER_OEMSECRETS_SET_PARAM PROVIDER_OEMSECRETS_SORT_CRITERIA
PassEnv EDA_KICAD_CATEGORY_DEPTH

# For most configuration files from conf-available/, which are
Expand Down
Empty file added .env.dev
Empty file.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]
php-versions: [ '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql', 'sqlite', 'postgres' ]

env:
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
run: ./bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
env_vars: PHP_VERSION,DB_TYPE
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BASE_IMAGE=debian:bookworm-slim
ARG PHP_VERSION=8.2
ARG PHP_VERSION=8.3

FROM ${BASE_IMAGE} AS base
ARG PHP_VERSION
Expand Down Expand Up @@ -125,6 +125,7 @@ upload_max_filesize=256M
post_max_size=300M
opcache.preload_user=www-data
opcache.preload=/var/www/html/config/preload.php
log_limit=8096
EOF

COPY ./.docker/symfony.conf /etc/apache2/sites-available/symfony.conf
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.14.0
1.15.1
1 change: 1 addition & 0 deletions assets/controllers/elements/ckeditor_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class extends Controller {

const config = {
language: language,
licenseKey: "GPL",
}

const watchdog = new EditorWatchdog();
Expand Down
10 changes: 10 additions & 0 deletions assets/controllers/elements/part_search_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,15 @@ export default class extends Controller {
];
},
});

//Try to find the input field and register a defocus handler. This is necessarry, as by default the autocomplete
//lib has problems when multiple inputs are present on the page. (see https://github.com/algolia/autocomplete/issues/1216)
const inputs = this.element.getElementsByClassName('aa-Input');
for (const input of inputs) {
input.addEventListener('blur', () => {
this._autocomplete.setIsOpen(false);
});
}

}
}
9 changes: 7 additions & 2 deletions assets/controllers/pages/barcode_scan_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import {Controller} from "@hotwired/stimulus";
//import * as ZXing from "@zxing/library";

import {Html5QrcodeScanner, Html5Qrcode} from "html5-qrcode";
import {Html5QrcodeScanner, Html5Qrcode} from "@part-db/html5-qrcode";

/* stimulusFetch: 'lazy' */
export default class extends Controller {
Expand Down Expand Up @@ -50,7 +50,7 @@ export default class extends Controller {
});

this._scanner = new Html5QrcodeScanner(this.element.id, {
fps: 2,
fps: 10,
qrbox: qrboxFunction,
experimentalFeatures: {
//This option improves reading quality on android chrome
Expand All @@ -61,6 +61,11 @@ export default class extends Controller {
this._scanner.render(this.onScanSuccess.bind(this));
}

disconnect() {
this._scanner.pause();
this._scanner.clear();
}

onScanSuccess(decodedText, decodedResult) {
//Put our decoded Text into the input box
document.getElementById('scan_dialog_input').value = decodedText;
Expand Down
4 changes: 2 additions & 2 deletions assets/css/app/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ body {
.back-to-top {
cursor: pointer;
position: fixed;
bottom: 20px;
right: 20px;
bottom: 60px;
right: 40px;
display:none;
z-index: 1030;
}
Expand Down
3 changes: 1 addition & 2 deletions assets/css/components/ckeditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
/** Should be the same settings, as in label_style.css */
.ck-html-label .ck-content {
font-family: "DejaVu Sans Mono", monospace;
font-size: 12px;
font-size: 12pt;
line-height: 1.0;
font-size-adjust: 1.5;
}

.ck-html-label .ck-content p {
Expand Down
16 changes: 15 additions & 1 deletion assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,18 @@ import "./register_events";
import "./tristate_checkboxes";

//Define jquery globally
window.$ = window.jQuery = require("jquery")
window.$ = window.jQuery = require("jquery");

//Use the local WASM file for the ZXing library
import {
setZXingModuleOverrides,
} from "barcode-detector/pure";
import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm";
setZXingModuleOverrides({
locateFile: (path, prefix) => {
if (path.endsWith(".wasm")) {
return wasmFile;
}
return prefix + path;
},
});
14 changes: 13 additions & 1 deletion assets/js/register_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import {Dropdown} from "bootstrap";
import ClipboardJS from "clipboard";
import {Modal} from "bootstrap";

class RegisterEventHelper {
constructor() {
Expand All @@ -31,9 +32,11 @@ class RegisterEventHelper {
//Initialize ClipboardJS
this.registerLoadHandler(() => {
new ClipboardJS('.btn');
})
});

this.registerModalDropRemovalOnFormSubmit();


}

registerModalDropRemovalOnFormSubmit() {
Expand All @@ -43,6 +46,15 @@ class RegisterEventHelper {
if (back_drop) {
back_drop.remove();
}

//Remove scroll-lock if it is still active
if (document.body.classList.contains('modal-open')) {
document.body.classList.remove('modal-open');

//Remove the padding-right and overflow:hidden from the body
document.body.style.paddingRight = '';
document.body.style.overflow = '';
}
});
}

Expand Down
4 changes: 4 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;

if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}

//Increase xdebug.max_nesting_level to 1000 if required (see issue #411)
//Check if xdebug extension is active, and xdebug.max_nesting_level is set to 256 or lower
if (extension_loaded('xdebug') && ((int) ini_get('xdebug.max_nesting_level')) <= 256) {
Expand Down
26 changes: 11 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "part-db/part-db-server",
"type": "project",
"license": "AGPL-3.0-or-later",
"require": {
Expand All @@ -16,7 +17,7 @@
"brick/math": "0.12.1 as 0.11.0",
"composer/ca-bundle": "^1.3",
"composer/package-versions-deprecated": "^1.11.99.5",
"doctrine/data-fixtures": "^1.6.6",
"doctrine/data-fixtures": "^2.0.0",
"doctrine/dbal": "^4.0.0",
"doctrine/doctrine-bundle": "^2.0",
"doctrine/doctrine-migrations-bundle": "^3.0",
Expand All @@ -39,12 +40,9 @@
"nelmio/cors-bundle": "^2.3",
"nelmio/security-bundle": "^3.0",
"nyholm/psr7": "^1.1",
"ocramius/proxy-manager": "2.2.*",
"omines/datatables-bundle": "^0.8.0",
"omines/datatables-bundle": "^0.9.1",
"paragonie/sodium_compat": "^1.21",
"part-db/label-fonts": "^1.0",
"phpdocumentor/reflection-docblock": "^5.2",
"phpstan/phpdoc-parser": "^1.23",
"runtime/frankenphp-symfony": "^0.2.0",
"s9e/text-formatter": "^2.1",
"scheb/2fa-backup-code": "^6.8.0",
Expand All @@ -69,7 +67,6 @@
"symfony/process": "6.4.*",
"symfony/property-access": "6.4.*",
"symfony/property-info": "6.4.*",
"symfony/proxy-manager-bridge": "6.4.*",
"symfony/rate-limiter": "6.4.*",
"symfony/runtime": "6.4.*",
"symfony/security-bundle": "6.4.*",
Expand All @@ -91,21 +88,20 @@
"twig/intl-extra": "^3.8",
"twig/markdown-extra": "^3.8",
"twig/string-extra": "^3.8",
"web-auth/webauthn-symfony-bundle": "^4.0.0",
"webmozart/assert": "^1.4"
"web-auth/webauthn-symfony-bundle": "^4.0.0"
},
"require-dev": {
"dama/doctrine-test-bundle": "^v8.0.0",
"doctrine/doctrine-fixtures-bundle": "^3.2",
"ekino/phpstan-banned-code": "^v1.0.0",
"doctrine/doctrine-fixtures-bundle": "^4.0.0",
"ekino/phpstan-banned-code": "^v3.0.0",
"jbtronics/translation-editor-bundle": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.4.7",
"phpstan/phpstan-doctrine": "^1.2.11",
"phpstan/phpstan-strict-rules": "^1.5",
"phpstan/phpstan-symfony": "^1.1.7",
"phpstan/phpstan": "^2.0.4",
"phpstan/phpstan-doctrine": "^2.0.1",
"phpstan/phpstan-strict-rules": "^2.0.1",
"phpstan/phpstan-symfony": "^2.0.0",
"phpunit/phpunit": "^9.5",
"rector/rector": "^1.1.1",
"rector/rector": "^2.0.4",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "6.4.*",
"symfony/css-selector": "6.4.*",
Expand Down
Loading

0 comments on commit 3f061af

Please sign in to comment.