Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: fix tests for new jetstream livewire
Browse files Browse the repository at this point in the history
  • Loading branch information
lightszentip committed Aug 28, 2024
1 parent 89566a4 commit f7d8203
Show file tree
Hide file tree
Showing 25 changed files with 224 additions and 224 deletions.
64 changes: 32 additions & 32 deletions resources/views/api/api-token-manager.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div>
<!-- Generate API Token -->
<x-jet-form-section submit="createApiToken">
<x-form-section submit="createApiToken">
<x-slot name="title">
{{ __('Create API Token') }}
</x-slot>
Expand All @@ -12,21 +12,21 @@
<x-slot name="form">
<!-- Token Name -->
<div class="col-span-6 sm:col-span-4">
<x-jet-label for="name" value="{{ __('Token Name') }}"/>
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model="createApiTokenForm.name"
<x-label for="name" value="{{ __('Token Name') }}"/>
<x-input id="name" type="text" class="mt-1 block w-full" wire:model="createApiTokenForm.name"
autofocus/>
<x-jet-input-error for="name" class="mt-2"/>
<x-input-error for="name" class="mt-2"/>
</div>

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

<div class="mt-2 grid grid-cols-1 md:grid-cols-2 gap-4">
@foreach (Laravel\Jetstream\Jetstream::$permissions as $permission)
<label class="flex items-center">
<x-jet-checkbox wire:model="createApiTokenForm.permissions" :value="$permission"/>
<x-checkbox wire:model="createApiTokenForm.permissions" :value="$permission"/>
<span class="ml-2 text-sm text-gray-600">{{ $permission }}</span>
</label>
@endforeach
Expand All @@ -36,22 +36,22 @@
</x-slot>

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

<x-jet-button>
<x-button>
{{ __('Create') }}
</x-jet-button>
</x-button>
</x-slot>
</x-jet-form-section>
</x-form-section>

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

<!-- Manage API Tokens -->
<div class="mt-10 sm:mt-0">
<x-jet-action-section>
<x-action-section>
<x-slot name="title">
{{ __('Manage API Tokens') }}
</x-slot>
Expand Down Expand Up @@ -92,12 +92,12 @@
@endforeach
</div>
</x-slot>
</x-jet-action-section>
</x-action-section>
</div>
@endif

<!-- Token Value Modal -->
<x-jet-dialog-modal wire:model.live="displayingToken">
<x-dialog-modal wire:model.live="displayingToken">
<x-slot name="title">
{{ __('API Token') }}
</x-slot>
Expand All @@ -107,22 +107,22 @@
{{ __('Please copy your new API token. For your security, it won\'t be shown again.') }}
</div>

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

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

<!-- API Token Permissions Modal -->
<x-jet-dialog-modal wire:model.live="managingApiTokenPermissions">
<x-dialog-modal wire:model.live="managingApiTokenPermissions">
<x-slot name="title">
{{ __('API Token Permissions') }}
</x-slot>
Expand All @@ -131,27 +131,27 @@ class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
@foreach (Laravel\Jetstream\Jetstream::$permissions as $permission)
<label class="flex items-center">
<x-jet-checkbox wire:model="updateApiTokenForm.permissions" :value="$permission"/>
<x-checkbox wire:model="updateApiTokenForm.permissions" :value="$permission"/>
<span class="ml-2 text-sm text-gray-600">{{ $permission }}</span>
</label>
@endforeach
</div>
</x-slot>

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

<x-jet-button class="ml-2" wire:click="updateApiToken" wire:loading.attr="disabled">
<x-button class="ml-2" wire:click="updateApiToken" wire:loading.attr="disabled">
{{ __('Save') }}
</x-jet-button>
</x-button>
</x-slot>
</x-jet-dialog-modal>
</x-dialog-modal>

<!-- Delete Token Confirmation Modal -->
<x-jet-confirmation-modal wire:model.live="confirmingApiTokenDeletion">
<x-confirmation-modal wire:model.live="confirmingApiTokenDeletion">
<x-slot name="title">
{{ __('Delete API Token') }}
</x-slot>
Expand All @@ -161,13 +161,13 @@ class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full
</x-slot>

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

<x-jet-danger-button class="ml-2" wire:click="deleteApiToken" wire:loading.attr="disabled">
<x-danger-button class="ml-2" wire:click="deleteApiToken" wire:loading.attr="disabled">
{{ __('Delete') }}
</x-jet-danger-button>
</x-danger-button>
</x-slot>
</x-jet-confirmation-modal>
</x-confirmation-modal>
</div>
16 changes: 8 additions & 8 deletions resources/views/auth/confirm-password.blade.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<x-guest-layout>
<x-jet-authentication-card>
<x-authentication-card>
<x-slot name="logo">
<x-jet-authentication-card-logo/>
<x-authentication-card-logo/>
</x-slot>

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

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

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

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

<div class="flex justify-end mt-4">
<x-jet-button class="ml-4">
<x-button class="ml-4">
{{ __('Confirm') }}
</x-jet-button>
</x-button>
</div>
</form>
</x-jet-authentication-card>
</x-authentication-card>
</x-guest-layout>
16 changes: 8 additions & 8 deletions resources/views/auth/forgot-password.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<x-guest-layout>
<x-jet-authentication-card>
<x-authentication-card>
<x-slot name="logo">
<x-jet-authentication-card-logo/>
<x-authentication-card-logo/>
</x-slot>

