1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 08:51:34 +02:00

Merge pull request #3867 from beganovich/v2-3006-fixes-for-setup

Fixes for setup page
This commit is contained in:
David Bomba 2020-07-01 08:09:47 +10:00 committed by GitHub
commit b3441adc17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 14 deletions

View File

@ -35,10 +35,9 @@ class SetupController extends Controller
{ {
$check = SystemHealth::check(); $check = SystemHealth::check();
if($check['system_health'] == "true" && Schema::hasTable('accounts') && $account = Account::all()->first()) if($check['system_health'] == "true" && Schema::hasTable('accounts') && $account = Account::all()->first()) {
return redirect('/'); return redirect('/');
}
$check = SystemHealth::check();
return view('setup.index', ['check' => $check]); return view('setup.index', ['check' => $check]);
} }
@ -48,7 +47,9 @@ class SetupController extends Controller
$check = SystemHealth::check(); $check = SystemHealth::check();
if ($check['system_health'] === false) { if ($check['system_health'] === false) {
return back(); // This should never be reached. info($check);
return response('Oops, something went wrong. Check your logs.'); /** We should never reach this block, but jic. */
} }
$mail_driver = $request->input('mail_driver'); $mail_driver = $request->input('mail_driver');

View File

@ -45,15 +45,15 @@ class SystemHealth
*/ */
public static function check() : array public static function check() : array
{ {
$system_health = "true"; $system_health = true;
if (in_array(false, Arr::dot(self::extensions()))) { if (in_array(false, Arr::dot(self::extensions()))) {
$system_health = "false"; $system_health = false;
} elseif (phpversion() < self::$php_version) { } elseif (phpversion() < self::$php_version) {
$system_health = "false"; $system_health = false;
} elseif(!self::simpleDbCheck()) { } elseif(!self::simpleDbCheck()) {
info("db fails"); info("db fails");
$system_health = "false"; $system_health = false;
} }
return [ return [

2
public/css/app.css vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"/js/app.js": "/js/app.js?id=baf7fef12d5e65c3d9ff", "/js/app.js": "/js/app.js?id=baf7fef12d5e65c3d9ff",
"/css/app.css": "/css/app.css?id=369c7335c317e8ac0212", "/css/app.css": "/css/app.css?id=01b783b731585b213487",
"/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=d244486b16dc6f94a726", "/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=d244486b16dc6f94a726",
"/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=d7e708d66a9c769b4c6e", "/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=d7e708d66a9c769b4c6e",
"/js/clients/payment_methods/authorize-ach.js": "/js/clients/payment_methods/authorize-ach.js?id=9e6495d9ae236b3cb5ad", "/js/clients/payment_methods/authorize-ach.js": "/js/clients/payment_methods/authorize-ach.js?id=9e6495d9ae236b3cb5ad",

View File

@ -3224,8 +3224,12 @@ return [
'year_invalid' => 'Provided year is not valid.', 'year_invalid' => 'Provided year is not valid.',
'https_required' => 'HTTPS is required, form will fail', 'https_required' => 'HTTPS is required, form will fail',
'if_you_need_help' => 'If you need help you can either post to our', 'if_you_need_help' => 'If you need help you can post to our',
'reversed' => 'Reversed', 'reversed' => 'Reversed',
'update_password_on_confirm' => 'After updating password, your account will be confirmed.', 'update_password_on_confirm' => 'After updating password, your account will be confirmed.',
'bank_account_not_linked' => 'To pay with bank account, first you have to add it as payment method.', 'bank_account_not_linked' => 'To pay with bank account, first you have to add it as payment method.',
'application_settings_label' => 'Let\'s store basic information about your Invoice Ninja!',
'recommended_in_production' => 'Recommended in production',
'enable_only_for_development' => 'Enable only for development',
]; ];

View File

@ -1,10 +1,10 @@
<div class="bg-white shadow overflow-hidden rounded-lg mt-8"> <div class="bg-white shadow overflow-hidden rounded-lg mt-8">
<div class="px-4 py-5 border-b border-gray-200 sm:px-6"> <div class="px-4 py-5 border-b border-gray-200 sm:px-6">
<h3 class="text-lg leading-6 font-medium text-gray-900"> <h3 class="text-lg leading-6 font-medium text-gray-900">
Application settings {{ ctrans('texts.application_settings') }}
</h3> </h3>
<p class="mt-1 max-w-2xl text-sm leading-5 text-gray-500"> <p class="mt-1 max-w-2xl text-sm leading-5 text-gray-500">
Let's store basic information about your Invoice Ninja! {{ ctrans('texts.application_settings_label') }}
</p> </p>
</div> </div>
<div> <div>
@ -22,8 +22,9 @@
{{ ctrans('texts.https') }} {{ ctrans('texts.https') }}
</dt> </dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input type="checkbox" class="form-checkbox mr-1" name="https" {{ old('https') ? 'checked': '' }}> <input type="checkbox" class="form-checkbox mr-1" name="https" {{ old('https') ? 'checked': '' }} checked>
<span>{{ ctrans('texts.require') }}</span> <span>{{ ctrans('texts.require') }}</span>
<span class="text-gray-600 text-xs ml-2">({{ ctrans('texts.recommended_in_production') }})</span>
</dd> </dd>
</div> </div>
<div class="bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 sm:flex sm:items-center"> <div class="bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 sm:flex sm:items-center">
@ -33,6 +34,7 @@
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input type="checkbox" class="form-checkbox mr-1" name="debug" {{ old('debug') ? 'checked': '' }}> <input type="checkbox" class="form-checkbox mr-1" name="debug" {{ old('debug') ? 'checked': '' }}>
<span>{{ ctrans('texts.enable') }}</span> <span>{{ ctrans('texts.enable') }}</span>
<span class="text-gray-600 text-xs ml-2">({{ ctrans('texts.enable_only_for_development') }})</span>
</dd> </dd>
</div> </div>
<div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 sm:flex sm:items-center"> <div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6 sm:flex sm:items-center">

1
tailwind.config.js vendored
View File

@ -6,6 +6,7 @@ module.exports = {
'./resources/views/email/**/*.blade.php', './resources/views/email/**/*.blade.php',
'./resources/views/themes/ninja2020/**/*.blade.php', './resources/views/themes/ninja2020/**/*.blade.php',
'./resources/views/auth/**/*.blade.php', './resources/views/auth/**/*.blade.php',
'./resources/views/setup/**/*.blade.php'
], ],
theme: { theme: {
extend: { extend: {