diff --git a/.env b/.env index cf39d36..89b0d7a 100644 --- a/.env +++ b/.env @@ -2,9 +2,11 @@ #=REGISTER_AUTH either auth or verified. If auth is selected, no verification is required. Default is verified. REGISTER_AUTH=verified -#Internal notifications=Notify if update is available or and event is happening such as a poll about the future of this project. +#Internal notifications=Changes if certain messages should be displayed or not +#=NOTIFY_EVENTS notifies admins if an important event is happening, such as polls about the future of this project or security vulnerabilities. NOTIFY_EVENTS=true -NOTIFY_UPDATES=true +#=NOTIFY_UPDATES either all, major or false. All notifies about all updates, major only notifies about major or important updates, false does not notify about any updates. +NOTIFY_UPDATES=major DISPLAY_FOOTER=true DISPLAY_CREDIT=true diff --git a/resources/views/layouts/sidebar.blade.php b/resources/views/layouts/sidebar.blade.php index 13a7a39..11baa64 100755 --- a/resources/views/layouts/sidebar.blade.php +++ b/resources/views/layouts/sidebar.blade.php @@ -154,8 +154,27 @@
- @if(env('NOTIFY_UPDATES') === true) - + @if(file_exists(base_path("version.json"))) + + tag_name; + + // Requests current version from the local version file and sets it as variable + $Vlocal = 'v' . file_get_contents(base_path("version.json")); + ?> + + + @if(auth()->user()->role == 'admin' and $Vgit > $Vlocal) + An update is available + @endif + @endif + @elseif(env('NOTIFY_UPDATES') == 'major') +