diff --git a/dist/app/Http/Controllers/Web/Homepage/HomepageController.php b/dist/app/Http/Controllers/Web/Homepage/HomepageController.php index 8a0fe5b..d91708d 100644 --- a/dist/app/Http/Controllers/Web/Homepage/HomepageController.php +++ b/dist/app/Http/Controllers/Web/Homepage/HomepageController.php @@ -4,6 +4,7 @@ use App\Http\Controllers\Controller; use App\Models\GameFile; +use App\Models\User\User; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Foundation\Application; @@ -36,6 +37,12 @@ public function eula(): Factory|Application|View|\Illuminate\Contracts\Foundatio return view('web.eula'); } + public function credits(): Factory|Application|View|\Illuminate\Contracts\Foundation\Application + { + static::setTitle('Deathgarden Rebirth | Credits'); + return view('web.credits'); + } + protected static function setTitle(string $title) { CompView::share('title', $title); diff --git a/dist/app/View/Components/Auth/User.php b/dist/app/View/Components/Auth/User.php index 8124957..d188c5e 100644 --- a/dist/app/View/Components/Auth/User.php +++ b/dist/app/View/Components/Auth/User.php @@ -23,7 +23,7 @@ public function __construct( $this->profileUrl = 'https://steamcommunity.com/profiles/'.$user->steam_id; } - public function avatarFull(): string + public function avatarFull(): ?string { return $this->user->avatar_full ?? $this->user->avatar_medium ?? $this->user->avatar_small; } diff --git a/dist/app/View/Components/Web/CreditsUser.php b/dist/app/View/Components/Web/CreditsUser.php new file mode 100644 index 0000000..e8a3738 --- /dev/null +++ b/dist/app/View/Components/Web/CreditsUser.php @@ -0,0 +1,34 @@ +user = User::whereSteamId($this->userSteamId)->first(['last_known_username', 'avatar_medium']); + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + return view('components.web.credits-user'); + } +} diff --git a/dist/composer.lock b/dist/composer.lock index 786898c..8caae60 100644 --- a/dist/composer.lock +++ b/dist/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c186cdac93b31b3043f2895b5e14e451", + "content-hash": "6432a6be066cf93e16ee61c034c1a7ae", "packages": [ { "name": "brick/math", @@ -1235,6 +1235,58 @@ ], "time": "2023-10-27T10:59:02+00:00" }, + { + "name": "jaybizzle/crawler-detect", + "version": "v1.2.119", + "source": { + "type": "git", + "url": "https://github.com/JayBizzle/Crawler-Detect.git", + "reference": "275002e22b0333c15a7c6792fdae5d5deefc9ef0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/275002e22b0333c15a7c6792fdae5d5deefc9ef0", + "reference": "275002e22b0333c15a7c6792fdae5d5deefc9ef0", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.5|^6.5|^9.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Jaybizzle\\CrawlerDetect\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Beech", + "email": "m@rkbee.ch", + "role": "Developer" + } + ], + "description": "CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent", + "homepage": "https://github.com/JayBizzle/Crawler-Detect/", + "keywords": [ + "crawler", + "crawler detect", + "crawler detector", + "crawlerdetect", + "php crawler detect" + ], + "support": { + "issues": "https://github.com/JayBizzle/Crawler-Detect/issues", + "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.119" + }, + "time": "2024-06-07T07:58:43+00:00" + }, { "name": "laminas/laminas-diactoros", "version": "3.3.1", @@ -2326,6 +2378,68 @@ }, "time": "2022-04-15T14:02:14+00:00" }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "2.8.45", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "96aaebcf4f50d3d2692ab81d2c5132e425bca266" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/96aaebcf4f50d3d2692ab81d2c5132e425bca266", + "reference": "96aaebcf4f50d3d2692ab81d2c5132e425bca266", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36" + }, + "type": "library", + "autoload": { + "psr-0": { + "Detection": "namespaced/" + }, + "classmap": [ + "Mobile_Detect.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "support": { + "issues": "https://github.com/serbanghita/Mobile-Detect/issues", + "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.45" + }, + "funding": [ + { + "url": "https://github.com/serbanghita", + "type": "github" + } + ], + "time": "2023-11-07T21:57:25+00:00" + }, { "name": "monolog/monolog", "version": "3.7.0", @@ -3084,6 +3198,80 @@ }, "time": "2020-10-15T08:29:30+00:00" }, + { + "name": "phattarachai/laravel-mobile-detect", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/phattarachai/laravel-mobile-detect.git", + "reference": "defbaf39dd5a514e6c7c15c11224e5d197e86dd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phattarachai/laravel-mobile-detect/zipball/defbaf39dd5a514e6c7c15c11224e5d197e86dd2", + "reference": "defbaf39dd5a514e6c7c15c11224e5d197e86dd2", + "shasum": "" + }, + "require": { + "jaybizzle/crawler-detect": "^1.2", + "mobiledetect/mobiledetectlib": "^2.8.37", + "php": "^7.4|^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^v2.5.2", + "phpunit/phpunit": "^9.5.13" + }, + "suggest": { + "illuminate/support": "Required for laravel service providers" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "laravel": { + "providers": [ + "Phattarachai\\LaravelMobileDetect\\AgentServiceProvider" + ], + "aliases": { + "Agent": "Phattarachai\\LaravelMobileDetect\\Facades\\Agent" + } + } + }, + "autoload": { + "psr-4": { + "Phattarachai\\LaravelMobileDetect\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Phattarachai Chaiimongkol", + "homepage": "https://phattarachai.dev" + } + ], + "description": "Desktop/mobile user agent parser with support for Laravel, based on MobileDetect", + "homepage": "https://github.com/phattarachai/laravel-moibile-detect", + "keywords": [ + "Agent", + "browser", + "desktop", + "laravel", + "mobile", + "platform", + "user agent", + "useragent" + ], + "support": { + "issues": "https://github.com/phattarachai/laravel-mobile-detect/issues", + "source": "https://github.com/phattarachai/laravel-mobile-detect/tree/v1.0.2" + }, + "abandoned": true, + "time": "2023-03-06T20:11:02+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.3", diff --git a/dist/docker-compose.yml b/dist/docker-compose.yml index a2a209e..c83a560 100644 --- a/dist/docker-compose.yml +++ b/dist/docker-compose.yml @@ -18,7 +18,7 @@ services: XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' IGNITION_LOCAL_SITES_PATH: '${PWD}' PHP_IDE_CONFIG: 'serverName=Docker' - SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --server=frankenphp --host=0.0.0.0 --admin-port=2019 --port=80" + SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --server=frankenphp --watch --host=0.0.0.0 --admin-port=2019 --port=80" XDG_CONFIG_HOME: /var/www/html/config XDG_DATA_HOME: /var/www/html/data volumes: diff --git a/dist/resources/views/components/web/credits-user.blade.php b/dist/resources/views/components/web/credits-user.blade.php new file mode 100644 index 0000000..f1e24c1 --- /dev/null +++ b/dist/resources/views/components/web/credits-user.blade.php @@ -0,0 +1,22 @@ +@php + /** + * @var ?\App\Models\User\User $user + * @var int $userSteamid + * @var string $headline + * @var ?string $usernameOverride + * @var ?string $avatarOverride + */ + +@endphp + +