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() public function render()
{ {
return view('components.link'); return view('components.link.index');
} }
protected function getOverride($override) protected function getOverride($override)

View File

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

2
public/css/app.css vendored
View File

@ -35773,7 +35773,7 @@ html[dir='rtl'] .el-input__suffix {
text-overflow: unset; text-overflow: unset;
} }
.disabled-link{ .disabled-link {
pointer-events: none; pointer-events: none;
cursor: default; cursor: default;
opacity: 0.5; opacity: 0.5;

View File

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

View File

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

View File

@ -8,4 +8,4 @@
<span data-link-text class="opacity-1"> <span data-link-text class="opacity-1">
{!! $slot !!} {!! $slot !!}
</span> </span>
</div> </div>