diff --git a/deploy/create_doctrine.sh b/deploy/create_doctrine.sh new file mode 100644 index 0000000..5e46fde --- /dev/null +++ b/deploy/create_doctrine.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +docker run \ + --volume .:/app \ + --rm \ + --interactive \ + --tty \ + php:8.3-cli \ + php /app/src/php/bin/doctrine.php orm:schema-tool:update --force \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f9e24b3..f315ef4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@fortawesome/fontawesome-free": "^6.5.2", "@types/bootstrap": "^5.2.10", "bootstrap": "^5.3.3", + "bootstrap5-autocomplete": "^1.1.33", "datatables.net-bs5": "^2.0.8" }, "devDependencies": { @@ -699,6 +700,12 @@ "@popperjs/core": "^2.11.8" } }, + "node_modules/bootstrap5-autocomplete": { + "version": "1.1.33", + "resolved": "https://registry.npmjs.org/bootstrap5-autocomplete/-/bootstrap5-autocomplete-1.1.33.tgz", + "integrity": "sha512-VgHSx2hCNEBThFzb57HziDA2BNuc0wT5+V9XqIbXsV6oKYXcyRE2ytFIJcHjTCEIYqTsNCFiCQILIXc3YANGPQ==", + "license": "MIT" + }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", diff --git a/package.json b/package.json index f2e9f45..114a70b 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@fortawesome/fontawesome-free": "^6.5.2", "@types/bootstrap": "^5.2.10", "bootstrap": "^5.3.3", + "bootstrap5-autocomplete": "^1.1.33", "datatables.net-bs5": "^2.0.8" }, "devDependencies": { diff --git a/src/js/pages/index.ts b/src/js/pages/index.ts index 600609c..1b395c6 100644 --- a/src/js/pages/index.ts +++ b/src/js/pages/index.ts @@ -1,2 +1,193 @@ import '../../css/common/index.scss'; -import '../common/index'; \ No newline at end of file +import '../common/index'; + +import DataTable, {Api} from "datatables.net-bs5"; +import 'datatables.net-bs5/css/dataTables.bootstrap5.css'; + +const TABLE_AJAX_URL = '/api/dt/keys/available'; +const GAME_GET_URL = '/api/web/game'; +const CLAIM_URL = '/api/web/key/claim'; +function getDetailsHTML(gameData: Game): string +{ + let keyString = ''; + gameData.keys.forEach(key => { + keyString += ` +
Name | + +
---|