first commit

This commit is contained in:
benjibennn
2023-12-22 12:35:55 +08:00
commit 9f89a732d6
872 changed files with 156291 additions and 0 deletions

View File

@@ -0,0 +1,212 @@
<div class="flex flex-col px-10 py-8">
<form action="{{ route('wave.settings.api.post') }}" method="POST">
<div>
<label for="key_name" class="block text-sm font-medium leading-5 text-gray-700">Create a new API Key</label>
<div class="mt-1 rounded-md shadow-sm">
<input id="key_name" type="text" name="key_name" placeholder="Key Name" class="w-full form-input">
</div>
</div>
<div class="flex justify-end w-full mt-2">
<button class="flex self-end justify-center w-auto px-4 py-2 mt-5 text-sm font-medium text-white transition duration-150 ease-in-out border border-transparent rounded-md bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave active:bg-wave-700" dusk="update-profile-button">Create New Key</button>
</div>
{{ csrf_field() }}
</form>
<hr class="my-12 border-gray-200">
@if(count(auth()->user()->apiKeys) > 0)
<p class="block text-sm font-medium leading-5 text-gray-700">Current API Keys</p>
<div class="mt-2 overflow-hidden border border-gray-150 sm:rounded">
<table class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-gray-500 uppercase bg-gray-100">
Name
</th>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-gray-500 uppercase bg-gray-100">
Created
</th>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-gray-500 uppercase bg-gray-100">
Last Used
</th>
<th class="px-6 py-3 bg-gray-100"></th>
</tr>
</thead>
<tbody>
@foreach(auth()->user()->apiKeys as $apiKey)
<!-- Odd row -->
<tr class="@if($loop->index%2 == 0){{ 'bg-white' }}@else{{ 'bg-gray-50' }}@endif">
<td class="px-6 py-4 text-sm font-medium leading-5 text-gray-900 whitespace-no-wrap">
{{ $apiKey->name }}
</td>
<td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap">
{{ $apiKey->created_at->format('F j, Y') }}
</td>
<td class="px-6 py-4 text-sm leading-5 text-gray-500 whitespace-no-wrap">
@if(is_null($apiKey->last_used_at)){{ 'Never Used' }}@else{{ $apiKey->last_used_at->format('F j, Y') }}@endif
</td>
<td class="px-6 py-4 text-sm font-medium leading-5 text-right whitespace-no-wrap">
<button x-data onclick="actionClicked('view', '{{ $apiKey->id }}', '{{ $apiKey->name }}', '{{ $apiKey->key }}')" class="mr-2 text-indigo-600 hover:underline focus:outline-none">
View
</button>
<button onclick="actionClicked('edit', '{{ $apiKey->id }}', '{{ $apiKey->name }}', '{{ $apiKey->key }}');" class="mr-2 text-indigo-600 hover:underline focus:outline-none">
Edit
</button>
<button onclick="actionClicked('delete', '{{ $apiKey->id }}', '{{ $apiKey->name }}', '{{ $apiKey->key }}');" class="text-indigo-600 hover:underline focus:outline-none">
Delete
</button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- Javascript to call each modal -->
<script>
window.actionClicked = function(action, id, name, key){
Alpine.store(action + 'ApiKey').actionClicked(id, name, key);
}
</script>
<!-- End JS for opening api action modal -->
<!-- BELOW ARE THE MODALS TO VIEW, EDIT, AND DELETE AN API KEY -->
<!-- View API KEY -->
<div x-data="{ open: false, id: '', key: '', name: '' }" x-init="
$watch('$store.viewApiKey.open', value => {
if (value === true) { document.body.classList.add('overflow-hidden') }
else { document.body.classList.remove('overflow-hidden') }
});" id="viewApiKey" x-show="$store.viewApiKey.open" class="fixed inset-0 z-50 overflow-y-auto" x-cloak>
<div class="flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
<div x-show="$store.viewApiKey.open" x-on:click="$store.viewApiKey.open = false" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="fixed inset-0 transition-opacity">
<div class="absolute inset-0 bg-black opacity-50"></div>
</div>
<!-- This element is to trick the browser into centering the modal contents. -->
<span class="hidden sm:inline-block sm:align-middle sm:h-screen"></span>&#8203;
<div x-show="$store.viewApiKey.open" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100" x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" class="inline-block px-4 pt-5 pb-4 overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6" role="dialog" aria-modal="true" aria-labelledby="modal-headline">
<div class="flex items-center justify-start mb-4">
<h3 class="text-lg font-medium leading-6 text-gray-700">
API Key (<span x-text="$store.viewApiKey.name"></span>)
</h3>
</div>
<div class="flex flex-col justify-between w-full mt-2">
<input type="text" readonly="readonly" onfocus="this.select();" class="px-2 py-1 my-2 font-mono text-gray-700 bg-gray-100 rounded form-input" :value="$store.viewApiKey.key" id="viewKeyValue">
<p class="text-sm text-gray-500">This API Key can be used to gain an <code>access_token</code>, which can then be used to interact with the API.</p>
</div>
<div class="mt-5 sm:mt-6">
<span class="flex justify-end w-full rounded-md">
<button x-on:click="$store.viewApiKey.open = false" type="button" class="inline-flex justify-center px-4 py-2 text-base font-medium leading-6 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:shadow-outline sm:text-sm sm:leading-5">
Close
</button>
</span>
</div>
</div>
</div>
</div>
<!-- END View API Key -->
<!-- Edit API KEY -->
<div x-data="{ open: false, id: '', key: '', name: '' }" x-init="
$watch('$store.editApiKey.open', value => {
if (value === true) { document.body.classList.add('overflow-hidden') }
else { document.body.classList.remove('overflow-hidden') }
});" id="editApiKey" x-show="$store.editApiKey.open" class="fixed inset-0 z-50 overflow-y-auto" x-cloak>
<div class="flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
<div x-show="$store.editApiKey.open" x-on:click="$store.editApiKey.open = false" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="fixed inset-0 transition-opacity">
<div class="absolute inset-0 bg-black opacity-50"></div>
</div>
<!-- This element is to trick the browser into centering the modal contents. -->
<span class="hidden sm:inline-block sm:align-middle sm:h-screen"></span>&#8203;
<div x-show="$store.editApiKey.open" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100" x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" class="inline-block px-4 pt-5 pb-4 overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6" role="dialog" aria-modal="true" aria-labelledby="modal-headline">
<div class="flex items-center justify-start mb-4">
<h3 class="text-lg font-medium leading-6 text-gray-700">
API Key Name (<span x-text="$store.editApiKey.open"></span>)
</h3>
</div>
<div class="flex flex-col justify-between w-full mt-2">
<form action="{{ route('wave.settings.api.put') }}" method="POST">
<div>
<label for="key_name" class="block text-sm font-medium leading-5 text-gray-700">Change the name of this API Key</label>
<div class="mt-1 rounded-md shadow-sm">
<input id="key_name" type="text" name="key_name" placeholder="Key Name" :value="$store.editApiKey.name" class="w-full form-input">
</div>
</div>
<input type="hidden" name="_method" value="PUT">
<input type="hidden" name="id" :value="$store.editApiKey.id">
<p class="flex justify-end mt-5">
<button x-on:click="$store.editApiKey.open = false" type="button" class="inline-flex justify-center px-4 py-2 mr-3 text-base font-medium leading-6 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:shadow-outline sm:text-sm sm:leading-5">Cancel</button>
<button type="submit" class="inline-flex justify-center px-4 py-2 text-base font-medium leading-6 text-white transition duration-150 ease-in-out border border-transparent rounded-md shadow-sm bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave sm:text-sm sm:leading-5">Update</button>
</p>
{{ csrf_field() }}
</form>
</div>
</div>
</div>
</div>
<!-- END Edit API Key -->
<!-- Delete API KEY -->
<div x-data="{ open: false, id: '', key: '', name: '' }" x-init="
$watch('$store.deleteApiKey.open', value => {
if (value === true) { document.body.classList.add('overflow-hidden') }
else { document.body.classList.remove('overflow-hidden') }
});" id="deleteApiKey" x-show="$store.deleteApiKey.open" class="fixed inset-0 z-50 overflow-y-auto" x-cloak>
<div class="flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
<div x-show="$store.deleteApiKey.open" x-on:click="$store.deleteApiKey.open = false" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="fixed inset-0 transition-opacity">
<div class="absolute inset-0 bg-black opacity-50"></div>
</div>
<!-- This element is to trick the browser into centering the modal contents. -->
<span class="hidden sm:inline-block sm:align-middle sm:h-screen"></span>&#8203;
<div x-show="$store.deleteApiKey.open" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100" x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" class="inline-block px-4 pt-5 pb-4 overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6" role="dialog" aria-modal="true" aria-labelledby="modal-headline">
<div class="flex flex-col justify-between w-full mt-2">
<div class="sm:flex sm:items-start">
<div class="flex items-center justify-center flex-shrink-0 w-12 h-12 mx-auto bg-red-100 rounded-full sm:mx-0 sm:h-10 sm:w-10">
<svg class="w-6 h-6 text-red-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
</svg>
</div>
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-headline">
Delete this API Key?
</h3>
<div class="mt-2">
<p class="text-sm leading-5 text-gray-500">Are you sure you want to delete API Key: <code class="px-2 py-1 text-gray-800 bg-gray-200 rounded"><span x-text="$store.deleteApiKey.name"></span></code></p>
</div>
</div>
</div>
<div class="mt-5 sm:mt-6 sm:flex sm:flex-row-reverse">
<span class="flex w-full rounded-md shadow-sm sm:ml-3 sm:w-auto">
<form action="{{ route('wave.settings.api.delete') }}" method="POST">
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="id" :value="$store.deleteApiKey.id">
<button type="submit" class="inline-flex justify-center w-full px-4 py-2 text-base font-medium leading-6 text-white transition duration-150 ease-in-out bg-red-600 border border-transparent rounded-md shadow-sm hover:bg-red-500 focus:outline-none focus:border-red-700 focus:shadow-outline-red sm:text-sm sm:leading-5">
Delete
</button>
@csrf()
</form>
</span>
<span class="flex w-full mt-3 rounded-md shadow-sm sm:mt-0 sm:w-auto">
<button @click="$store.deleteApiKey.open = false;" type="button" class="inline-flex justify-center w-full px-4 py-2 text-base font-medium leading-6 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue sm:text-sm sm:leading-5">
Cancel
</button>
</span>
</div>
</div>
</div>
</div>
</div>
<!-- END Delete API Key -->
@else
<p class="w-full text-sm text-center text-gray-600">No API Keys Created Yet.</p>
@endif
</div>

