app show page button confirmation.. ( #32w9dce )

This commit is contained in:
Cüneyt Şentürk 2022-06-24 14:40:49 +03:00
parent 57320b507b
commit eb7ab67eb8
5 changed files with 83 additions and 53 deletions

View File

@ -43,6 +43,9 @@ return [
'apps_managing' => 'Check the most trending apps and start managing your finances professionally today.',
'ready' => 'Ready',
'popular_this_week' => 'Popular this week',
'install_cloud' => 'Use on Cloud Service',
'get_cloud' => 'Get Cloud Service',
'only_works_cloud' => 'This app only works on <strong>Cloud Service</strong>.',
'about' => 'About',

View File

@ -1,45 +1,57 @@
@props(['module', 'installed', 'enable'])
@if ($installed)
@can('delete-modules-item')
<a href="{{ route('apps.app.uninstall', $module->slug) }}" class="bg-red text-white rounded-md text-sm text-center w-1/2 py-2 truncate">
{{ trans('modules.button.uninstall') }}
</a>
@endcan
@if (in_array('onprime', $module->where_to_use))
@if ($installed)
@can('delete-modules-item')
<a href="{{ route('apps.app.uninstall', $module->slug) }}" class="bg-red text-white rounded-md text-sm text-center w-1/2 py-2 truncate">
{{ trans('modules.button.uninstall') }}
</a>
@endcan
@can('update-modules-item')
@if ($enable)
<a href="{{ route('apps.app.disable', $module->slug) }}" class="bg-orange rounded-md text-white w-1/2 text-center text-sm py-2 truncate">
{{ trans('modules.button.disable') }}
</a>
@else
<a href="{{ route('apps.app.enable', $module->slug) }}" class="bg-green rounded-md text-white text-sm text-center w-1/2 py-2 truncate">
{{ trans('modules.button.enable') }}
</a>
@endif
@endcan
@else
@can('create-modules-item')
@if ($module->install)
@if (! empty($module->isPurchase) && (! empty($module->purchase_type) && $module->purchase_type == 'monthly'))
<x-tooltip message="{!! trans('modules.can_not_install', ['app' => $module->name]) !!}" placement="right">
<x-button disabled="disabled">
{{ trans('modules.install') }}
</x-button>
</x-tooltip>
@can('update-modules-item')
@if ($enable)
<a href="{{ route('apps.app.disable', $module->slug) }}" class="bg-orange rounded-md text-white w-1/2 text-center text-sm py-2 truncate">
{{ trans('modules.button.disable') }}
</a>
@else
<button type="button"
@click="onInstall('{{ $module->action_url }}', '{{ $module->slug }}', '{!! str_replace("'", "\'", $module->name) !!}', '{{ $module->version }}')"
class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
id="install-module"
>
{{ trans('modules.install') }}
</button>
<a href="{{ route('apps.app.enable', $module->slug) }}" class="bg-green rounded-md text-white text-sm text-center w-1/2 py-2 truncate">
{{ trans('modules.button.enable') }}
</a>
@endif
@else
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
{{ trans('modules.use_app') }}
</a>
@endif
@endcan
@endcan
@else
@can('create-modules-item')
@if ($module->install)
@if (! empty($module->isPurchase) && (! empty($module->purchase_type) && $module->purchase_type == 'monthly'))
<x-tooltip message="{!! trans('modules.can_not_install', ['app' => $module->name]) !!}" placement="right">
<x-button disabled="disabled">
{{ trans('modules.install') }}
</x-button>
</x-tooltip>
@else
<button type="button"
@click="onInstall('{{ $module->action_url }}', '{{ $module->slug }}', '{!! str_replace("'", "\'", $module->name) !!}', '{{ $module->version }}')"
class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
id="install-module"
>
{{ trans('modules.install') }}
</button>
@endif
@else
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
{{ trans('modules.use_app') }}
</a>
@endif
@endcan
@endif
@else
@if ($module->install)
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
{{ trans('modules.install_cloud') }}
</a>
@else
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
{{ trans('modules.get_cloud') }}
</a>
@endif
@endif

View File

@ -1,11 +1,19 @@
@props(['module'])
<div x-show="price_type == true" class="text-center text-sm mt-3 mb--2">
<span style="height: 21px;display: block;"></span>
</div>
@if (in_array('onprime', $module->where_to_use))
<div x-show="price_type == true" class="text-center text-sm mt-3 mb--2">
<span style="height: 21px;display: block;"></span>
</div>
<div x-show="price_type == false" class="text-center text-sm mt-3 mb--2">
<span style="font-size: 12px;">
<span class="text-danger">*</span> <a href="https://akaunting.com/features/why-akaunting-cloud?utm_source=app_show&utm_medium=software&utm_campaign={{ str_replace('-', '', $module->slug) }}" target="_blank">{!! trans('modules.information_monthly') !!}</a>
</span>
</div>
<div x-show="price_type == false" class="text-center text-sm mt-3 mb--2">
<span style="font-size: 12px;">
<span class="text-red">*</span> <a href="https://akaunting.com/features/why-akaunting-cloud?utm_source=app_show&utm_medium=software&utm_campaign={{ str_replace('-', '', $module->slug) }}" target="_blank">{!! trans('modules.information_monthly') !!}</a>
</span>
</div>
@else
<div class="text-center text-sm mt-3 mb--2 bg-red-100 rounded-lg p-2 cursor-default">
<span class="text-sm text-red-700">
{!! trans('modules.only_works_cloud') !!}
</span>
</div>
@endif

View File

@ -1,5 +1,3 @@
<x-form>
<div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4" x-on:click="price_type = ! price_type">
<div class="relative" x-model="price_type">
@ -20,4 +18,4 @@
</div>
</div>
</div>
</x-form>
</x-form>

View File

@ -41,7 +41,9 @@
<div class="flex justify-between">
<span>
@foreach ($module->categories as $module_category)
<a href="{{ route('apps.categories.show', $module_category->slug) }}">{{ $module_category->name }}</a> </br>
<a href="{{ route('apps.categories.show', $module_category->slug) }}" class="text-sm">
{{ $module_category->name }}
</a>
@endforeach
</span>
</div>
@ -63,6 +65,7 @@
<i class="material-icons text-sm">star_border</i>
@endfor
</div>
<p class="text-xs">
@if ($module->total_review)
( {{ $module->total_review }} {{ trans('modules.tab.reviews') }} )
@ -73,10 +76,16 @@
<div class="flex flex-col gap-1">
<div class="flex gap-4 items-baseline">
<h3 class="text-4xl font-semibold text-black">{{ $module->name }}</h3>
<h3 class="text-4xl font-semibold text-black">
{{ $module->name }}
</h3>
@if ($module->vendor_name)
<span class="text-sm"> by <a class="border-b border-dashed border-black transition-all hover:font-semibold" href="{{ route('apps.vendors.show', $module->vendor->slug) }}">{{ $module->vendor_name }}</a></span>
<span class="text-sm">
by <a class="border-b border-dashed border-black transition-all hover:font-semibold" href="{{ route('apps.vendors.show', $module->vendor->slug) }}">
{{ $module->vendor_name }}
</a>
</span>
@endif
</div>