feat(ui): display current version in settings dropdown and update UI accordingly
This commit is contained in:
parent
0bfffb503e
commit
9db8b62219
2 changed files with 13 additions and 0 deletions
|
|
@ -23,6 +23,11 @@ public function getEntriesProperty()
|
|||
return app(ChangelogService::class)->getEntriesForUser($user);
|
||||
}
|
||||
|
||||
public function getCurrentVersionProperty()
|
||||
{
|
||||
return 'v'.config('constants.coolify.version');
|
||||
}
|
||||
|
||||
public function openWhatsNewModal()
|
||||
{
|
||||
$this->showWhatsNewModal = true;
|
||||
|
|
@ -62,6 +67,7 @@ public function render()
|
|||
return view('livewire.settings-dropdown', [
|
||||
'entries' => $this->entries,
|
||||
'unreadCount' => $this->unreadCount,
|
||||
'currentVersion' => $this->currentVersion,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,6 +242,9 @@ class="relative w-full h-full max-w-7xl py-6 border rounded-sm drop-shadow-sm bg
|
|||
<p class="mt-1 text-sm dark:text-neutral-400">
|
||||
Stay up to date with the latest features and improvements.
|
||||
</p>
|
||||
<p class="mt-1 text-xs dark:text-neutral-500">
|
||||
Current version: <span class="font-semibold dark:text-neutral-300">{{ $currentVersion }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
@if (isDev())
|
||||
|
|
@ -299,6 +302,10 @@ class="inline-flex items-center gap-1 hover:text-coolgray-500">
|
|||
<span x-text="entry.title"></span>
|
||||
<x-external-link />
|
||||
</a></span>
|
||||
<span x-show="entry.tag_name === '{{ $currentVersion }}'"
|
||||
class="px-2 py-1 text-xs font-semibold bg-success text-white rounded-sm">
|
||||
CURRENT VERSION
|
||||
</span>
|
||||
<span class="text-xs dark:text-neutral-400"
|
||||
x-text="new Date(entry.published_at).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })"></span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue