mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-01-29 10:59:49 +01:00
Remove version from config and load it from the package.json on the system settings page
This commit is contained in:
parent
edbaf0292c
commit
4857164214
@ -8,6 +8,7 @@ use App\Models\Setting;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\View\View;
|
||||
|
||||
@ -20,7 +21,12 @@ class SystemSettingsController extends Controller
|
||||
*/
|
||||
public function getSystemSettings(): View
|
||||
{
|
||||
return view('actions.settings.system');
|
||||
$packageInfo = json_decode(File::get(base_path('package.json')));
|
||||
$linkaceVersion = $packageInfo->version;
|
||||
|
||||
return view('actions.settings.system', [
|
||||
'linkaceVersion' => $linkaceVersion,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
return [
|
||||
'version' => 'v0.0.38',
|
||||
|
||||
'default' => [
|
||||
'pagination' => 25,
|
||||
'date_format' => 'Y-m-d',
|
||||
|
@ -57,6 +57,7 @@ COPY ./artisan /app
|
||||
COPY ./composer.json /app
|
||||
COPY ./composer.lock /app
|
||||
COPY ./README.md /app
|
||||
COPY ./package.json ./app
|
||||
COPY ./server.php /app
|
||||
COPY ./.env.example /app/.env
|
||||
|
||||
|
@ -48,5 +48,5 @@ return [
|
||||
'demo_login_hint' => 'You can login right away. Please notice that this demo will be reset every 2 hours.',
|
||||
|
||||
'project_of' => 'Linkace is a project by',
|
||||
'version' => 'Version: :version',
|
||||
'version' => 'Current version: :version',
|
||||
];
|
||||
|
@ -4,6 +4,8 @@
|
||||
</div>
|
||||
<div class="update-check card-body small">
|
||||
|
||||
<p>@lang('linkace.version', ['version' => $linkaceVersion])</p>
|
||||
|
||||
<div class="update-check-running">@lang('settings.update_check_running')</div>
|
||||
<div class="update-check-version-found text-success d-none">@lang('settings.update_check_version_found')</div>
|
||||
<div class="update-check-success d-none">@lang('settings.update_check_success')</div>
|
||||
|
@ -1,4 +1,3 @@
|
||||
<aside class="footer container text-center small pt-3 pb-5">
|
||||
@lang('linkace.project_of') <a href="https://www.kovah.de/?utm_source=linkace" rel="noopener" target="_blank">Kovah.de</a>
|
||||
- @lang('linkace.version', ['version' => config('linkace.version')])
|
||||
</aside>
|
||||
|
Loading…
x
Reference in New Issue
Block a user