app show page button typo

This commit is contained in:
Cüneyt Şentürk 2022-06-28 10:36:26 +03:00
parent 978a8b2bcc
commit 1c50437a16
6 changed files with 57 additions and 33 deletions

View File

@ -34,7 +34,7 @@ class Link extends Component
*/
public function render()
{
return view('components.link');
return view('components.link.index');
}
protected function getOverride($override)

View File

@ -298,6 +298,7 @@ document.querySelectorAll('[data-link-loading]').forEach((href) => {
target_link_html.addEventListener('click', function () {
this.classList.add('disabled-link');
this.querySelector('[data-link-spin]').classList.remove('hidden');
this.querySelector('[data-link-text]').classList.add('opacity-0');
this.querySelector('[data-link-text]').classList.remove('opacity-1');

View File

@ -1,34 +1,49 @@
@props(['module', 'installed', 'enable'])
@if (! empty($module->plan))
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
<x-link.loading>
<x-link
href="{{ $module->action_url }}"
target="_blank"
class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
override="class"
>
{{ trans('modules.get_premium_cloud') }}
</x-link.loading>
</a>
</x-link>
@elseif (in_array('onprime', $module->where_to_use))
@if ($installed)
@can('delete-modules-item')
<a href="{{ route('apps.app.uninstall', $module->slug) }}" class="relative bg-red text-white rounded-md text-sm text-center w-1/2 py-2 truncate">
<x-link
href="{{ route('apps.app.uninstall', $module->slug) }}"
class="relative bg-red rounded-md text-white text-sm text-center w-1/2 py-2 truncate"
override="class"
>
<x-link.loading>
{{ trans('modules.button.uninstall') }}
</x-link.loading>
</a>
</x-link>
@endcan
@can('update-modules-item')
@if ($enable)
<a href="{{ route('apps.app.disable', $module->slug) }}" class="relative bg-orange rounded-md text-white w-1/2 text-center text-sm py-2 truncate">
<x-link
href="{{ route('apps.app.disable', $module->slug) }}"
class="bg-orange rounded-md text-white text-sm text-center w-1/2 py-2 truncate"
override="class"
>
<x-link.loading>
{{ trans('modules.button.disable') }}
</x-link.loading>
</a>
</x-link>
@else
<a href="{{ route('apps.app.enable', $module->slug) }}" class="relative bg-green rounded-md text-white text-sm text-center w-1/2 py-2 truncate">
<x-link
href="{{ route('apps.app.enable', $module->slug) }}"
class="relative bg-green rounded-md text-white text-sm text-center w-1/2 py-2 truncate"
override="class"
>
<x-link.loading>
{{ trans('modules.button.enable') }}
</x-link.loading>
</a>
</x-link>
@endif
@endcan
@else
@ -53,26 +68,35 @@
</button>
@endif
@else
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
<x-link.loading>
<x-link
href="{{ $module->action_url }}"
target="_blank"
class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
override="class"
>
{{ trans('modules.use_app') }}
</x-link.loading>
</a>
</x-link>
@endif
@endcan
@endif
@else
@if ($module->install)
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
<x-link.loading>
<x-link
href="{{ $module->action_url }}"
target="_blank"
class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
override="class"
>
{{ trans('modules.install_cloud') }}
</x-link.loading>
</a>
</x-link>
@else
<a href="{{ $module->action_url }}" class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
<x-link.loading>
<x-link
href="{{ $module->action_url }}"
target="_blank"
class="relative bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
override="class"
>
{{ trans('modules.get_cloud') }}
</x-link.loading>
</a>
</x-link>
@endif
@endif

View File

@ -1,4 +1,3 @@
<a class="{{ $class }}" {{ $attributes }}>
{{ $slot }}
</a>