From 64af59835b152c3892f082fc8b7bc7960c49207a Mon Sep 17 00:00:00 2001 From: dkc Date: Thu, 17 Nov 2022 09:29:05 +0900 Subject: [PATCH 1/4] Remove files coz now they are not needed --- .../resources/views/profile/edit.blade.php | 29 --------- .../partials/delete-user-form.blade.php | 45 -------------- .../partials/update-password-form.blade.php | 43 -------------- .../update-profile-information-form.blade.php | 59 ------------------- 4 files changed, 176 deletions(-) delete mode 100644 stubs/default/resources/views/profile/edit.blade.php delete mode 100644 stubs/default/resources/views/profile/partials/delete-user-form.blade.php delete mode 100644 stubs/default/resources/views/profile/partials/update-password-form.blade.php delete mode 100644 stubs/default/resources/views/profile/partials/update-profile-information-form.blade.php diff --git a/stubs/default/resources/views/profile/edit.blade.php b/stubs/default/resources/views/profile/edit.blade.php deleted file mode 100644 index ef69910..0000000 --- a/stubs/default/resources/views/profile/edit.blade.php +++ /dev/null @@ -1,29 +0,0 @@ - - -

- {{ __('Profile') }} -

-
- -
-
-
-
- @include('profile.partials.update-profile-information-form') -
-
- -
-
- @include('profile.partials.update-password-form') -
-
- -
-
- @include('profile.partials.delete-user-form') -
-
-
-
-
diff --git a/stubs/default/resources/views/profile/partials/delete-user-form.blade.php b/stubs/default/resources/views/profile/partials/delete-user-form.blade.php deleted file mode 100644 index 917358a..0000000 --- a/stubs/default/resources/views/profile/partials/delete-user-form.blade.php +++ /dev/null @@ -1,45 +0,0 @@ -
-
-

{{ __('Delete Account') }}

-

{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }}

-
- - {{__('Delete Account')}} - - -
- @csrf - @method('delete') - -

{{ __('Are you sure your want to delete your account?') }}

-

{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }}

- -
- - - - - -
- -
- - {{ __('Cancel') }} - - - - {{ __('Delete Account') }} - -
-
-
-
diff --git a/stubs/default/resources/views/profile/partials/update-password-form.blade.php b/stubs/default/resources/views/profile/partials/update-password-form.blade.php deleted file mode 100644 index 3996a39..0000000 --- a/stubs/default/resources/views/profile/partials/update-password-form.blade.php +++ /dev/null @@ -1,43 +0,0 @@ -
-
-

{{ __('Update Password') }}

-

{{ __('Ensure your account is using a long, random password to stay secure.') }}

-
- -
- @csrf - @method('put') - -
- - - -
- -
- - - -
- -
- - - -
- -
- {{ __('Save') }} - - @if (session('status') === 'password-updated') -

{{ __('Saved.') }}

- @endif -
-
-
diff --git a/stubs/default/resources/views/profile/partials/update-profile-information-form.blade.php b/stubs/default/resources/views/profile/partials/update-profile-information-form.blade.php deleted file mode 100644 index 62fc1ae..0000000 --- a/stubs/default/resources/views/profile/partials/update-profile-information-form.blade.php +++ /dev/null @@ -1,59 +0,0 @@ -
-
-

{{ __('Profile Information') }}

-

{{ __('Update your account\'s profile information and email address.') }}

-
- -
- @csrf -
- -
- @csrf - @method('patch') - -
- - - -
- -
- - - - - @if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && ! $user->hasVerifiedEmail()) -
-

- {{ __('Your email address is unverified.') }}" - - -

- - @if (session('status') === 'verification-link-sent') -

- {{ __('A new verification link has been sent to your email address.') }} -

- @endif -
- @endif -
- -
- {{ __('Save') }} - - @if (session('status') === 'profile-updated') -

{{ __('Saved.') }}

