generated from rawilk/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Showing
34 changed files
with
1,236 additions
and
13 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
29 changes: 29 additions & 0 deletions
29
database/migrations/create_pending_user_emails_table.php.stub
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,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create(config('profile-filament.table_names.pending_user_email'), function (Blueprint $table) { | ||
$table->id(); | ||
$table->morphs('user'); | ||
$table->string('email')->index(); | ||
$table->string('token'); | ||
$table->dateTime('created_at')->nullable(); | ||
}); | ||
|
||
Schema::create(config('profile-filament.table_names.old_user_email'), function (Blueprint $table) { | ||
$table->id(); | ||
$table->morphs('user'); | ||
$table->string('email')->index(); | ||
$table->string('token'); | ||
$table->dateTime('created_at')->nullable(); | ||
}); | ||
} | ||
}; |
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,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
|
||
'pending_email_verification' => [ | ||
'subject' => 'Verify your email address', | ||
'greeting' => 'Hello,', | ||
'line1' => 'A request has been made on your account to change your email address to :email. Please click the button below to verify your new email address.', | ||
'button' => 'Verify new email address', | ||
'line2' => 'Note: This link will expire in :minutes minutes.', | ||
'line3' => 'If you did not update your email address, no further action is required.', | ||
'salutation' => 'Thanks,<br>:app_name', | ||
], | ||
|
||
'email_updated' => [ | ||
'subject' => 'Email address updated', | ||
'greeting' => 'Hello,', | ||
'line1' => 'You are receiving this email because your :app_name account email address was recently updated.', | ||
'line2' => 'From now on, you will need to use ":email" to sign into your account.', | ||
'line3' => 'If this was you, no further action is required.', | ||
'line4' => 'If you did not initiate this change, [click this link](:url) to revert the change. This link will expire in :days days.', | ||
'salutation' => 'Thanks,<br>:app_name', | ||
], | ||
|
||
'request_details' => [ | ||
'heading' => '**Request details**', | ||
'ip' => 'IP address: :ip', | ||
'date' => 'Date: :date', | ||
], | ||
|
||
]; |
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,73 @@ | ||
<div> | ||
<x-profile-filament::component-section> | ||
<x-slot:title> | ||
<span class="flex items-center gap-x-2" id="current-email-heading"> | ||
<span>{{ __('profile-filament::pages/settings.email.heading') }}</span> | ||
|
||
@if ($pendingEmail) | ||
<x-filament::badge color="warning"> | ||
{{ __('profile-filament::pages/settings.email.change_pending_badge') }} | ||
</x-filament::badge> | ||
@endif | ||
</span> | ||
</x-slot:title> | ||
|
||
<div> | ||
@if ($pendingEmail) | ||
<div class="mb-4 px-4 py-3 rounded-md border border-gray-300 dark:border-gray-600"> | ||
<div class="flex gap-x-2 items-start"> | ||
<div class="shrink-0"> | ||
<x-filament::icon | ||
alias="profile-filament::pending-email-info" | ||
icon="heroicon-o-information-circle" | ||
class="h-5 w-5 text-primary-500 dark:text-primary-400" | ||
/> | ||
</div> | ||
|
||
<div class="flex-1"> | ||
<div class="text-sm font-bold">{{ __('profile-filament::pages/settings.email.pending_heading') }}</div> | ||
|
||
<p class="mt-1 text-sm"> | ||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::pages/settings.email.pending_description', ['email' => $pendingEmail->email])) }} | ||
</p> | ||
|
||
<div class="mt-3 flex items-center gap-x-2"> | ||
{{ $this->resendAction }} | ||
<span class="inline-block rounded-full h-1 w-1 bg-gray-600" aria-hidden="true"></span> | ||
{{ $this->cancelAction }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
@endif | ||
</div> | ||
|
||
<div class="px-4 py-3 rounded-md bg-gray-200 dark:bg-gray-600" aria-labelledby="current-email-heading" aria-describedby="current-email-description"> | ||
{{ $this->user->email }} | ||
</div> | ||
|
||
<p class="text-sm mt-2" id="current-email-description">{{ __('profile-filament::pages/settings.email.email_description') }}</p> | ||
|
||
@unless ($pendingEmail) | ||
<div class="mt-4"> | ||
{{ $this->editAction }} | ||
</div> | ||
@endunless | ||
|
||
@if ($this->securityUrl) | ||
<div class="mt-4 text-xs gap-x-1 flex items-center [&_a]:text-primary-600 dark:[&_a]:text-primary-400 [&_a:hover]:underline"> | ||
<div> | ||
<x-filament::icon | ||
alias="profile-filament::help" | ||
icon="heroicon-o-question-mark-circle" | ||
class="h-5 w-5" | ||
/> | ||
</div> | ||
|
||
<span>{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::pages/settings.account_security_link', ['url' => $this->securityUrl])) }}</span> | ||
</div> | ||
@endif | ||
|
||
<x-filament-actions::modals /> | ||
</x-profile-filament::component-section> | ||
</div> |
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,15 @@ | ||
<x-mail::message> | ||
# {{ __('profile-filament::mail.email_updated.greeting') }} | ||
|
||
{{ __('profile-filament::mail.email_updated.line1', ['app_name' => config('app.name')]) }} | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::mail.email_updated.line2', ['email' => $maskedEmail])) }} | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::mail.email_updated.line3')) }} | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::mail.email_updated.line4', ['url' => $url, 'days' => $linkExpirationDays])) }} | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown($requestDetails) }} | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::mail.email_updated.salutation', ['app_name' => config('app.name')])) }} | ||
</x-mail::message> |
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,15 @@ | ||
<x-mail::message> | ||
# {{ __('profile-filament::mail.pending_email_verification.greeting') }} | ||
|
||
{{ __('profile-filament::mail.pending_email_verification.line1', ['email' => $email]) }} | ||
|
||
<x-mail::button :url="$url"> | ||
{{ __('profile-filament::mail.pending_email_verification.button') }} | ||
</x-mail::button> | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::mail.pending_email_verification.line2', ['minutes' => config('auth.verification.expire', 60)])) }} | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::mail.pending_email_verification.line3')) }} | ||
|
||
{{ \Rawilk\ProfileFilament\renderMarkdown(__('profile-filament::mail.pending_email_verification.salutation', ['app_name' => config('app.name')])) }} | ||
</x-mail::message> |
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,3 +1,7 @@ | ||
<x-profile-filament::layout> | ||
Settings content here. | ||
<div class="flex flex-col gap-y-6 lg:gap-y-10"> | ||
@foreach ($this->registeredComponents as $component) | ||
@livewire($component) | ||
@endforeach | ||
</div> | ||
</x-profile-filament::layout> |
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
Oops, something went wrong.