View File

@@ -0,0 +1,56 @@
<div class="p-8">
@subscriber
@php
$subscription = new \Wave\Http\Controllers\SubscriptionController;
$invoices = $subscription->invoices( auth()->user() );
@endphp
@if(isset($invoices->success) && $invoices->success == true)
<table class="min-w-full overflow-hidden divide-y divide-gray-200 rounded-lg">
<thead>
<tr>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-left text-gray-500 uppercase bg-gray-100">
Date of Invoice
</th>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-right text-gray-500 uppercase bg-gray-100">
Price
</th>
<th class="px-6 py-3 text-xs font-medium leading-4 tracking-wider text-right text-gray-500 uppercase bg-gray-100">
Receipt Link
</th>
</tr>
</thead>
<tbody>
@foreach($invoices->response as $invoice)
<tr class="@if($loop->index%2 == 0){{ 'bg-gray-50' }}@else{{ 'bg-gray-100' }}@endif">
<td class="px-6 py-4 text-sm font-medium leading-5 text-gray-900 whitespace-no-wrap">
{{ Carbon\Carbon::parse($invoice->payout_date)->toFormattedDateString() }}
</td>
<td class="px-6 py-4 text-sm font-medium leading-5 text-right text-gray-900 whitespace-no-wrap">
${{ $invoice->amount }}
</td>
<td class="px-6 py-4 text-sm font-medium leading-5 text-right whitespace-no-wrap">
<a href="{{ $invoice->receipt_url }}" target="_blank" class="mr-2 text-indigo-600 hover:underline focus:outline-none">
Download
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@else
<p>Sorry, there seems to be an issue retrieving your invoices or you may not have any invoices yet.</p>
@endif
@notsubscriber
<p class="text-gray-600">When you subscribe to a plan, this is where you will be able to download your invoices.</p>
<a href="{{ route('wave.settings', 'plans') }}" class="inline-flex self-start justify-center w-auto px-4 py-2 mt-5 text-sm font-medium text-white transition duration-150 ease-in-out border border-transparent rounded-md bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave active:bg-wave-700">View Plans</a>
@endsubscriber
</div>

