diff --git a/app/Livewire/BackupTasks/CreateBackupTaskForm.php b/app/Livewire/BackupTasks/CreateBackupTaskForm.php index 5c6ac89d..06d06f26 100644 --- a/app/Livewire/BackupTasks/CreateBackupTaskForm.php +++ b/app/Livewire/BackupTasks/CreateBackupTaskForm.php @@ -80,9 +80,13 @@ class CreateBackupTaskForm extends Component public ?string $isolatedUsername = null; public ?string $isolatedPassword = null; - public function updatedUseCustomCron(): void {} + public function updatedUseCustomCron(): void + { + } - public function updatedUseIsolatedCredentials(): void {} + public function updatedUseIsolatedCredentials(): void + { + } public function updatedBackupType(): void { diff --git a/app/Livewire/BackupTasks/UpdateBackupTaskForm.php b/app/Livewire/BackupTasks/UpdateBackupTaskForm.php index 23f3c109..b580da67 100644 --- a/app/Livewire/BackupTasks/UpdateBackupTaskForm.php +++ b/app/Livewire/BackupTasks/UpdateBackupTaskForm.php @@ -82,7 +82,9 @@ class UpdateBackupTaskForm extends Component public ?string $isolatedUsername = null; public ?string $isolatedPassword = null; - public function updatedUseCustomCron(): void {} + public function updatedUseCustomCron(): void + { + } public function updatedBackupType(): void { diff --git a/resources/views/account/partials/sidebar.blade.php b/resources/views/account/partials/sidebar.blade.php index 863bc2a4..629f65d0 100644 --- a/resources/views/account/partials/sidebar.blade.php +++ b/resources/views/account/partials/sidebar.blade.php @@ -8,4 +8,8 @@ class="pg:pb-0 scroll-hidden flex h-24 overflow-x-scroll px-8 pb-4 lg:block lg:h @svg('heroicon-o-tag', 'h-5 w-5 mr-2 inline') {{ __('Tags') }} + + @svg('heroicon-o-trash', 'h-5 w-5 mr-2 inline') + {{ __('Remove Account') }} + diff --git a/resources/views/account/remove-account.blade.php b/resources/views/account/remove-account.blade.php new file mode 100644 index 00000000..9ab63e55 --- /dev/null +++ b/resources/views/account/remove-account.blade.php @@ -0,0 +1,7 @@ + +
+
+ +
+
+
diff --git a/resources/views/livewire/profile/delete-user-form.blade.php b/resources/views/livewire/profile/delete-user-form.blade.php index 38d7ec07..72059586 100644 --- a/resources/views/livewire/profile/delete-user-form.blade.php +++ b/resources/views/livewire/profile/delete-user-form.blade.php @@ -23,11 +23,26 @@ public function deleteUser(Logout $logout): void

- {{ __('Delete Account') }} + {{ __('Remove Account') }}

+ @if (Auth::user()->backupTasks->count() > 0) +
+ @svg('heroicon-o-exclamation-triangle', 'h-5 w-5 inline mr-2') + + {{ __('Your scheduled tasks will not be ran if you remove your account.') }} + +
+ @endif +

- {{ __('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.') }} + {{ __('Before removing your account, please take a moment to download any data or information that you wish to retain.') }} +

+

+ {{ __('Once your account is removed, all of its resources and data will be permanently removed. Additionally, all backup tasks, backup destinations, and linked servers will be removed from our systems.') }} +

+

+ {{ __('These resources, such as S3 buckets or Linux servers, will still exist at their respective services (server hosts, Amazon S3, etc.). However, Vanguard will no longer be able to link to them and perform scheduled backups of your data.') }}

@@ -35,43 +50,63 @@ public function deleteUser(Logout $logout): void x-data="" x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')" > - {{ __('Delete Account') }} + {{ __('Remove Account') }} + + + {{ __('Get me out of here!') }} + + +

- {{ __('Are you sure you want to delete your account?') }} + {{ __('Are you certain you want to proceed with removing 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.') }} +

+ {{ __('When your account is removed, all the data we hold on you will be permanently erased. This includes any backup tasks, backup destinations you have configured with us, and servers you have linked.') }} +

+ +

+ {{ __('This action cannot be reversed, so please make sure you are certain about this decision.') }} +

+ +

+ {{ __('You are welcome to re-join at any time.') }} +

+ +

+ {{ __('If you wish to proceed, please enter your account password to confirm.') }}

- + + + {{ __('To continue with the removal of your account, please enter the password associated with your account. If you do not know, you can reset your password.') }} +
- + + {{ __('Remove Account') }} + + {{ __('Cancel') }} - - - {{ __('Delete Account') }} -
diff --git a/resources/views/profile.blade.php b/resources/views/profile.blade.php index 7007c7c2..4e8d8146 100644 --- a/resources/views/profile.blade.php +++ b/resources/views/profile.blade.php @@ -12,12 +12,6 @@ - -
-
- -
-
diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php index 282017b1..ca7363bb 100644 --- a/routes/breadcrumbs.php +++ b/routes/breadcrumbs.php @@ -20,6 +20,11 @@ $trail->push(__('Profile'), route('profile')); }); +Breadcrumbs::for('account.remove-account', function (BreadcrumbTrail $trail) { + $trail->parent('profile'); + $trail->push(__('Remove Account'), route('account.remove-account')); +}); + Breadcrumbs::for('backup-tasks.index', function (BreadcrumbTrail $trail) { $trail->push(__('Backup Tasks'), route('backup-tasks.index')); }); diff --git a/routes/web.php b/routes/web.php index 07a92ee3..9557a78f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,6 +16,10 @@ ->middleware(['auth']) ->name('profile'); +Route::view('profile/remove', 'account.remove-account') + ->middleware(['auth']) + ->name('account.remove-account'); + Route::view('frequently-asked-questions', 'frequently-asked-questions') ->middleware(['auth']) ->name('frequently-asked-questions'); diff --git a/tests/Feature/Profile/ProfileTest.php b/tests/Feature/Profile/ProfileTest.php index d71071d4..c786da4e 100644 --- a/tests/Feature/Profile/ProfileTest.php +++ b/tests/Feature/Profile/ProfileTest.php @@ -14,7 +14,18 @@ $response ->assertOk() ->assertSeeVolt('profile.update-profile-information-form') - ->assertSeeVolt('profile.update-password-form') + ->assertSeeVolt('profile.update-password-form'); +}); + +test('delete page is displayed', function () { + $user = User::factory()->create(); + + $this->actingAs($user); + + $response = $this->get('/profile/remove'); + + $response + ->assertOk() ->assertSeeVolt('profile.delete-user-form'); });