<div class="mb-4 text-sm text-gray-600">
Expand All @@ -14,22 +14,22 @@
</div>
@endif

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

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

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

<div class="flex items-center justify-end mt-4">
<x-jet-button>
<x-button>
{{ __('Email Password Reset Link') }}
</x-jet-button>
</x-button>
</div>
</form>
</x-jet-authentication-card>
</x-authentication-card>
</x-guest-layout>
22 changes: 11 additions & 11 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<x-guest-layout>
<main class="form-signin">
<x-jet-authentication-card>
<x-authentication-card>
<x-slot name="logo">
<x-jet-authentication-card-logo/>
<x-authentication-card-logo/>
</x-slot>

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

@if (session('status'))
<div class="mb-4 font-medium text-sm text-green-600">
Expand All @@ -18,21 +18,21 @@
<h1 class="h3 mb-3 fw-normal">Please sign in</h1>
<div class="form-floating">

<x-jet-input id="email" class="form-control" type="email" name="email" :value="old('email')"
<x-input id="email" class="form-control" type="email" name="email" :value="old('email')"
required autofocus placeholder="name@example.com"/>
<x-jet-label for="email" value="{{ __('Email') }}"/>
<x-label for="email" value="{{ __('Email') }}"/>
</div>

<div class="form-floating">

<x-jet-input id="password" class="form-control" type="password" name="password" required
<x-input id="password" class="form-control" type="password" name="password" required
autocomplete="current-password" placeholder="Password"/>
<x-jet-label for="password" value="{{ __('Password') }}"/>
<x-label for="password" value="{{ __('Password') }}"/>
</div>

<div class="block mt-4">
<label for="remember_me" class="flex items-center">
<x-jet-checkbox id="remember_me" name="remember"/>
<x-checkbox id="remember_me" name="remember"/>
<span class="ml-2 text-sm text-gray-600">{{ __('Remember me') }}</span>
</label>
</div>
Expand All @@ -45,11 +45,11 @@
</a>
@endif

<x-jet-button class="ml-4">
<x-button class="ml-4">
{{ __('Log in') }}
</x-jet-button>
</x-button>
</div>
</form>
</x-jet-authentication-card>
</x-authentication-card>
</main>
</x-guest-layout>
34 changes: 17 additions & 17 deletions resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
<x-guest-layout>
<main class="form-signin">
<x-jet-authentication-card>
<x-authentication-card>
<x-slot name="logo">
<x-jet-authentication-card-logo/>
<x-authentication-card-logo/>
</x-slot>

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

<form method="POST" action="{{ route('register') }}">
@csrf

<div class="form-floating">

<x-jet-input id="name" class="form-control" type="text" name="name" :value="old('name')" required
<x-input id="name" class="form-control" type="text" name="name" :value="old('name')" required
autofocus autocomplete="name"/>
<x-jet-label for="name" value="{{ __('Name') }}"/>
<x-label for="name" value="{{ __('Name') }}"/>
</div>

<div class="form-floating">
<x-jet-input id="email" class="form-control" type="email" name="email" :value="old('email')"
<x-input id="email" class="form-control" type="email" name="email" :value="old('email')"
required/>
<x-jet-label for="email" value="{{ __('Email') }}"/>
<x-label for="email" value="{{ __('Email') }}"/>

</div>

<div class="form-floating">
<x-jet-input id="password" class="form-control" type="password" name="password" required
<x-input id="password" class="form-control" type="password" name="password" required
autocomplete="new-password"/>
<x-jet-label for="password" value="{{ __('Password') }}"/>
<x-label for="password" value="{{ __('Password') }}"/>

</div>

<div class="form-floating">
<x-jet-input id="password_confirmation" class="form-control" type="password"
<x-input id="password_confirmation" class="form-control" type="password"
name="password_confirmation" required autocomplete="new-password"/>
<x-jet-label for="password_confirmation" value="{{ __('Confirm Password') }}"/>
<x-label for="password_confirmation" value="{{ __('Confirm Password') }}"/>

</div>

@if (Laravel\Jetstream\Jetstream::hasTermsAndPrivacyPolicyFeature())
<div class="mt-4">
<x-jet-label for="terms">
<x-label for="terms">
<div class="flex items-center">
<x-jet-checkbox name="terms" id="terms"/>
<x-checkbox name="terms" id="terms"/>

<div class="ml-2">
{!! __('I agree to the :terms_of_service and :privacy_policy', [
Expand All @@ -51,7 +51,7 @@
]) !!}
</div>
</div>
</x-jet-label>
</x-label>
</div>
@endif

Expand All @@ -60,11 +60,11 @@
{{ __('Already registered?') }}
</a>

<x-jet-button class="ml-4">
<x-button class="ml-4">
{{ __('Register') }}
</x-jet-button>
</x-button>
</div>
</form>
</x-jet-authentication-card>
</x-authentication-card>
</main>
</x-guest-layout>
Loading

0 comments on commit f7d8203

Please sign in to comment.