File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
resources/views/filament/widgets Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 11<x-filament-widgets::widget class =" fi-wi-cms-version-info" >
22 <x-filament::section >
33 <div class =" flex items-center justify-between" >
4- <div >
4+ <div class = " flex items-center gap-x-2 " >
55 <h1 class =" text-xl font-semibold text-gray-900" >InspireCMS</h1 >
6- <p class =" text-sm text-gray-500" >Version {{ inspirecms () -> version () } } </p >
6+ <p class =" text-sm text-gray-500" >{{ $this -> getVersionDisplayText () } } </p >
77 </div >
88 @if ($this -> canUpgrade () )
99 <div >
Original file line number Diff line number Diff line change @@ -47,4 +47,21 @@ public function upgradeAction(): Action
4747 ->openUrlInNewTab ()
4848 ->color ('primary ' );
4949 }
50+
51+
52+ public function getVersionDisplayText ()
53+ {
54+ $ pluginVersion = inspirecms ()->version ();
55+ if (is_string ($ pluginVersion ) && !str_contains ($ pluginVersion , 'dev ' )) {
56+ $ pluginVersion = 'v ' . $ pluginVersion ;
57+ }
58+ $ licenseTier = app (LicenseManager::class)->getLicenseTier ();
59+ if ($ licenseTier && filled ($ licenseTier )) {
60+ $ licenseTier = ucfirst ($ licenseTier );
61+ }
62+ return implode (' ' , [
63+ $ licenseTier ,
64+ $ pluginVersion ,
65+ ]);
66+ }
5067}
You can’t perform that action at this time.
0 commit comments