Update center added alert message

This commit is contained in:
Cüneyt Şentürk
2023-04-25 09:46:22 +03:00
parent 3400f006af
commit 8fbee840ea
10 changed files with 163 additions and 28 deletions

View File

@ -10,6 +10,8 @@
</x-slot>
<x-slot name="content">
<x-update-alert />
<div class="my-10">
<div class="flex items-center">
<div class="relative px-4 text-sm text-center pb-2 text-purple font-medium border-purple transition-all after:absolute after:w-full after:h-0.5 after:left-0 after:right-0 after:bottom-0 after:bg-purple after:rounded-tl-md after:rounded-tr-md">
@ -31,9 +33,17 @@
<x-table.td kind="right" class="w-6/12" kind="cursor-none">
<x-slot name="first" class="flex justify-end" override="class">
<x-link href="{{ route('updates.run', ['alias' => 'core', 'version' => $core]) }}" class="px-3 py-1.5 rounded-xl text-sm font-medium leading-6 ltr:mr-2 rtl:ml-2 bg-green text-white hover:bg-green-700 disabled:bg-green-100" override="class">
{{ trans('updates.update', ['version' => $core]) }}
</x-link>
@if (! $core->errors)
<x-link href="{{ route('updates.run', ['alias' => 'core', 'version' => $core->latest]) }}" class="px-3 py-1.5 rounded-xl text-sm font-medium leading-6 ltr:mr-2 rtl:ml-2 bg-green text-white hover:bg-green-700 disabled:bg-green-100" override="class">
{{ trans('updates.update', ['version' => $core->latest]) }}
</x-link>
@else
<x-tooltip id="tooltip-core-button" placement="top" :message="$core->message">
<x-button class="px-3 py-1.5 rounded-xl text-sm font-medium leading-6 ltr:mr-2 rtl:ml-2 text-white bg-green-300 cursor-default" override="class">
{{ trans('updates.update', ['version' => $core->latest]) }}
</x-button>
</x-tooltip>
@endif
<x-button @click="onChangelog">
{{ trans('updates.changelog') }}
@ -76,7 +86,7 @@
<x-table.tbody>
@if ($modules)
@foreach($modules as $module)
@foreach ($modules as $module)
<x-table.tr>
<x-table.td class="w-3/12" kind="cursor-none">
{{ $module->name }}
@ -91,9 +101,17 @@
</x-table.td>
<x-table.td class="w-3/12" kind="right">
<x-link href="{{ route('updates.run', ['alias' => $module->alias, 'version' => $module->latest]) }}" kind="primary">
{{ trans_choice('general.updates', 1) }}
</x-link>
@if (empty($module->errors))
<x-link href="{{ route('updates.run', ['alias' => $module->alias, 'version' => $module->latest]) }}" kind="primary">
{{ trans_choice('general.updates', 1) }}
</x-link>
@else
<x-tooltip id="tooltip-modules-{{ $module->alias }}" placement="top" :message="$module->message">
<x-button class="px-3 py-1.5 rounded-xl text-sm font-medium leading-6 text-white bg-green-300 cursor-default" override="class">
{{ trans_choice('general.updates', 1) }}
</x-button>
</x-tooltip>
@endif
</x-table.td>
</x-table.tr>
@endforeach