-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f524f6
commit 800ec41
Showing
13 changed files
with
343 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
database/migrations/2024_12_29_132449_add_image_to_users_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddImageToUsersTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('users', function (Blueprint $table) { | ||
$table->string('image')->nullable()->after('email'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('users', function (Blueprint $table) { | ||
$table->dropColumn('image'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,9 @@ | |
} | ||
|
||
/* Accounts */ | ||
|
||
/* Profile */ | ||
#profileImage:hover { | ||
transition: 0.3s ease-in-out; | ||
opacity: 0.5; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{-- Deletion Toast --}} | ||
<div id="profileDeleteToast" | ||
class="toast align-items-center text-white bg-gradient-primary border-0 position-fixed bottom-0 start-0 mb-3 ms-3" | ||
role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="3000"> | ||
<div class="d-flex"> | ||
<div id="profileDeleteToastBody" class="toast-body"> | ||
Account deletion in progress... <span id="delete-countdown">5</span> | ||
</div> | ||
<a class="btn btn-link pe-3 my-1 ps-0 text-white ms-auto" onclick="cancelDeletion()">Undo</a> | ||
</div> | ||
</div> |
74 changes: 30 additions & 44 deletions
74
resources/views/profile/partials/update-password-form.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,34 @@ | ||
<section> | ||
<header> | ||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> | ||
{{ __('Update Password') }} | ||
</h2> | ||
<form method="post" id="updatePasswordForm" action="{{ route('password.update') }}"> | ||
@csrf | ||
@method('put') | ||
|
||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400"> | ||
{{ __('Ensure your account is using a long, random password to stay secure.') }} | ||
</p> | ||
</header> | ||
<div class="mb-3"> | ||
<label for="update_password_current_password" class="form-label">{{ __('Current Password') }}</label> | ||
<input type="password" id="update_password_current_password" name="current_password" class="form-control mt-1" | ||
autocomplete="current-password" required> | ||
@error('current_password') | ||
<div class="text-danger mt-2">{{ $message }}</div> | ||
@enderror | ||
</div> | ||
|
||
<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6"> | ||
@csrf | ||
@method('put') | ||
<div class="mb-3"> | ||
<label for="update_password_password" class="form-label">{{ __('New Password') }}</label> | ||
<input type="password" id="update_password_password" name="password" class="form-control mt-1" | ||
autocomplete="new-password" required> | ||
@error('password') | ||
<div class="text-danger mt-2">{{ $message }}</div> | ||
@enderror | ||
</div> | ||
|
||
<div> | ||
<x-input-label for="update_password_current_password" :value="__('Current Password')" /> | ||
<x-text-input id="update_password_current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" /> | ||
<x-input-error :messages="$errors->updatePassword->get('current_password')" class="mt-2" /> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="update_password_password_confirmation" class="form-label">{{ __('Confirm Password') }}</label> | ||
<input type="password" id="update_password_password_confirmation" name="password_confirmation" | ||
class="form-control mt-1" autocomplete="new-password" required> | ||
@error('password_confirmation') | ||
<div class="text-danger mt-2">{{ $message }}</div> | ||
@enderror | ||
</div> | ||
|
||
<div> | ||
<x-input-label for="update_password_password" :value="__('New Password')" /> | ||
<x-text-input id="update_password_password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" /> | ||
<x-input-error :messages="$errors->updatePassword->get('password')" class="mt-2" /> | ||
</div> | ||
|
||
<div> | ||
<x-input-label for="update_password_password_confirmation" :value="__('Confirm Password')" /> | ||
<x-text-input id="update_password_password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" /> | ||
<x-input-error :messages="$errors->updatePassword->get('password_confirmation')" class="mt-2" /> | ||
</div> | ||
|
||
<div class="flex items-center gap-4"> | ||
<x-primary-button>{{ __('Save') }}</x-primary-button> | ||
|
||
@if (session('status') === 'password-updated') | ||
<p | ||
x-data="{ show: true }" | ||
x-show="show" | ||
x-transition | ||
x-init="setTimeout(() => show = false, 2000)" | ||
class="text-sm text-gray-600 dark:text-gray-400" | ||
>{{ __('Saved.') }}</p> | ||
@endif | ||
</div> | ||
</form> | ||
</section> | ||
<button type="submit" class="btn btn-primary w-100">{{ __('Save') }}</button> | ||
</form> | ||
</div> |
16 changes: 16 additions & 0 deletions
16
resources/views/profile/partials/update-password-modal.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="modal fade" id="ProfileUpdatePasswordModal" tabindex="-1" role="dialog" aria-labelledby="updatePasswordModalTitle" | ||
aria-hidden="true"> | ||
<div class="modal-dialog modal-dialog-centered" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header px-5"> | ||
<h6 class="modal-title" id="ProfileUpdatePasswordTitle">Update Password</h6> | ||
<button type="button" class="btn-close text-dark" data-bs-dismiss="modal" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="modal-body px-5"> | ||
@include("profile.partials.update-password-form") | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.