View File

@@ -0,0 +1,23 @@
@php $plans = Wave\Plan::all() @endphp
<div class="flex flex-col">
@if( auth()->user()->onTrial() )
<p class="px-6 py-3 text-sm text-red-500 bg-red-100">You are currently on a trial subscription. Select a plan below to upgrade.</p>
@elseif(auth()->user()->subscribed('main'))
<h5 class="px-6 py-5 text-sm font-bold text-gray-500 bg-gray-100 border-t border-b border-gray-150">Switch Plans</h5>
@else
<h5 class="px-6 py-5 text-sm font-bold text-gray-500 bg-gray-100 border-t border-b border-gray-150">Select a Plan</h5>
@endif
<form id="@if(auth()->user()->subscribed('main')){{ 'update-plan-form' }}@else{{ 'payment-form' }}@endif" role="form" method="POST" action="@if(auth()->user()->subscribed('main')){{ route('wave.update_plan') }}@else{{ route('wave.subscribe') }}@endif">
@include('theme::partials.plans-minimal')
{{ csrf_field() }}
</form>
@include('theme::partials.switch-plans-modal')
</div>

View File

@@ -0,0 +1,87 @@
<form action="{{ route('wave.settings.profile.put') }}" method="POST" enctype="multipart/form-data">
<div class="relative flex flex-col px-10 py-8 lg:flex-row">
<div class="flex justify-start w-full mb-8 lg:w-3/12 xl:w-1/5 lg:m-b0">
<div class="relative w-32 h-32 cursor-pointer group">
<img id="preview" src="{{ Voyager::image(auth()->user()->avatar) . '?' . time() }}" class="w-32 h-32 rounded-full ">
<div class="absolute inset-0 w-full h-full">
<input type="file" id="upload" class="absolute inset-0 z-20 w-full h-full opacity-0 cursor-pointer group">
<input type="hidden" id="uploadBase64" name="avatar">
<button class="absolute bottom-0 z-10 flex items-center justify-center w-10 h-10 mb-2 -ml-5 bg-black bg-opacity-75 rounded-full opacity-75 group-hover:opacity-100 left-1/2">
<svg class="w-6 h-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>
</button>
</div>
</div>
</div>
<div class="w-full lg:w-9/12 xl:w-4/5">
<div>
<label for="name" class="block text-sm font-medium leading-5 text-gray-700">Name</label>
<div class="mt-1 rounded-md shadow-sm">
<input id="name" type="text" name="name" placeholder="Name" value="{{ Auth::user()->name }}" required class="w-full form-input">
</div>
</div>
<div class="mt-5">
<label for="email" class="block text-sm font-medium leading-5 text-gray-700">Email Address</label>
<div class="mt-1 rounded-md shadow-sm">
<input id="email" type="text" name="email" placeholder="Email Address" value="{{ Auth::user()->email }}" required class="w-full form-input">
</div>
</div>
<div class="mt-5">
<label for="about" class="block text-sm font-medium leading-5 text-gray-700">About</label>
<div class="mt-1 rounded-md">
{!! profile_field('text_area', 'about') !!}
</div>
</div>
<div class="flex justify-end w-full">
<button class="flex self-end justify-center w-auto px-4 py-2 mt-5 text-sm font-medium text-white transition duration-150 ease-in-out border border-transparent rounded-md bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave active:bg-wave-700" dusk="update-profile-button">Save</button>
</div>
</div>
</div>
{{ csrf_field() }}
</form>
<div id="uploadModal" x-data x-init="$watch('$store.uploadModal.open', value => {
if (value === true) { document.body.classList.add('overflow-hidden') }
else { document.body.classList.remove('overflow-hidden'); clearInputField(); }
});" x-show="$store.uploadModal.open" class="fixed inset-0 z-10 z-30 overflow-y-auto">
<div class="flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
<div x-show="$store.uploadModal.open" @click="$store.uploadModal.open = false;" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="fixed inset-0 transition-opacity" x-cloak>
<div class="absolute inset-0 bg-black opacity-50"></div>
</div>
<!-- This element is to trick the browser into centering the modal contents. -->
<span class="hidden sm:inline-block sm:align-middle sm:h-screen"></span>&#8203;
<div x-show="$store.uploadModal.open" x-transition:enter="ease-out duration-300" x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100" x-transition:leave="ease-in duration-200" x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100" x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" class="inline-block px-4 pt-5 pb-4 overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-sm sm:w-full sm:p-6" role="dialog" aria-modal="true" aria-labelledby="modal-headline" x-cloak>
<div>
<div class="mt-3 text-center sm:mt-5">
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-headline">
Position and resize your photo
</h3>
<div class="mt-2">
<div id="upload-crop-container" class="relative flex items-center justify-center h-56 mt-5">
<div id="uploadLoading" class="flex items-center justify-center w-full h-full">
<svg class="w-5 h-5 mr-3 -ml-1 text-gray-400 animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
</div>
<div id="upload-crop"></div>
</div>
</div>
</div>
</div>
<div class="mt-5 sm:mt-6">
<span class="flex w-full rounded-md shadow-sm">
<button @click="$store.uploadModal.open = false;" class="inline-flex justify-center w-full px-4 py-2 mr-2 text-base font-medium leading-6 text-gray-700 transition duration-150 ease-in-out bg-white border border-transparent border-gray-300 rounded-md shadow-sm hover:text-gray-500 active:text-gray-800 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue sm:text-sm sm:leading-5" type="button">Cancel</button>
<button @click="$store.uploadModal.open = false; window.applyImageCrop()" class="inline-flex justify-center w-full px-4 py-2 ml-2 text-base font-medium leading-6 text-white transition duration-150 ease-in-out border border-transparent rounded-md shadow-sm bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave sm:text-sm sm:leading-5" id="apply-crop" type="button">Apply</button>
</span>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,32 @@
<form action="{{ route('wave.settings.security.put') }}" method="POST" enctype="multipart/form-data">
<div class="relative flex flex-col px-10 py-8">
<div>
<label for="current_password" class="block text-sm font-medium leading-5 text-gray-700">Current Password</label>
<div class="mt-1 rounded-md shadow-sm">
<input id="current_password" type="password" name="current_password" placeholder="Current Password" class="w-full form-input">
</div>
</div>
<div class="mt-5">
<label for="password" class="block text-sm font-medium leading-5 text-gray-700">New Password</label>
<div class="mt-1 rounded-md shadow-sm">
<input id="password" type="password" name="password" placeholder="New Password" class="w-full form-input">
</div>
</div>
<div class="mt-5">
<label for="password_confirmation" class="block text-sm font-medium leading-5 text-gray-700">Confirm New Password</label>
<div class="mt-1 rounded-md shadow-sm">
<input id="password_confirmation" type="password" name="password_confirmation" placeholder="Confirm New Password" class="w-full form-input">
</div>
</div>
<input type="hidden" name="_method" value="PUT">
{{ csrf_field() }}
<div class="flex justify-end w-full mt-2">
<button class="flex self-end justify-center w-auto px-4 py-2 mt-5 text-sm font-medium text-white transition duration-150 ease-in-out border border-transparent rounded-md bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave active:bg-wave-700" dusk="update-profile-button">Update</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,32 @@
<div class="p-8">
@if(auth()->user()->hasRole('admin'))
<p>This user is an admin user and therefore does not need a subscription</p>
@else
@if(auth()->user()->subscriber())
<div class="flex flex-col">
<h5 class="mb-2 text-xl font-bold text-gray-700">Modify Payment Information</h5>
<p>Click the button below to update your default payment method</p>
<button data-url="{{ auth()->user()->subscription->update_url }}" class="inline-flex self-start justify-center w-auto px-4 py-2 mt-5 text-sm font-medium text-white transition duration-150 ease-in-out border border-transparent rounded-md checkout-update bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave active:bg-wave-700">Update Payment Info</button>
</div>
<hr class="my-8 border-gray-200">
<div class="flex flex-col">
<h5 class="mb-2 text-xl font-bold text-gray-700">Danger Zone</h5>
<p class="text-red-400">Click the button below to cancel your subscription.</p>
<p class="text-xs">Note: Your account will be immediately downgraded.</p>
<button onclick="cancelClicked()" class="inline-flex self-start justify-center w-auto px-4 py-2 mt-5 text-sm font-medium text-white transition duration-150 ease-in-out bg-red-500 border border-transparent rounded-md hover:bg-red-600 focus:outline-none focus:border-red-600 focus:shadow-outline-red-500 active:bg-red-600">Cancel Subscription</button>
</div>
@include('theme::partials.cancel-modal')
@else
<p class="text-gray-600">Please <a href="{{ route('wave.settings', 'plans') }}">Subscribe to a Plan</a> in order to see your subscription information.</p>
<a href="{{ route('wave.settings', 'plans') }}" class="inline-flex self-start justify-center w-auto px-4 py-2 mt-5 text-sm font-medium text-white transition duration-150 ease-in-out border border-transparent rounded-md bg-wave-600 hover:bg-wave-500 focus:outline-none focus:border-wave-700 focus:shadow-outline-wave active:bg-wave-700">View Plans</a>
@endif
@endif
</div>
<script>
window.cancelClicked = function(){
Alpine.store('confirmCancel').openModal();
}
</script>