Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat(ui): display current version in settings dropdown and update UI accordingly

Andras Bacsai9db8b62219c0
diff --git a/app/Livewire/SettingsDropdown.php b/app/Livewire/SettingsDropdown.php
index a94e8a1d70..7afa763df7 100644
--- a/app/Livewire/SettingsDropdown.php
+++ b/app/Livewire/SettingsDropdown.php
@@ -23,6 +23,11 @@ class SettingsDropdown extends Component
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 @@ class SettingsDropdown extends Component
return view('livewire.settings-dropdown', [
'entries' => $this->entries,
'unreadCount' => $this->unreadCount,
+ 'currentVersion' => $this->currentVersion,
]);
}
}
diff --git a/resources/views/livewire/settings-dropdown.blade.php b/resources/views/livewire/settings-dropdown.blade.php
index c67e029235..37cc420ed3 100644
--- a/resources/views/livewire/settings-dropdown.blade.php
+++ b/resources/views/livewire/settings-dropdown.blade.php
@@ -242,6 +242,9 @@
<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 @@
<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>