- @endif -
-
-
From b1a6f8bead7180da72ec8f67fbc928965336f30b Mon Sep 17 00:00:00 2001 From: dkc Date: Thu, 17 Nov 2022 09:29:27 +0900 Subject: [PATCH 2/4] Remove not needed anymore parts --- src/Commands/BreezejpCommand.php | 38 -------------------------------- 1 file changed, 38 deletions(-) diff --git a/src/Commands/BreezejpCommand.php b/src/Commands/BreezejpCommand.php index 206f8be..3a41a21 100644 --- a/src/Commands/BreezejpCommand.php +++ b/src/Commands/BreezejpCommand.php @@ -18,44 +18,6 @@ public function handle(): int (new Filesystem)->ensureDirectoryExists(lang_path()); (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/lang/', lang_path()); - $this->info('Laravel BreezeのProfile用に翻訳可能なbladeを準備します'); - - if (! (new Filesystem)->exists(resource_path('views/profile/'))) { - $this->warn('先にLaravel Breezeをインストールしてください'); - $this->warn('その後、breezejpコマンドの再実行をお願いします'); - - if ($this->confirm('強制的に実行しますか?(Breezeを使わずバリデーションの日本語化利用時等はyesを選択)', false)) { - (new Filesystem)->ensureDirectoryExists(resource_path('views/profile/')); - (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/default/resources/views', resource_path('views')); - $this->info('実行完了'); - - if ($this->confirm('GitHubリポジトリにスターの御協力をお願いします🙏', true)) { - $repoUrl = 'https://github.com/askdkc/breezejp'; - - if (PHP_OS_FAMILY == 'Darwin') { - exec("open {$repoUrl}"); - } - if (PHP_OS_FAMILY == 'Windows') { - exec("start {$repoUrl}"); - } - if (PHP_OS_FAMILY == 'Linux') { - exec("xdg-open {$repoUrl}"); - } - - $this->line('Thank you! / ありがとう💓'); - } - - $this->info('日本語ファイルのインストールが完了しました!'); - - return self::SUCCESS; - } - - return self::FAILURE; - } - - (new Filesystem)->ensureDirectoryExists(resource_path('views/profile/')); - (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/default/resources/views', resource_path('views')); - if ($this->confirm('GitHubリポジトリにスターの御協力をお願いします🙏', true)) { $repoUrl = 'https://github.com/askdkc/breezejp'; From 6da5751ebfc66de2931ded5bb6cd11a98e95a024 Mon Sep 17 00:00:00 2001 From: dkc Date: Thu, 17 Nov 2022 09:29:54 +0900 Subject: [PATCH 3/4] Remove not needed file deletion --- tests/TestCase.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 2579398..b8478c0 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -25,15 +25,6 @@ protected function setUp(): void unlink(__DIR__.'/../vendor/orchestra/testbench-core/laravel/lang/ja/validation.php'); rmdir(__DIR__.'/../vendor/orchestra/testbench-core/laravel/lang/ja'); } - - if (is_dir(__DIR__.'/../vendor/orchestra/testbench-core/laravel/resources/views/profile')) { - unlink(__DIR__.'/../vendor/orchestra/testbench-core/laravel/resources/views/profile/edit.blade.php'); - unlink(__DIR__.'/../vendor/orchestra/testbench-core/laravel/resources/views/profile/partials/delete-user-form.blade.php'); - unlink(__DIR__.'/../vendor/orchestra/testbench-core/laravel/resources/views/profile/partials/update-password-form.blade.php'); - unlink(__DIR__.'/../vendor/orchestra/testbench-core/laravel/resources/views/profile/partials/update-profile-information-form.blade.php'); - rmdir(__DIR__.'/../vendor/orchestra/testbench-core/laravel/resources/views/profile/partials'); - rmdir(__DIR__.'/../vendor/orchestra/testbench-core/laravel/resources/views/profile'); - } } protected function getPackageProviders($app) From 9b04577da62757b7663a25d18272ae71f28fe620 Mon Sep 17 00:00:00 2001 From: dkc Date: Thu, 17 Nov 2022 09:30:03 +0900 Subject: [PATCH 4/4] Update CommandTest.php --- tests/CommandTest.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/CommandTest.php b/tests/CommandTest.php index 74865a3..a02a7ce 100644 --- a/tests/CommandTest.php +++ b/tests/CommandTest.php @@ -1,21 +1,8 @@ artisan('breezejp') ->expectsOutput('Laravel Breeze用に日本語翻訳ファイルを準備します') - ->expectsOutput('Laravel BreezeのProfile用に翻訳可能なbladeを準備します') - ->expectsOutput('先にLaravel Breezeをインストールしてください') - ->expectsConfirmation('強制的に実行しますか?(Breezeを使わずバリデーションの日本語化利用時等はyesを選択)', 'no') - ->assertExitCode(1); -}); - -test('breezejp command forcefully run and see all the published files', closure: function () { - $this->artisan('breezejp') - ->expectsOutput('Laravel Breeze用に日本語翻訳ファイルを準備します') - ->expectsOutput('Laravel BreezeのProfile用に翻訳可能なbladeを準備します') - ->expectsOutput('先にLaravel Breezeをインストールしてください') - ->expectsConfirmation('強制的に実行しますか?(Breezeを使わずバリデーションの日本語化利用時等はyesを選択)', 'yes') - ->expectsOutput('実行完了') ->expectsConfirmation('GitHubリポジトリにスターの御協力をお願いします🙏', 'no') ->expectsOutput('日本語ファイルのインストールが完了しました!') ->assertExitCode(0);