Display the current version in the settings sidebar. Closes #1061
This commit is contained in:
@@ -81,6 +81,12 @@ class SettingsController extends Controller
|
|||||||
'icon' => 'ion-paintbucket',
|
'icon' => 'ion-paintbucket',
|
||||||
'active' => false,
|
'active' => false,
|
||||||
],
|
],
|
||||||
|
'about' => [
|
||||||
|
'title' => CACHET_VERSION,
|
||||||
|
'url' => 'javascript: void(0);',
|
||||||
|
'icon' => 'ion-flag',
|
||||||
|
'active' => false,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
View::share([
|
View::share([
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
return Dispatcher::simpleMapping($command, 'CachetHQ\Cachet', 'CachetHQ\Cachet\Handlers');
|
return Dispatcher::simpleMapping($command, 'CachetHQ\Cachet', 'CachetHQ\Cachet\Handlers');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
define('CACHET_VERSION', trim(file_get_contents($this->app->basePath().'/VERSION')));
|
||||||
|
|
||||||
Str::macro('canonicalize', function ($url) {
|
Str::macro('canonicalize', function ($url) {
|
||||||
return preg_replace('/([^\/])$/', '$1/', $url);
|
return preg_replace('/([^\/])$/', '$1/', $url);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user