Skip to content

Commit f8eb142

Browse files
committed
Copy Blade files on installation
1 parent fa9cfe1 commit f8eb142

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+321
-369
lines changed

src/Console/InstallCommand.php

+8
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ public function handle()
8383
$this->installInertiaStack();
8484
}
8585

86+
// Emails...
87+
(new Filesystem)->ensureDirectoryExists(resource_path('views/emails'));
88+
(new Filesystem)->copyDirectory(__DIR__.'/../../stubs/resources/views/emails', resource_path('views/emails'));
89+
8690
// Tests...
8791
$stubs = $this->getTestStubsPath();
8892

@@ -167,6 +171,7 @@ protected function installLivewireStack()
167171
(new Filesystem)->ensureDirectoryExists(resource_path('markdown'));
168172
(new Filesystem)->ensureDirectoryExists(resource_path('views/api'));
169173
(new Filesystem)->ensureDirectoryExists(resource_path('views/auth'));
174+
(new Filesystem)->ensureDirectoryExists(resource_path('views/components'));
170175
(new Filesystem)->ensureDirectoryExists(resource_path('views/layouts'));
171176
(new Filesystem)->ensureDirectoryExists(resource_path('views/profile'));
172177

@@ -191,6 +196,9 @@ protected function installLivewireStack()
191196
copy(__DIR__.'/../../stubs/app/Actions/Fortify/UpdateUserProfileInformation.php', app_path('Actions/Fortify/UpdateUserProfileInformation.php'));
192197
copy(__DIR__.'/../../stubs/app/Actions/Jetstream/DeleteUser.php', app_path('Actions/Jetstream/DeleteUser.php'));
193198

199+
// Components...
200+
(new Filesystem)->copyDirectory(__DIR__.'/../../stubs/livewire/resources/views/components', resource_path('views/components'));
201+
194202
// View Components...
195203
copy(__DIR__.'/../../stubs/livewire/app/View/Components/AppLayout.php', app_path('View/Components/AppLayout.php'));
196204
copy(__DIR__.'/../../stubs/livewire/app/View/Components/GuestLayout.php', app_path('View/Components/GuestLayout.php'));

src/JetstreamServiceProvider.php

-56
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public function boot()
7171

7272
Fortify::viewPrefix('auth.');
7373

74-
$this->configureComponents();
7574
$this->configurePublishing();
7675
$this->configureRoutes();
7776
$this->configureCommands();
@@ -95,57 +94,6 @@ public function boot()
9594
}
9695
}
9796

