From 0e31202714afb771004372694459a66273cd9ee2 Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 20 Jun 2024 22:06:13 -0400 Subject: [PATCH 01/25] Removes Nova Package --- .env.example | 2 - .github/README.md | 3 - app/Nova/Dashboards/Main.php | 21 - app/Nova/License.php | 56 -- app/Nova/Mod.php | 74 --- app/Nova/ModVersion.php | 72 --- app/Nova/Resource.php | 55 -- app/Nova/SptVersion.php | 58 -- app/Nova/User.php | 106 ---- app/Nova/UserRoleResource.php | 54 -- app/Providers/NovaServiceProvider.php | 81 --- composer.json | 7 - composer.lock | 776 +------------------------- config/nova.php | 206 ------- 14 files changed, 1 insertion(+), 1570 deletions(-) delete mode 100644 app/Nova/Dashboards/Main.php delete mode 100644 app/Nova/License.php delete mode 100644 app/Nova/Mod.php delete mode 100644 app/Nova/ModVersion.php delete mode 100644 app/Nova/Resource.php delete mode 100644 app/Nova/SptVersion.php delete mode 100644 app/Nova/User.php delete mode 100644 app/Nova/UserRoleResource.php delete mode 100644 app/Providers/NovaServiceProvider.php delete mode 100644 config/nova.php diff --git a/.env.example b/.env.example index 1daec04..d4baddd 100644 --- a/.env.example +++ b/.env.example @@ -82,8 +82,6 @@ MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS="no-reply@sp-tarkov.com" MAIL_FROM_NAME="${APP_NAME}" -NOVA_LICENSE_KEY= - OCTANE_SERVER=frankenphp OCTANE_HTTPS=true diff --git a/.github/README.md b/.github/README.md index 673a655..7e601f0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -31,14 +31,11 @@ Once the Docker containers are running with Sail you can access the application | Service | Authentication | Access Via Host | |----------------------------------|----------------|-----------------------------| -| Administration Panel (Nova*) | Via User Role | | | Redis Queue Management (Horizon) | Via User Role | | | Website Status (Pulse) | Via User Role | | | Meilisearch WebUI | Local Only | | | Mailpit WebUI | Local Only | | -*Nova may be replaced shortly due to License issues. - Most of these connection settings should already be configured in the `.env.example` file. Simply save the `.env.example` file as `.env` and adjust further settings as needed. ### Basic Usage Examples diff --git a/app/Nova/Dashboards/Main.php b/app/Nova/Dashboards/Main.php deleted file mode 100644 index 58c4a48..0000000 --- a/app/Nova/Dashboards/Main.php +++ /dev/null @@ -1,21 +0,0 @@ -sortable(), - - Text::make('Name') - ->sortable() - ->rules('required'), - - Text::make('Link') - ->sortable() - ->rules('required'), - - HasMany::make('Mods'), - ]; - } - - public function cards(Request $request): array - { - return []; - } - - public function filters(Request $request): array - { - return []; - } - - public function lenses(Request $request): array - { - return []; - } - - public function actions(Request $request): array - { - return []; - } -} diff --git a/app/Nova/Mod.php b/app/Nova/Mod.php deleted file mode 100644 index 125d81d..0000000 --- a/app/Nova/Mod.php +++ /dev/null @@ -1,74 +0,0 @@ -sortable(), - - Text::make('Name') - ->sortable() - ->rules('required'), - - Text::make('Slug') - ->sortable() - ->rules('required'), - - Text::make('Description') - ->sortable() - ->rules('required'), - - Text::make('Source Code Link') - ->sortable() - ->rules('required'), - - Boolean::make('Contains AI Content') - ->sortable() - ->rules('required'), - - BelongsTo::make('User', 'user', User::class), - - BelongsTo::make('License', 'license', License::class), - - HasMany::make('Versions', 'versions', ModVersion::class), - ]; - } - - public function cards(Request $request): array - { - return []; - } - - public function filters(Request $request): array - { - return []; - } - - public function lenses(Request $request): array - { - return []; - } - - public function actions(Request $request): array - { - return []; - } -} diff --git a/app/Nova/ModVersion.php b/app/Nova/ModVersion.php deleted file mode 100644 index 6cff9d3..0000000 --- a/app/Nova/ModVersion.php +++ /dev/null @@ -1,72 +0,0 @@ -sortable(), - - Text::make('Version') - ->sortable() - ->rules('required'), - - Text::make('Description') - ->sortable() - ->rules('required'), - - Text::make('Virus Total Link') - ->sortable() - ->rules('required'), - - Number::make('Downloads') - ->sortable() - ->rules('required', 'integer'), - - BelongsTo::make('Mod', 'mod', Mod::class), - - BelongsTo::make('SptVersion', 'spt_version', SptVersion::class), - ]; - } - - public function cards(Request $request): array - { - return []; - } - - public function filters(Request $request): array - { - return []; - } - - public function lenses(Request $request): array - { - return []; - } - - public function actions(Request $request): array - { - return []; - } -} diff --git a/app/Nova/Resource.php b/app/Nova/Resource.php deleted file mode 100644 index 206170f..0000000 --- a/app/Nova/Resource.php +++ /dev/null @@ -1,55 +0,0 @@ -sortable(), - - Text::make('Version') - ->sortable() - ->rules('required'), - - Text::make('Color Class') - ->sortable() - ->rules('required'), - ]; - } - - public function cards(Request $request): array - { - return []; - } - - public function filters(Request $request): array - { - return []; - } - - public function lenses(Request $request): array - { - return []; - } - - public function actions(Request $request): array - { - return []; - } -} diff --git a/app/Nova/User.php b/app/Nova/User.php deleted file mode 100644 index 7659462..0000000 --- a/app/Nova/User.php +++ /dev/null @@ -1,106 +0,0 @@ -sortable(), - - Gravatar::make()->maxWidth(50), - - Text::make('Name') - ->sortable() - ->rules('required', 'max:255'), - - Text::make('Email') - ->sortable() - ->rules('required', 'email', 'max:254') - ->creationRules('unique:users,email') - ->updateRules('unique:users,email,{{resourceId}}'), - - Password::make('Password') - ->onlyOnForms() - ->creationRules('required', Rules\Password::defaults()) - ->updateRules('nullable', Rules\Password::defaults()), - - HasMany::make('Mods', 'mods', Mod::class), - ]; - } - - /** - * Get the cards available for the request. - * - * @return array - */ - public function cards(NovaRequest $request) - { - return []; - } - - /** - * Get the filters available for the resource. - * - * @return array - */ - public function filters(NovaRequest $request) - { - return []; - } - - /** - * Get the lenses available for the resource. - * - * @return array - */ - public function lenses(NovaRequest $request) - { - return []; - } - - /** - * Get the actions available for the resource. - * - * @return array - */ - public function actions(NovaRequest $request) - { - return []; - } -} diff --git a/app/Nova/UserRoleResource.php b/app/Nova/UserRoleResource.php deleted file mode 100644 index 52c43c3..0000000 --- a/app/Nova/UserRoleResource.php +++ /dev/null @@ -1,54 +0,0 @@ -sortable(), - - Text::make('Name') - ->sortable() - ->rules('required'), - - Text::make('Description') - ->sortable() - ->rules('required'), - ]; - } - - public function cards(Request $request): array - { - return []; - } - - public function filters(Request $request): array - { - return []; - } - - public function lenses(Request $request): array - { - return []; - } - - public function actions(Request $request): array - { - return []; - } -} diff --git a/app/Providers/NovaServiceProvider.php b/app/Providers/NovaServiceProvider.php deleted file mode 100644 index 7b2471b..0000000 --- a/app/Providers/NovaServiceProvider.php +++ /dev/null @@ -1,81 +0,0 @@ -withAuthenticationRoutes() - ->withPasswordResetRoutes() - ->register(); - } - - /** - * Register any application services. - * - * @return void - */ - public function register() - { - // - } - - /** - * Register the Nova gate. - * - * This gate determines who can access Nova in non-local environments. - * - * @return void - */ - protected function gate() - { - Gate::define('viewNova', function ($user) { - return $user->isAdmin(); - }); - } - - /** - * Get the dashboards that should be listed in the Nova sidebar. - * - * @return array - */ - protected function dashboards() - { - return [ - new \App\Nova\Dashboards\Main, - ]; - } -} diff --git a/composer.json b/composer.json index f452e4c..9eaaad7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,6 @@ "laravel/framework": "^11.11", "laravel/horizon": "^5.24", "laravel/jetstream": "^5.1", - "laravel/nova": "^4.34", "laravel/octane": "^2.4", "laravel/pulse": "^1.2", "laravel/sanctum": "^4.0", @@ -66,12 +65,6 @@ "@php artisan migrate --graceful --ansi" ] }, - "repositories": [ - { - "type": "composer", - "url": "https://nova.laravel.com" - } - ], "extra": { "laravel": { "dont-discover": [] diff --git a/composer.lock b/composer.lock index 2a175ad..63496f4 100644 --- a/composer.lock +++ b/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": "27e93d0addfc37a8772b43a5887e4f0d", + "content-hash": "98926d75f4acbeb1ad6596672a437038", "packages": [ { "name": "aws/aws-crt-php", @@ -269,64 +269,6 @@ ], "time": "2023-11-29T23:19:16+00:00" }, - { - "name": "brick/money", - "version": "0.9.0", - "source": { - "type": "git", - "url": "https://github.com/brick/money.git", - "reference": "60f8b6ceab2e1c9527e625198a76498fa477804a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/brick/money/zipball/60f8b6ceab2e1c9527e625198a76498fa477804a", - "reference": "60f8b6ceab2e1c9527e625198a76498fa477804a", - "shasum": "" - }, - "require": { - "brick/math": "~0.12.0", - "ext-json": "*", - "php": "^8.1" - }, - "require-dev": { - "brick/varexporter": "~0.3.0", - "ext-dom": "*", - "ext-pdo": "*", - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^10.1", - "vimeo/psalm": "5.16.0" - }, - "suggest": { - "ext-intl": "Required to format Money objects" - }, - "type": "library", - "autoload": { - "psr-4": { - "Brick\\Money\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Money and currency library", - "keywords": [ - "brick", - "currency", - "money" - ], - "support": { - "issues": "https://github.com/brick/money/issues", - "source": "https://github.com/brick/money/tree/0.9.0" - }, - "funding": [ - { - "url": "https://github.com/BenMorel", - "type": "github" - } - ], - "time": "2023-11-26T16:51:39+00:00" - }, { "name": "carbonphp/carbon-doctrine-types", "version": "3.2.0", @@ -587,161 +529,6 @@ }, "time": "2022-10-27T11:44:00+00:00" }, - { - "name": "doctrine/dbal", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "50fda19f80724b55ff770bb4ff352407008e63c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/50fda19f80724b55ff770bb4ff352407008e63c5", - "reference": "50fda19f80724b55ff770bb4ff352407008e63c5", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^0.5.3|^1", - "php": "^8.1", - "psr/cache": "^1|^2|^3", - "psr/log": "^1|^2|^3" - }, - "require-dev": { - "doctrine/coding-standard": "12.0.0", - "fig/log-test": "^1", - "jetbrains/phpstorm-stubs": "2023.2", - "phpstan/phpstan": "1.11.5", - "phpstan/phpstan-phpunit": "1.4.0", - "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "10.5.22", - "psalm/plugin-phpunit": "0.19.0", - "slevomat/coding-standard": "8.13.1", - "squizlabs/php_codesniffer": "3.10.1", - "symfony/cache": "^6.3.8|^7.0", - "symfony/console": "^5.4|^6.3|^7.0", - "vimeo/psalm": "5.24.0" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\DBAL\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", - "homepage": "https://www.doctrine-project.org/projects/dbal.html", - "keywords": [ - "abstraction", - "database", - "db2", - "dbal", - "mariadb", - "mssql", - "mysql", - "oci8", - "oracle", - "pdo", - "pgsql", - "postgresql", - "queryobject", - "sasql", - "sql", - "sqlite", - "sqlserver", - "sqlsrv" - ], - "support": { - "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/4.0.4" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", - "type": "tidelift" - } - ], - "time": "2024-06-19T11:57:23+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" - }, - "time": "2024-01-30T19:34:25+00:00" - }, { "name": "doctrine/inflector", "version": "2.0.10", @@ -1756,82 +1543,6 @@ }, "time": "2021-07-21T13:50:14+00:00" }, - { - "name": "inertiajs/inertia-laravel", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/inertiajs/inertia-laravel.git", - "reference": "36730d13b1dab9017069004fd458b3e67449a326" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/36730d13b1dab9017069004fd458b3e67449a326", - "reference": "36730d13b1dab9017069004fd458b3e67449a326", - "shasum": "" - }, - "require": { - "ext-json": "*", - "laravel/framework": "^8.74|^9.0|^10.0|^11.0", - "php": "^7.3|~8.0.0|~8.1.0|~8.2.0|~8.3.0", - "symfony/console": "^5.3|^6.0|^7.0" - }, - "require-dev": { - "mockery/mockery": "^1.3.3", - "orchestra/testbench": "^6.4|^7.0|^8.0|^9.0", - "phpunit/phpunit": "^8.0|^9.5.8|^10.4", - "roave/security-advisories": "dev-master" - }, - "suggest": { - "ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command." - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Inertia\\ServiceProvider" - ] - }, - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "files": [ - "./helpers.php" - ], - "psr-4": { - "Inertia\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Reinink", - "email": "jonathan@reinink.ca", - "homepage": "https://reinink.ca" - } - ], - "description": "The Laravel adapter for Inertia.js.", - "keywords": [ - "inertia", - "laravel" - ], - "support": { - "issues": "https://github.com/inertiajs/inertia-laravel/issues", - "source": "https://github.com/inertiajs/inertia-laravel/tree/v1.3.0" - }, - "funding": [ - { - "url": "https://github.com/reinink", - "type": "github" - } - ], - "time": "2024-06-13T01:25:09+00:00" - }, { "name": "laminas/laminas-diactoros", "version": "3.3.1", @@ -2333,132 +2044,6 @@ }, "time": "2024-05-30T14:23:31+00:00" }, - { - "name": "laravel/nova", - "version": "4.34.3", - "source": { - "type": "git", - "url": "git@github.com:laravel/nova.git", - "reference": "3c4188b09b1fb7364e60eafc8b28fc2f73e19c21" - }, - "dist": { - "type": "zip", - "url": "https://nova.laravel.com/dist/laravel/nova/laravel-nova-3c4188b09b1fb7364e60eafc8b28fc2f73e19c21-zip-6ad76c.zip", - "reference": "3c4188b09b1fb7364e60eafc8b28fc2f73e19c21", - "shasum": "0d6b99f7d9dc8e4577d66d06b71164a6326e2e15" - }, - "require": { - "brick/money": "^0.5|^0.6|^0.7|^0.8|^0.9", - "doctrine/dbal": "^2.13.3|^3.1.2|^4.0", - "ext-json": "*", - "illuminate/support": "^8.83.4|^9.3.1|^10.0|^11.0", - "inertiajs/inertia-laravel": "^0.4.5|^0.5.2|^0.6.0|^1.0", - "laravel/ui": "^3.3|^4.0", - "nesbot/carbon": "^2.53.1|^3.0", - "php": "^7.3|^8.0", - "rap2hpoutre/fast-excel": "^3.2|^4.1|^5.0", - "spatie/once": "^1.1|^2.0|^3.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", - "symfony/polyfill-intl-icu": "^1.22.1", - "symfony/process": "^5.4|^6.0|^7.0" - }, - "require-dev": { - "larastan/larastan": "^1.0.1|^2.5.1", - "laravel/nova-dusk-suite": "8.4.x-dev|9.4.x-dev|10.4.x-dev|11.4.x-dev", - "laravel/pint": "^1.6", - "laravel/scout": "^9.8|^10.0", - "mockery/mockery": "^1.4.4", - "orchestra/testbench-dusk": "^6.44|^7.40|^8.22|^9.0", - "phpunit/phpunit": "^9.6|^10.5", - "predis/predis": "^1.1.9|^2.0.2" - }, - "suggest": { - "ext-intl": "Required to format Currency field" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Nova\\NovaCoreServiceProvider" - ], - "aliases": { - "Nova": "Laravel\\Nova\\Nova" - } - } - }, - "autoload": { - "psr-4": { - "Laravel\\Nova\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Laravel\\Nova\\Tests\\": "tests/" - } - }, - "scripts": { - "post-autoload-dump": [ - "@clear", - "@php vendor/bin/dusk-updater detect --auto-update --ansi", - "@php vendor/bin/testbench-dusk package:discover --ansi" - ], - "clear": [ - "@php vendor/bin/testbench-dusk package:purge-skeleton --ansi", - "@php vendor/bin/testbench-dusk package:dusk-purge --ansi" - ], - "dusk:prepare": [ - "@php -r \"file_exists('phpunit.dusk.xml') || copy('phpunit.dusk.xml.dist', 'phpunit.dusk.xml'); \"", - "@php -r \"if (file_exists('workbench/.env.dusk')) { copy('workbench/.env.dusk', 'vendor/laravel/nova-dusk-suite/.env'); } else { copy('workbench/.env.dusk.example', 'vendor/laravel/nova-dusk-suite/.env'); }\"" - ], - "dusk:dev-assets": [ - "TAILWIND_MODE=build npm run dev", - "@php vendor/bin/testbench-dusk nova:publish --force --ansi" - ], - "dusk:assets": [ - "TAILWIND_MODE=build npm run prod", - "@php vendor/bin/testbench-dusk nova:publish --force --ansi" - ], - "dusk:test": [ - "@php vendor/bin/testbench-dusk package:dusk-purge --ansi", - "@php vendor/bin/phpunit -c phpunit.dusk.xml --stop-on-failure --stop-on-error" - ], - "dusk:filter": [ - "./vendor/bin/testbench-dusk package:dusk-purge --ansi && ./vendor/bin/phpunit -c phpunit.dusk.xml --filter" - ], - "test:local": [ - "@php vendor/bin/phpunit -c phpunit.xml --group date-field,datetime-field,external-network --testdox", - "@php vendor/bin/phpunit -c phpunit.dusk.xml --group date-field,datetime-field,external-network --testdox" - ], - "serve": [ - "@clear", - "@php vendor/bin/testbench package:discover --ansi", - "@php vendor/bin/testbench workbench:build --ansi", - "@php vendor/bin/testbench serve" - ] - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "A wonderful administration interface for Laravel.", - "keywords": [ - "admin", - "laravel" - ], - "support": { - "source": "https://github.com/laravel/nova/tree/v4.34.3" - }, - "time": "2024-06-12T16:57:44+00:00" - }, { "name": "laravel/octane", "version": "v2.4.0", @@ -2961,69 +2546,6 @@ }, "time": "2024-01-04T16:10:04+00:00" }, - { - "name": "laravel/ui", - "version": "v4.5.2", - "source": { - "type": "git", - "url": "https://github.com/laravel/ui.git", - "reference": "c75396f63268c95b053c8e4814eb70e0875e9628" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/c75396f63268c95b053c8e4814eb70e0875e9628", - "reference": "c75396f63268c95b053c8e4814eb70e0875e9628", - "shasum": "" - }, - "require": { - "illuminate/console": "^9.21|^10.0|^11.0", - "illuminate/filesystem": "^9.21|^10.0|^11.0", - "illuminate/support": "^9.21|^10.0|^11.0", - "illuminate/validation": "^9.21|^10.0|^11.0", - "php": "^8.0", - "symfony/console": "^6.0|^7.0" - }, - "require-dev": { - "orchestra/testbench": "^7.35|^8.15|^9.0", - "phpunit/phpunit": "^9.3|^10.4|^11.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Ui\\UiServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Ui\\": "src/", - "Illuminate\\Foundation\\Auth\\": "auth-backend/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Laravel UI utilities and presets.", - "keywords": [ - "laravel", - "ui" - ], - "support": { - "source": "https://github.com/laravel/ui/tree/v4.5.2" - }, - "time": "2024-05-08T18:07:10+00:00" - }, { "name": "league/commonmark", "version": "2.4.2", @@ -4387,99 +3909,6 @@ ], "time": "2024-03-06T16:17:14+00:00" }, - { - "name": "openspout/openspout", - "version": "v4.24.2", - "source": { - "type": "git", - "url": "https://github.com/openspout/openspout.git", - "reference": "24272c1f7d073cc64fa3ecc2a863dc5d13be33a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/openspout/openspout/zipball/24272c1f7d073cc64fa3ecc2a863dc5d13be33a8", - "reference": "24272c1f7d073cc64fa3ecc2a863dc5d13be33a8", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-fileinfo": "*", - "ext-filter": "*", - "ext-libxml": "*", - "ext-xmlreader": "*", - "ext-zip": "*", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "require-dev": { - "ext-zlib": "*", - "friendsofphp/php-cs-fixer": "^3.59.3", - "infection/infection": "^0.29.5", - "phpbench/phpbench": "^1.2.15", - "phpstan/phpstan": "^1.11.4", - "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.0", - "phpunit/phpunit": "^10.5.20 || ^11.2.2" - }, - "suggest": { - "ext-iconv": "To handle non UTF-8 CSV files (if \"php-mbstring\" is not already installed or is too limited)", - "ext-mbstring": "To handle non UTF-8 CSV files (if \"iconv\" is not already installed)" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "OpenSpout\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrien Loison", - "email": "adrien@box.com" - } - ], - "description": "PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way", - "homepage": "https://github.com/openspout/openspout", - "keywords": [ - "OOXML", - "csv", - "excel", - "memory", - "odf", - "ods", - "office", - "open", - "php", - "read", - "scale", - "spreadsheet", - "stream", - "write", - "xlsx" - ], - "support": { - "issues": "https://github.com/openspout/openspout/issues", - "source": "https://github.com/openspout/openspout/tree/v4.24.2" - }, - "funding": [ - { - "url": "https://paypal.me/filippotessarotto", - "type": "custom" - }, - { - "url": "https://github.com/Slamdunk", - "type": "github" - } - ], - "time": "2024-06-17T08:53:37+00:00" - }, { "name": "paragonie/constant_time_encoding", "version": "v2.7.0", @@ -5000,55 +4429,6 @@ }, "time": "2022-06-13T21:57:56+00:00" }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, { "name": "psr/clock", "version": "1.0.0", @@ -5765,76 +5145,6 @@ ], "time": "2024-04-27T21:32:50+00:00" }, - { - "name": "rap2hpoutre/fast-excel", - "version": "v5.5.0", - "source": { - "type": "git", - "url": "https://github.com/rap2hpoutre/fast-excel.git", - "reference": "83604f2a16fbb0374747299173abe691b24916da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rap2hpoutre/fast-excel/zipball/83604f2a16fbb0374747299173abe691b24916da", - "reference": "83604f2a16fbb0374747299173abe691b24916da", - "shasum": "" - }, - "require": { - "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0", - "openspout/openspout": "^4.24", - "php": "^8.0" - }, - "require-dev": { - "illuminate/database": "^6.20.12 || ^7.30.4 || ^8.24.0 || ^9.0 || ^10.0 || ^11.0", - "phpunit/phpunit": "^9.5 || ^10.1", - "squizlabs/php_codesniffer": "3.*" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Rap2hpoutre\\FastExcel\\Providers\\FastExcelServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "src/functions/fastexcel.php" - ], - "psr-4": { - "Rap2hpoutre\\FastExcel\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "rap2h", - "email": "raphaelht@gmail.com" - } - ], - "description": "Fast Excel import/export for Laravel", - "keywords": [ - "csv", - "excel", - "laravel", - "xls", - "xlsx" - ], - "support": { - "issues": "https://github.com/rap2hpoutre/fast-excel/issues", - "source": "https://github.com/rap2hpoutre/fast-excel/tree/v5.5.0" - }, - "funding": [ - { - "url": "https://github.com/rap2hpoutre", - "type": "github" - } - ], - "time": "2024-06-03T08:00:43+00:00" - }, { "name": "stevebauman/purify", "version": "v6.2.0", @@ -7074,90 +6384,6 @@ ], "time": "2024-05-31T15:07:36+00:00" }, - { - "name": "symfony/polyfill-intl-icu", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "e76343c631b453088e2260ac41dfebe21954de81" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/e76343c631b453088e2260ac41dfebe21954de81", - "reference": "e76343c631b453088e2260ac41dfebe21954de81", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance and support of other locales than \"en\"" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Icu\\": "" - }, - "classmap": [ - "Resources/stubs" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's ICU-related data and classes", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "icu", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-05-31T15:07:36+00:00" - }, { "name": "symfony/polyfill-intl-idn", "version": "v1.30.0", diff --git a/config/nova.php b/config/nova.php deleted file mode 100644 index 8c9679b..0000000 --- a/config/nova.php +++ /dev/null @@ -1,206 +0,0 @@ - env('NOVA_LICENSE_KEY'), - - /* - |-------------------------------------------------------------------------- - | Nova App Name - |-------------------------------------------------------------------------- - | - | This value is the name of your application. This value is used when the - | framework needs to display the name of the application within the UI - | or in other locations. Of course, you're free to change the value. - | - */ - - 'name' => env('NOVA_APP_NAME', env('APP_NAME')), - - /* - |-------------------------------------------------------------------------- - | Nova Domain Name - |-------------------------------------------------------------------------- - | - | This value is the "domain name" associated with your application. This - | can be used to prevent Nova's internal routes from being registered - | on subdomains which do not need access to your admin application. - | - */ - - 'domain' => env('NOVA_DOMAIN_NAME', null), - - /* - |-------------------------------------------------------------------------- - | Nova Path - |-------------------------------------------------------------------------- - | - | This is the URI path where Nova will be accessible from. Feel free to - | change this path to anything you like. Note that this URI will not - | affect Nova's internal API routes which aren't exposed to users. - | - */ - - 'path' => '/nova', - - /* - |-------------------------------------------------------------------------- - | Nova Authentication Guard - |-------------------------------------------------------------------------- - | - | This configuration option defines the authentication guard that will - | be used to protect your Nova routes. This option should match one - | of the authentication guards defined in the "auth" config file. - | - */ - - 'guard' => env('NOVA_GUARD', null), - - /* - |-------------------------------------------------------------------------- - | Nova Password Reset Broker - |-------------------------------------------------------------------------- - | - | This configuration option defines the password broker that will be - | used when passwords are reset. This option should mirror one of - | the password reset options defined in the "auth" config file. - | - */ - - 'passwords' => env('NOVA_PASSWORDS', null), - - /* - |-------------------------------------------------------------------------- - | Nova Route Middleware - |-------------------------------------------------------------------------- - | - | These middleware will be assigned to every Nova route, giving you the - | chance to add your own middleware to this stack or override any of - | the existing middleware. Or, you can just stick with this stack. - | - */ - - 'middleware' => [ - 'web', - HandleInertiaRequests::class, - DispatchServingNovaEvent::class, - BootTools::class, - ], - - 'api_middleware' => [ - 'nova', - Authenticate::class, - Authorize::class, - ], - - /* - |-------------------------------------------------------------------------- - | Nova Pagination Type - |-------------------------------------------------------------------------- - | - | This option defines the visual style used in Nova's resource pagination - | views. You may select between "simple", "load-more", and "links" for - | your applications. Feel free to adjust this option to your choice. - | - */ - - 'pagination' => 'simple', - - /* - |-------------------------------------------------------------------------- - | Nova Storage Disk - |-------------------------------------------------------------------------- - | - | This configuration option allows you to define the default disk that - | will be used to store files using the Image, File, and other file - | related field types. You're welcome to use any configured disk. - | - */ - - 'storage_disk' => env('NOVA_STORAGE_DISK', 'public'), - - /* - |-------------------------------------------------------------------------- - | Nova Currency - |-------------------------------------------------------------------------- - | - | This configuration option allows you to define the default currency - | used by the Currency field within Nova. You may change this to a - | valid ISO 4217 currency code to suit your application's needs. - | - */ - - 'currency' => 'USD', - - /* - |-------------------------------------------------------------------------- - | Branding - |-------------------------------------------------------------------------- - | - | These configuration values allow you to customize the branding of the - | Nova interface, including the primary color and the logo that will - | be displayed within the Nova interface. This logo value must be - | the absolute path to an SVG logo within the local filesystem. - | - */ - - // 'brand' => [ - // 'logo' => resource_path('/img/example-logo.svg'), - - // 'colors' => [ - // "400" => "24, 182, 155, 0.5", - // "500" => "24, 182, 155", - // "600" => "24, 182, 155, 0.75", - // ] - // ], - - /* - |-------------------------------------------------------------------------- - | Nova Action Resource Class - |-------------------------------------------------------------------------- - | - | This configuration option allows you to specify a custom resource class - | to use for action log entries instead of the default that ships with - | Nova, thus allowing for the addition of additional UI form fields. - | - */ - - 'actions' => [ - 'resource' => ActionResource::class, - ], - - /* - |-------------------------------------------------------------------------- - | Nova Impersonation Redirection URLs - |-------------------------------------------------------------------------- - | - | This configuration option allows you to specify a URL where Nova should - | redirect an administrator after impersonating another user and a URL - | to redirect the administrator after stopping impersonating a user. - | - */ - - 'impersonation' => [ - 'started' => '/', - 'stopped' => '/', - ], - -]; From 5ee07f7498e85bd8a85673398d2234117adb4c99 Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 20 Jun 2024 22:06:53 -0400 Subject: [PATCH 02/25] Removes Cache & Job Database Tables --- .../0001_01_01_000001_create_cache_table.php | 35 ------------ .../0001_01_01_000002_create_jobs_table.php | 57 ------------------- 2 files changed, 92 deletions(-) delete mode 100644 database/migrations/0001_01_01_000001_create_cache_table.php delete mode 100644 database/migrations/0001_01_01_000002_create_jobs_table.php diff --git a/database/migrations/0001_01_01_000001_create_cache_table.php b/database/migrations/0001_01_01_000001_create_cache_table.php deleted file mode 100644 index b9c106b..0000000 --- a/database/migrations/0001_01_01_000001_create_cache_table.php +++ /dev/null @@ -1,35 +0,0 @@ -string('key')->primary(); - $table->mediumText('value'); - $table->integer('expiration'); - }); - - Schema::create('cache_locks', function (Blueprint $table) { - $table->string('key')->primary(); - $table->string('owner'); - $table->integer('expiration'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('cache'); - Schema::dropIfExists('cache_locks'); - } -}; diff --git a/database/migrations/0001_01_01_000002_create_jobs_table.php b/database/migrations/0001_01_01_000002_create_jobs_table.php deleted file mode 100644 index 425e705..0000000 --- a/database/migrations/0001_01_01_000002_create_jobs_table.php +++ /dev/null @@ -1,57 +0,0 @@ -id(); - $table->string('queue')->index(); - $table->longText('payload'); - $table->unsignedTinyInteger('attempts'); - $table->unsignedInteger('reserved_at')->nullable(); - $table->unsignedInteger('available_at'); - $table->unsignedInteger('created_at'); - }); - - Schema::create('job_batches', function (Blueprint $table) { - $table->string('id')->primary(); - $table->string('name'); - $table->integer('total_jobs'); - $table->integer('pending_jobs'); - $table->integer('failed_jobs'); - $table->longText('failed_job_ids'); - $table->mediumText('options')->nullable(); - $table->integer('cancelled_at')->nullable(); - $table->integer('created_at'); - $table->integer('finished_at')->nullable(); - }); - - Schema::create('failed_jobs', function (Blueprint $table) { - $table->id(); - $table->string('uuid')->unique(); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('jobs'); - Schema::dropIfExists('job_batches'); - Schema::dropIfExists('failed_jobs'); - } -}; From 15efcf5f946f92918b4559af350b6ae3e5d24c6c Mon Sep 17 00:00:00 2001 From: Refringe Date: Fri, 21 Jun 2024 16:04:07 -0400 Subject: [PATCH 03/25] Removes Unused Team Email --- .../views/emails/team-invitation.blade.php | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 resources/views/emails/team-invitation.blade.php diff --git a/resources/views/emails/team-invitation.blade.php b/resources/views/emails/team-invitation.blade.php deleted file mode 100644 index 1701212..0000000 --- a/resources/views/emails/team-invitation.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -@component('mail::message') -{{ __('You have been invited to join the :team team!', ['team' => $invitation->team->name]) }} - -@if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::registration())) -{{ __('If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:') }} - -@component('mail::button', ['url' => route('register')]) -{{ __('Create Account') }} -@endcomponent - -{{ __('If you already have an account, you may accept this invitation by clicking the button below:') }} - -@else -{{ __('You may accept this invitation by clicking the button below:') }} -@endif - - -@component('mail::button', ['url' => $acceptUrl]) -{{ __('Accept Invitation') }} -@endcomponent - -{{ __('If you did not expect to receive an invitation to this team, you may discard this email.') }} -@endcomponent From 029a623826ab66179f52fa720587583e783d0351 Mon Sep 17 00:00:00 2001 From: Refringe Date: Fri, 21 Jun 2024 16:07:46 -0400 Subject: [PATCH 04/25] Configured Octane Watcher The Sail development environment will now reload Octane when files are updated. --- config/octane.php | 2 ++ docker-compose.yml | 2 +- package-lock.json | 1 + package.json | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/octane.php b/config/octane.php index 7d60507..ee11765 100644 --- a/config/octane.php +++ b/config/octane.php @@ -180,9 +180,11 @@ return [ 'bootstrap', 'config/**/*.php', 'database/**/*.php', + 'lang/**/*.php', 'public/**/*.php', 'resources/**/*.php', 'routes', + 'tests/**/*.php', 'composer.lock', '.env', ], diff --git a/docker-compose.yml b/docker-compose.yml index 3dbdf71..d228206 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' IGNITION_LOCAL_SITES_PATH: '${PWD}' - SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --host=localhost --port=443 --admin-port=2019 --https" + SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --host=localhost --port=443 --admin-port=2019 --https --watch" XDG_CONFIG_HOME: /var/www/html/config XDG_DATA_HOME: /var/www/html/data volumes: diff --git a/package-lock.json b/package-lock.json index 9cdc4e7..c69ad91 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "@tailwindcss/typography": "^0.5.10", "autoprefixer": "^10.4.16", "axios": "^1.6.4", + "chokidar": "^3.6.0", "laravel-vite-plugin": "^1.0", "postcss": "^8.4.32", "prettier": "^3.2.5", diff --git a/package.json b/package.json index 9426507..5359373 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@tailwindcss/typography": "^0.5.10", "autoprefixer": "^10.4.16", "axios": "^1.6.4", + "chokidar": "^3.6.0", "laravel-vite-plugin": "^1.0", "postcss": "^8.4.32", "prettier": "^3.2.5", From a6a813a58f6328a2c1ac9fd6a86d672a025e32a9 Mon Sep 17 00:00:00 2001 From: Refringe Date: Sat, 22 Jun 2024 21:50:15 -0400 Subject: [PATCH 05/25] JS Cleanup, Adds Focus Alpine Plugin --- package-lock.json | 28 ++++++++++++ package.json | 3 ++ resources/js/app.js | 60 ++----------------------- resources/js/bootstrap.js | 4 -- resources/js/registerAlpineLivewire.js | 6 +++ resources/js/registerViteAssets.js | 2 + resources/js/themeToggle.js | 53 ++++++++++++++++++++++ resources/views/layouts/app.blade.php | 2 +- resources/views/layouts/guest.blade.php | 2 +- 9 files changed, 97 insertions(+), 63 deletions(-) delete mode 100644 resources/js/bootstrap.js create mode 100644 resources/js/registerAlpineLivewire.js create mode 100644 resources/js/registerViteAssets.js create mode 100644 resources/js/themeToggle.js diff --git a/package-lock.json b/package-lock.json index c69ad91..223454a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,9 @@ "requires": true, "packages": { "": { + "dependencies": { + "@alpinejs/focus": "^3.14.1" + }, "devDependencies": { "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.10", @@ -31,6 +34,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@alpinejs/focus": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/@alpinejs/focus/-/focus-3.14.1.tgz", + "integrity": "sha512-z4xdpK6X1LB2VitsWbL61tmABoOORuEhE5v2tnUX/be6/nAygXyeDxZ1x9s1u+bOEYlIOXXLmjdmTlhchUVWxw==", + "license": "MIT", + "dependencies": { + "focus-trap": "^6.9.4", + "tabbable": "^5.3.3" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -1276,6 +1289,15 @@ "node": ">=8" } }, + "node_modules/focus-trap": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-6.9.4.tgz", + "integrity": "sha512-v2NTsZe2FF59Y+sDykKY+XjqZ0cPfhq/hikWVL88BqLivnNiEffAsac6rP6H45ff9wG9LL5ToiDqrLEP9GX9mw==", + "license": "MIT", + "dependencies": { + "tabbable": "^5.3.3" + } + }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -2421,6 +2443,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tabbable": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz", + "integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==", + "license": "MIT" + }, "node_modules/tailwindcss": { "version": "3.4.4", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.4.tgz", diff --git a/package.json b/package.json index 5359373..5b5e9fa 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,8 @@ "prettier-plugin-tailwindcss": "^0.6.5", "tailwindcss": "^3.4.0", "vite": "^5.0" + }, + "dependencies": { + "@alpinejs/focus": "^3.14.1" } } diff --git a/resources/js/app.js b/resources/js/app.js index d42163c..efade33 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,57 +1,3 @@ -import "./bootstrap"; - -import.meta.glob(["../video/**"]); - -document.addEventListener("DOMContentLoaded", function() { - const themeToggleIcon = { - dark: document.getElementById("theme-toggle-dark-icon"), - light: document.getElementById("theme-toggle-light-icon") - }; - - // Make sure the theme toggle icons are available. - if (themeToggleIcon.dark === null || themeToggleIcon.light === null) { - console.log("Theme toggle icons not found."); - return; - } - - // Function to update the visibility of the theme icons based on the theme - function updateIconVisibility(theme) { - if (theme === "dark") { - themeToggleIcon.dark.classList.add("hidden"); - themeToggleIcon.light.classList.remove("hidden"); - } else { - themeToggleIcon.dark.classList.remove("hidden"); - themeToggleIcon.light.classList.add("hidden"); - } - } - - // Function to update the theme - function updateTheme(theme) { - // Update the document element class - document.documentElement.classList.remove("light", "dark"); - document.documentElement.classList.add(theme); - - // Update local storage - localStorage.setItem("forge-theme", theme); - - // Update icon visibility - updateIconVisibility(theme); - } - - // Initial setup: Determine the current theme and set icon visibility - const initialTheme = - localStorage.getItem("forge-theme") || - (window.matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark"); - document.documentElement.classList.add(initialTheme); // Ensure the class is set - updateIconVisibility(initialTheme); - - // Set up the theme toggle button - const themeToggleBtn = document.getElementById("theme-toggle"); - themeToggleBtn.addEventListener("click", function() { - // Determine the current theme by checking the classList of documentElement - const currentTheme = document.documentElement.classList.contains("dark") ? "dark" : "light"; - const newTheme = currentTheme === "light" ? "dark" : "light"; - - updateTheme(newTheme); - }); -}); +import "./registerViteAssets"; +import "./registerAlpineLivewire"; +import "./themeToggle"; diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js deleted file mode 100644 index f63c129..0000000 --- a/resources/js/bootstrap.js +++ /dev/null @@ -1,4 +0,0 @@ -import axios from "axios"; - -window.axios = axios; -window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; diff --git a/resources/js/registerAlpineLivewire.js b/resources/js/registerAlpineLivewire.js new file mode 100644 index 0000000..772cfb3 --- /dev/null +++ b/resources/js/registerAlpineLivewire.js @@ -0,0 +1,6 @@ +import { Alpine, Livewire } from "../../vendor/livewire/livewire/dist/livewire.esm"; +import focus from "@alpinejs/focus"; + +Alpine.plugin(focus); + +Livewire.start(); diff --git a/resources/js/registerViteAssets.js b/resources/js/registerViteAssets.js new file mode 100644 index 0000000..00badd3 --- /dev/null +++ b/resources/js/registerViteAssets.js @@ -0,0 +1,2 @@ +// Register all site assets for Vite to include in the build. +import.meta.glob(["../video/**"]); diff --git a/resources/js/themeToggle.js b/resources/js/themeToggle.js new file mode 100644 index 0000000..3a0ca5f --- /dev/null +++ b/resources/js/themeToggle.js @@ -0,0 +1,53 @@ +document.addEventListener("DOMContentLoaded", function() { + const themeToggleIcon = { + dark: document.getElementById("theme-toggle-dark-icon"), + light: document.getElementById("theme-toggle-light-icon") + }; + + // Make sure the theme toggle icons are available. + if (themeToggleIcon.dark === null || themeToggleIcon.light === null) { + console.log("Theme toggle icons not found."); + return; + } + + // Function to update the visibility of the theme icons based on the theme + function updateIconVisibility(theme) { + if (theme === "dark") { + themeToggleIcon.dark.classList.add("hidden"); + themeToggleIcon.light.classList.remove("hidden"); + } else { + themeToggleIcon.dark.classList.remove("hidden"); + themeToggleIcon.light.classList.add("hidden"); + } + } + + // Function to update the theme + function updateTheme(theme) { + // Update the document element class + document.documentElement.classList.remove("light", "dark"); + document.documentElement.classList.add(theme); + + // Update local storage + localStorage.setItem("forge-theme", theme); + + // Update icon visibility + updateIconVisibility(theme); + } + + // Initial setup: Determine the current theme and set icon visibility + const initialTheme = + localStorage.getItem("forge-theme") || + (window.matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark"); + document.documentElement.classList.add(initialTheme); // Ensure the class is set + updateIconVisibility(initialTheme); + + // Set up the theme toggle button + const themeToggleBtn = document.getElementById("theme-toggle"); + themeToggleBtn.addEventListener("click", function() { + // Determine the current theme by checking the classList of documentElement + const currentTheme = document.documentElement.classList.contains("dark") ? "dark" : "light"; + const newTheme = currentTheme === "light" ? "dark" : "light"; + + updateTheme(newTheme); + }); +}); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 11e17a4..65eb5f5 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -56,6 +56,6 @@ @livewire('global-search') @stack('modals') -@livewireScripts +@livewireScriptConfig diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.php index cbbed21..1281504 100644 --- a/resources/views/layouts/guest.blade.php +++ b/resources/views/layouts/guest.blade.php @@ -35,6 +35,6 @@ {{ $slot }} -@livewireScripts +@livewireScriptConfig From a2fb68ea93fb40d21de560e19cba62e3217f8aee Mon Sep 17 00:00:00 2001 From: Refringe Date: Sat, 22 Jun 2024 21:55:20 -0400 Subject: [PATCH 06/25] Navigation Rework Still needs some TLC with profile photos. Continued work on the dark theme on the internal pages. More to come. --- resources/css/app.css | 10 - .../views/components/action-message.blade.php | 2 +- .../views/components/action-section.blade.php | 2 +- resources/views/components/button.blade.php | 2 +- .../views/components/form-section.blade.php | 4 +- .../views/components/input-error.blade.php | 2 +- resources/views/components/input.blade.php | 2 +- resources/views/components/label.blade.php | 2 +- resources/views/components/nav-link.blade.php | 4 +- .../components/secondary-button.blade.php | 2 +- .../views/components/section-border.blade.php | 2 +- .../views/components/section-title.blade.php | 4 +- resources/views/components/welcome.blade.php | 4 +- resources/views/dashboard.blade.php | 10 +- resources/views/home.blade.php | 2 +- resources/views/navigation-menu.blade.php | 302 ++++++++++-------- resources/views/profile/show.blade.php | 2 +- .../two-factor-authentication-form.blade.php | 10 +- .../update-profile-information-form.blade.php | 24 +- 19 files changed, 202 insertions(+), 190 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 404993b..e8368d4 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -6,16 +6,6 @@ display: none; } -button[type="submit"]:not([role="menuitem"]), -button[type="button"]:not([role="menuitem"]) { - @apply border border-transparent rounded-md py-2 px-4 text-white dark:text-gray-100 bg-gray-900 dark:bg-gray-700 hover:bg-gray-800 dark:hover:bg-black dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-600 dark:focus:ring-gray-500 transition-all duration-200 -} - -nav button[type="submit"]:not([role="menuitem"]), -nav button[type="button"]:not([role="menuitem"]) { - @apply border border-transparent rounded-md py-2 px-4 text-white dark:text-gray-100 bg-gray-900 dark:bg-gray-700 hover:bg-gray-800 dark:hover:bg-gray-900 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-600 dark:focus:ring-gray-500 transition-all duration-200 -} - input[type="checkbox"] { @apply text-gray-800 dark:text-gray-300 focus:ring-gray-600 dark:focus:ring-gray-500 border-gray-300 dark:border-gray-700 rounded; } diff --git a/resources/views/components/action-message.blade.php b/resources/views/components/action-message.blade.php index a8a95f9..6512401 100644 --- a/resources/views/components/action-message.blade.php +++ b/resources/views/components/action-message.blade.php @@ -5,6 +5,6 @@ x-show.transition.out.opacity.duration.1500ms="shown" x-transition:leave.opacity.duration.1500ms style="display: none;" - {{ $attributes->merge(['class' => 'text-sm text-gray-600']) }}> + {{ $attributes->merge(['class' => 'text-sm text-gray-600 dark:text-gray-400']) }}> {{ $slot->isEmpty() ? 'Saved.' : $slot }} diff --git a/resources/views/components/action-section.blade.php b/resources/views/components/action-section.blade.php index 93e2434..b95dd82 100644 --- a/resources/views/components/action-section.blade.php +++ b/resources/views/components/action-section.blade.php @@ -5,7 +5,7 @@
-
+
{{ $content }}
diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.php index 232734c..54cc3b7 100644 --- a/resources/views/components/button.blade.php +++ b/resources/views/components/button.blade.php @@ -1,3 +1,3 @@ - diff --git a/resources/views/components/form-section.blade.php b/resources/views/components/form-section.blade.php index 9dd4e0e..498af13 100644 --- a/resources/views/components/form-section.blade.php +++ b/resources/views/components/form-section.blade.php @@ -8,14 +8,14 @@
-
+
{{ $form }}
@if (isset($actions)) -
+
{{ $actions }}
@endif diff --git a/resources/views/components/input-error.blade.php b/resources/views/components/input-error.blade.php index b5ad968..63cb75e 100644 --- a/resources/views/components/input-error.blade.php +++ b/resources/views/components/input-error.blade.php @@ -1,5 +1,5 @@ @props(['for']) @error($for) -

merge(['class' => 'text-sm text-red-600']) }}>{{ $message }}

+

merge(['class' => 'text-sm text-red-600 dark:text-red-400']) }}>{{ $message }}

@enderror diff --git a/resources/views/components/input.blade.php b/resources/views/components/input.blade.php index 1df7f0d..aa3fd43 100644 --- a/resources/views/components/input.blade.php +++ b/resources/views/components/input.blade.php @@ -1,3 +1,3 @@ @props(['disabled' => false]) -merge(['class' => 'border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm']) !!}> +merge(['class' => 'rounded-md border-0 bg-white dark:bg-gray-700 py-2 px-3 text-gray-900 dark:text-gray-300 ring-1 ring-inset ring-gray-300 dark:ring-gray-700 placeholder:text-gray-400 dark:placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-600 dark:focus:bg-gray-200 dark:focus:text-black dark:focus:ring-0 sm:text-sm']) !!}> diff --git a/resources/views/components/label.blade.php b/resources/views/components/label.blade.php index 1cc65e2..e93b059 100644 --- a/resources/views/components/label.blade.php +++ b/resources/views/components/label.blade.php @@ -1,5 +1,5 @@ @props(['value']) -