Add all files
This commit is contained in:
45
themes/default/views/client/account/credits.blade.php
Normal file
45
themes/default/views/client/account/credits.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<div>
|
||||
<x-navigation.breadcrumb />
|
||||
<div class="px-2">
|
||||
<h4 class="text-2xl font-bold pb-3">{{ __('account.credits') }}</h4>
|
||||
@if (Auth::user()->credits->count() > 0)
|
||||
<div class="flex flex-wrap gap-4">
|
||||
@foreach (Auth::user()->credits as $credit)
|
||||
<div class="flex flex-col bg-primary-700 w-fit rounded-lg px-5 p-3 items-center gap-1">
|
||||
<h5 class="text-lg font-bold">{{ $credit->currency->code }}</h5>
|
||||
<p class="text-primary-100">{{ $credit->formattedAmount }}</p>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<p>{{ __('account.no_credit') }}</p>
|
||||
@endif
|
||||
|
||||
<h4 class="text-xl font-bold pb-3">{{ __('account.add_credit') }}</h4>
|
||||
|
||||
<form wire:submit.prevent="addCredit">
|
||||
<!-- Currency and amount -->
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<x-form.select name="currency" :label="__('account.input.currency')" wire:model="currency" required>
|
||||
@foreach(\App\Models\Currency::all() as $currency)
|
||||
<option value="{{ $currency->code }}">{{ $currency->code }}</option>
|
||||
@endforeach
|
||||
</x-form.select>
|
||||
<x-form.input x-mask:dynamic="$money($input, '.', '', 2)" name="amount" type="number"
|
||||
:label="__('account.input.amount')" :placeholder="__('account.input.amount_placeholder')"
|
||||
wire:model="amount" required />
|
||||
|
||||
<x-form.select name="gateway" :label="__('product.payment_method')" wire:model="gateway" required>
|
||||
@foreach(\App\Models\Gateway::all() as $gateway)
|
||||
<option value="{{ $gateway->id }}">{{ $gateway->name }}</option>
|
||||
@endforeach
|
||||
</x-form.select>
|
||||
</div>
|
||||
|
||||
|
||||
<x-button.primary type="submit" class="w-full mt-4">
|
||||
{{ __('account.add_credit') }}
|
||||
</x-button.primary>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
23
themes/default/views/client/account/index.blade.php
Normal file
23
themes/default/views/client/account/index.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<div>
|
||||
<x-navigation.breadcrumb />
|
||||
<div class="px-2">
|
||||
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
|
||||
<x-form.input name="first_name" type="text" :label="__('general.input.first_name')"
|
||||
:placeholder="__('general.input.first_name_placeholder')" wire:model="first_name" required dirty />
|
||||
<x-form.input name="last_name" type="text" :label="__('general.input.last_name')"
|
||||
:placeholder="__('general.input.last_name_placeholder')" wire:model="last_name" required dirty />
|
||||
|
||||
<x-form.input name="email" type="email" :label="__('general.input.email')"
|
||||
:placeholder="__('general.input.email_placeholder')" required wire:model="email" dirty />
|
||||
|
||||
<x-form.properties :custom_properties="$custom_properties" :properties="$properties" dirty />
|
||||
</div>
|
||||
|
||||
|
||||
<x-button.primary wire:click="submit" class="w-full mt-4">
|
||||
{{ __('general.update') }}
|
||||
</x-button.primary>
|
||||
</div>
|
||||
</div>
|
||||
78
themes/default/views/client/account/security.blade.php
Normal file
78
themes/default/views/client/account/security.blade.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<div>
|
||||
<x-navigation.breadcrumb />
|
||||
<div class="px-2">
|
||||
|
||||
<!-- Sessions -->
|
||||
<h5 class="text-lg font-bold pb-3 pt-4">{{ __('account.sessions') }}</h5>
|
||||
@foreach (Auth::user()->sessions->filter(fn ($session) => !$session->impersonating()) as $session)
|
||||
<div class="flex flex-row items-center justify-between py-2 border-b border-primary-700">
|
||||
<div>
|
||||
<p class="text-sm text-primary-100">{{ $session->ip_address }} -
|
||||
{{ $session->last_activity->diffForHumans() }}</p>
|
||||
<p class="text-sm text-primary-400">{{ $session->formatted_device }}</p>
|
||||
</div>
|
||||
<x-button.primary wire:click="logoutSession('{{ $session->id }}')" class="text-sm !w-fit">
|
||||
{{ __('account.logout_sessions') }}
|
||||
</x-button.primary>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
<!-- Change password -->
|
||||
<h5 class="text-lg font-bold pb-3 pt-10">{{ __('account.change_password') }}</h5>
|
||||
<form wire:submit="changePassword">
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<x-form.input divClass="col-span-2" name="current_password" type="password"
|
||||
:label="__('account.input.current_password')"
|
||||
:placeholder="__('account.input.current_password_placeholder')" wire:model="current_password"
|
||||
required />
|
||||
<x-form.input name="password" type="password" :label="__('account.input.new_password')"
|
||||
:placeholder="__('account.input.new_password_placeholder')" wire:model="password" required />
|
||||
<x-form.input name="password_confirmation" type="password" :label="__('account.input.confirm_password')"
|
||||
:placeholder="__('account.input.confirm_password_placeholder')" wire:model="password_confirmation"
|
||||
required />
|
||||
</div>
|
||||
|
||||
<x-button.primary type="submit" class="w-full mt-4">
|
||||
{{ __('account.change_password') }}
|
||||
</x-button.primary>
|
||||
</form>
|
||||
|
||||
<!-- Two factor authentication -->
|
||||
<h5 class="text-lg font-bold pb-3 pt-10">{{ __('account.two_factor_authentication') }}</h5>
|
||||
@if ($twoFactorEnabled)
|
||||
<p class="text-sm text-primary-100">{{ __('account.two_factor_authentication_enabled') }}</p>
|
||||
<x-button.primary wire:click="disableTwoFactor" class="w-full mt-4">
|
||||
{{ __('Disable two factor authentication') }}
|
||||
</x-button.primary>
|
||||
@else
|
||||
<p class="text-sm text-primary-100">{{ __('account.two_factor_authentication_description') }}</p>
|
||||
<x-button.primary wire:click="enableTwoFactor" class="w-full mt-4">
|
||||
{{ __('account.two_factor_authentication_enable') }}
|
||||
</x-button.primary>
|
||||
@if ($showEnableTwoFactor)
|
||||
<x-modal :title="__('account.two_factor_authentication_enable')" open="true">
|
||||
<p class="text-primary-100">{{ __('account.two_factor_authentication_enable_description') }}</p>
|
||||
<div class="flex flex-col items-center mt-4">
|
||||
<img src="{{ $twoFactorData['image'] }}" alt="QR code" class="w-64 h-64" />
|
||||
<p class="text-primary-400 mt-2 text-sm text-center">
|
||||
{{ __('account.two_factor_authentication_secret') }}<br />{{ $twoFactorData['secret'] }}</p>
|
||||
</div>
|
||||
<form wire:submit.prevent="enableTwoFactor">
|
||||
<x-form.input divClass="mt-8" name="two_factor_code" type="text"
|
||||
:label="__('account.input.two_factor_code')"
|
||||
:placeholder="__('account.input.two_factor_code_placeholder')" wire:model="twoFactorCode"
|
||||
required />
|
||||
<x-button.primary class="w-full mt-4" type="submit">
|
||||
{{ __('account.two_factor_authentication_enable') }}
|
||||
</x-button.primary>
|
||||
</form>
|
||||
<x-slot name="closeTrigger">
|
||||
<button @click="document.location.reload()" class="text-primary-100">
|
||||
<x-ri-close-fill class="size-6" />
|
||||
</button>
|
||||
</x-slot>
|
||||
</x-modal>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user