98-
/**
99-
* Configure the Jetstream Blade components.
100-
*
101-
* @return void
102-
*/
103-
protected function configureComponents()
104-
{
105-
$this->callAfterResolving(BladeCompiler::class, function () {
106-
$this->registerComponent('action-message');
107-
$this->registerComponent('action-section');
108-
$this->registerComponent('application-logo');
109-
$this->registerComponent('application-mark');
110-
$this->registerComponent('authentication-card');
111-
$this->registerComponent('authentication-card-logo');
112-
$this->registerComponent('banner');
113-
$this->registerComponent('button');
114-
$this->registerComponent('confirmation-modal');
115-
$this->registerComponent('confirms-password');
116-
$this->registerComponent('danger-button');
117-
$this->registerComponent('dialog-modal');
118-
$this->registerComponent('dropdown');
119-
$this->registerComponent('dropdown-link');
120-
$this->registerComponent('form-section');
121-
$this->registerComponent('input');
122-
$this->registerComponent('checkbox');
123-
$this->registerComponent('input-error');
124-
$this->registerComponent('label');
125-
$this->registerComponent('modal');
126-
$this->registerComponent('nav-link');
127-
$this->registerComponent('responsive-nav-link');
128-
$this->registerComponent('responsive-switchable-team');
129-
$this->registerComponent('secondary-button');
130-
$this->registerComponent('section-border');
131-
$this->registerComponent('section-title');
132-
$this->registerComponent('switchable-team');
133-
$this->registerComponent('validation-errors');
134-
$this->registerComponent('welcome');
135-
});
136-
}
137-
138-
/**
139-
* Register the given component.
140-
*
141-
* @param string $component
142-
* @return void
143-
*/
144-
protected function registerComponent(string $component)
145-
{
146-
Blade::component('jetstream::components.'.$component, 'jet-'.$component);
147-
}
148-
14997
/**
15098
* Configure publishing for the package.
15199
*
@@ -161,10 +109,6 @@ protected function configurePublishing()
161109
__DIR__.'/../stubs/config/jetstream.php' => config_path('jetstream.php'),
162110
], 'jetstream-config');
163111

164-
$this->publishes([
165-
__DIR__.'/../resources/views' => resource_path('views/vendor/jetstream'),
166-
], 'jetstream-views');
167-
168112
$this->publishes([
169113
__DIR__.'/../database/migrations/2014_10_12_000000_create_users_table.php' => database_path('migrations/2014_10_12_000000_create_users_table.php'),
170114
], 'jetstream-migrations');

src/Mail/TeamInvitation.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(TeamInvitationModel $invitation)
3737
*/
3838
public function build()
3939
{
40-
return $this->markdown('jetstream::mail.team-invitation', ['acceptUrl' => URL::signedRoute('team-invitations.accept', [
40+
return $this->markdown('emails.team-invitation', ['acceptUrl' => URL::signedRoute('team-invitations.accept', [
4141
'invitation' => $this->invitation,
4242
])])->subject(__('Team Invitation'));
4343
}

stubs/livewire/resources/views/api/api-token-manager.blade.php

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div>
22
<!-- Generate API Token -->
3-
<x-jet-form-section submit="createApiToken">
3+
<x-form-section submit="createApiToken">
44
<x-slot name="title">
55
{{ __('Create API Token') }}
66
</x-slot>
@@ -12,20 +12,20 @@
1212
<x-slot name="form">
1313
<!-- Token Name -->
1414
<div class="col-span-6 sm:col-span-4">
15-
<x-jet-label for="name" value="{{ __('Token Name') }}" />
16-
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="createApiTokenForm.name" autofocus />
17-
<x-jet-input-error for="name" class="mt-2" />
15+
<x-label for="name" value="{{ __('Token Name') }}" />
16+
<x-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="createApiTokenForm.name" autofocus />
17+
<x-input-error for="name" class="mt-2" />
1818
</div>
1919

2020
<!-- Token Permissions -->
2121
@if (Laravel\Jetstream\Jetstream::hasPermissions())
2222
<div class="col-span-6">
23-
<x-jet-label for="permissions" value="{{ __('Permissions') }}" />
23+
<x-label for="permissions" value="{{ __('Permissions') }}" />
2424

2525
<div class="mt-2 grid grid-cols-1 md:grid-cols-2 gap-4">
2626
@foreach (Laravel\Jetstream\Jetstream::$permissions as $permission)
2727
<label class="flex items-center">
28-
<x-jet-checkbox wire:model.defer="createApiTokenForm.permissions" :value="$permission"/>
28+
<x-checkbox wire:model.defer="createApiTokenForm.permissions" :value="$permission"/>
2929
<span class="ml-2 text-sm text-gray-600">{{ $permission }}</span>
3030
</label>
3131
@endforeach
@@ -35,22 +35,22 @@
3535
</x-slot>
3636

3737
<x-slot name="actions">
38-
<x-jet-action-message class="mr-3" on="created">
38+
<x-action-message class="mr-3" on="created">
3939
{{ __('Created.') }}
40-
</x-jet-action-message>
40+
</x-action-message>
4141

42-
<x-jet-button>
42+
<x-button>
4343
{{ __('Create') }}
44-
</x-jet-button>
44+
</x-button>
4545
</x-slot>
46-
</x-jet-form-section>
46+
</x-form-section>
4747

4848
@if ($this->user->tokens->isNotEmpty())
49-
<x-jet-section-border />
49+
<x-section-border />
5050

5151
<!-- Manage API Tokens -->
5252
<div class="mt-10 sm:mt-0">
53-
<x-jet-action-section>
53+
<x-action-section>
5454
<x-slot name="title">
5555
{{ __('Manage API Tokens') }}
5656
</x-slot>
@@ -89,12 +89,12 @@
8989
@endforeach
9090
</div>
9191
</x-slot>
92-
</x-jet-action-section>
92+
</x-action-section>
9393
</div>
9494
@endif
9595

9696
<!-- Token Value Modal -->
97-
<x-jet-dialog-modal wire:model="displayingToken">
97+
<x-dialog-modal wire:model="displayingToken">
9898
<x-slot name="title">
9999
{{ __('API Token') }}
100100
</x-slot>
@@ -104,22 +104,22 @@
104104
{{ __('Please copy your new API token. For your security, it won\'t be shown again.') }}
105105
</div>
106106

107-
<x-jet-input x-ref="plaintextToken" type="text" readonly :value="$plainTextToken"
107+
<x-input x-ref="plaintextToken" type="text" readonly :value="$plainTextToken"
108108
class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full"
109109
autofocus autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
110110
@showing-token-modal.window="setTimeout(() => $refs.plaintextToken.select(), 250)"
111111
/>
112112
</x-slot>
113113

114114
<x-slot name="footer">
115-
<x-jet-secondary-button wire:click="$set('displayingToken', false)" wire:loading.attr="disabled">
115+
<x-secondary-button wire:click="$set('displayingToken', false)" wire:loading.attr="disabled">
116116
{{ __('Close') }}
117-
</x-jet-secondary-button>
117+
</x-secondary-button>
118118
</x-slot>
119-
</x-jet-dialog-modal>
119+
</x-dialog-modal>
120120

121121
<!-- API Token Permissions Modal -->
122-
<x-jet-dialog-modal wire:model="managingApiTokenPermissions">
122+
<x-dialog-modal wire:model="managingApiTokenPermissions">
123123
<x-slot name="title">
124124
{{ __('API Token Permissions') }}
125125
</x-slot>
@@ -128,26 +128,26 @@ class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full
128128
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
129129
@foreach (Laravel\Jetstream\Jetstream::$permissions as $permission)
130130
<label class="flex items-center">
131-
<x-jet-checkbox wire:model.defer="updateApiTokenForm.permissions" :value="$permission"/>
131+
<x-checkbox wire:model.defer="updateApiTokenForm.permissions" :value="$permission"/>
132132
<span class="ml-2 text-sm text-gray-600">{{ $permission }}</span>
133133
</label>
134134
@endforeach
135135
</div>
136136
</x-slot>
137137

138138
<x-slot name="footer">
139-
<x-jet-secondary-button wire:click="$set('managingApiTokenPermissions', false)" wire:loading.attr="disabled">
139+
<x-secondary-button wire:click="$set('managingApiTokenPermissions', false)" wire:loading.attr="disabled">
140140
{{ __('Cancel') }}
141-
</x-jet-secondary-button>
141+
</x-secondary-button>
142142

143-
<x-jet-button class="ml-3" wire:click="updateApiToken" wire:loading.attr="disabled">
143+
<x-button class="ml-3" wire:click="updateApiToken" wire:loading.attr="disabled">
144144
{{ __('Save') }}
145-
</x-jet-button>
145+
</x-button>
146146
</x-slot>
147-
</x-jet-dialog-modal>
147+
</x-dialog-modal>
148148

149149
<!-- Delete Token Confirmation Modal -->
150-
<x-jet-confirmation-modal wire:model="confirmingApiTokenDeletion">
150+
<x-confirmation-modal wire:model="confirmingApiTokenDeletion">
151151
<x-slot name="title">
152152
{{ __('Delete API Token') }}
153153
</x-slot>
@@ -157,13 +157,13 @@ class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full
157157
</x-slot>
158158

159159
<x-slot name="footer">
160-
<x-jet-secondary-button wire:click="$toggle('confirmingApiTokenDeletion')" wire:loading.attr="disabled">
160+
<x-secondary-button wire:click="$toggle('confirmingApiTokenDeletion')" wire:loading.attr="disabled">
161161
{{ __('Cancel') }}
162-
</x-jet-secondary-button>
162+
</x-secondary-button>
163163

164-
<x-jet-danger-button class="ml-3" wire:click="deleteApiToken" wire:loading.attr="disabled">
164+
<x-danger-button class="ml-3" wire:click="deleteApiToken" wire:loading.attr="disabled">
165165
{{ __('Delete') }}
166-
</x-jet-danger-button>
166+
</x-danger-button>
167167
</x-slot>
168-
</x-jet-confirmation-modal>
168+
</x-confirmation-modal>
169169
</div>
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<x-guest-layout>
2-
<x-jet-authentication-card>
2+
<x-authentication-card>
33
<x-slot name="logo">
4-
<x-jet-authentication-card-logo />
4+
<x-authentication-card-logo />
55
</x-slot>
66

77
<div class="mb-4 text-sm text-gray-600">
88
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
99
</div>
1010

11-
<x-jet-validation-errors class="mb-4" />
11+
<x-validation-errors class="mb-4" />
1212

1313
<form method="POST" action="{{ route('password.confirm') }}">
1414
@csrf
1515

1616
<div>
17-
<x-jet-label for="password" value="{{ __('Password') }}" />
18-
<x-jet-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="current-password" autofocus />
17+
<x-label for="password" value="{{ __('Password') }}" />
18+
<x-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="current-password" autofocus />
1919
</div>
2020

2121
<div class="flex justify-end mt-4">
22-
<x-jet-button class="ml-4">
22+
<x-button class="ml-4">
2323
{{ __('Confirm') }}
24-
</x-jet-button>
24+
</x-button>
2525
</div>
2626
</form>
27-
</x-jet-authentication-card>
27+
</x-authentication-card>
2828
</x-guest-layout>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<x-guest-layout>
2-
<x-jet-authentication-card>
2+
<x-authentication-card>
33
<x-slot name="logo">
4-
<x-jet-authentication-card-logo />
4+
<x-authentication-card-logo />
55
</x-slot>
66

77
<div class="mb-4 text-sm text-gray-600">
@@ -14,21 +14,21 @@
1414
</div>
1515
@endif
1616

17-
<x-jet-validation-errors class="mb-4" />
17+
<x-validation-errors class="mb-4" />
1818

1919
<form method="POST" action="{{ route('password.email') }}">
2020
@csrf
2121

2222
<div class="block">
23-
<x-jet-label for="email" value="{{ __('Email') }}" />
24-
<x-jet-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
23+
<x-label for="email" value="{{ __('Email') }}" />
24+
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
2525
</div>
2626

2727
<div class="flex items-center justify-end mt-4">
28-
<x-jet-button>
28+
<x-button>
2929
{{ __('Email Password Reset Link') }}
30-
</x-jet-button>
30+
</x-button>
3131
</div>
3232
</form>
33-
</x-jet-authentication-card>
33+
</x-authentication-card>
3434
</x-guest-layout>

0 commit comments

Comments
 (0)