安装引导

This commit is contained in:
pushuo 2022-08-26 14:45:17 +08:00
parent 054359af34
commit 0e7f144f63
12 changed files with 246 additions and 539 deletions

View File

@ -48,7 +48,7 @@ class EnvironmentController extends Controller
{
$rules = config('installer.environment.form.rules');
$messages = [
'environment_custom.required_if' => trans('installer::installer_messages.environment.wizard.form.name_required'),
'environment_custom.required_if' => trans('installer::installer_messages.environment.name_required'),
];
$validator = Validator::make($request->all(), $rules, $messages);
@ -59,7 +59,7 @@ class EnvironmentController extends Controller
if (! $this->checkDatabaseConnection($request)) {
return $redirect->route('installer.environment')->withInput()->withErrors([
'database_connection' => trans('installer::installer_messages.environment.wizard.form.db_connection_failed'),
'database_connection' => trans('installer::installer_messages.environment.db_connection_failed'),
]);
}

View File

@ -32,6 +32,7 @@ class WelcomeController extends Controller
$data['languages'] = $this->languages;
$data['locale'] = session('locale');
$data['steps'] = 1;
return view('installer::welcome', $data);
}

View File

@ -11,6 +11,8 @@ return [
'next' => 'Next Step',
'back' => 'Previous',
'finish' => 'Install',
'environment' => 'Environmen',
'status' => 'Status',
'forms' => [
'errorTitle' => 'The Following errors occurred:',
],
@ -34,6 +36,7 @@ return [
*/
'requirements' => [
'templateTitle' => 'Step 1 | Server Requirements',
'environment' => 'Environmen',
'title' => 'Server Requirements',
'next' => 'Check Permissions',
],
@ -44,9 +47,10 @@ return [
*
*/
'permissions' => [
'templateTitle' => 'Step 2 | Permissions',
'title' => 'Permissions',
'title' => 'Directory permission detection',
'next' => 'Configure Environment',
'table' => 'Table of contents',
'ask_permission' => '要求权限',
],
/*
@ -55,120 +59,40 @@ return [
*
*/
'environment' => [
'menu' => [
'templateTitle' => 'Step 3 | Environment Settings',
'title' => 'Environment Settings',
'desc' => 'Please select how you want to configure the apps <code>.env</code> file.',
'wizard-button' => 'Form Wizard Setup',
'classic-button' => 'Classic Text Editor',
],
'wizard' => [
'templateTitle' => 'Step 3 | Environment Settings | Guided Wizard',
'title' => 'Guided <code>.env</code> Wizard',
'tabs' => [
'environment' => 'Environment',
'database' => 'Database',
'application' => 'Application',
],
'form' => [
'name_required' => 'An environment name is required.',
'app_name_label' => 'App Name',
'app_name_placeholder' => 'App Name',
'app_environment_label' => 'App Environment',
'app_environment_label_local' => 'Local',
'app_environment_label_developement' => 'Development',
'app_environment_label_qa' => 'Qa',
'app_environment_label_production' => 'Production',
'app_environment_label_other' => 'Other',
'app_environment_placeholder_other' => 'Enter your environment...',
'app_debug_label' => 'App Debug',
'app_debug_label_true' => 'True',
'app_debug_label_false' => 'False',
'app_log_level_label' => 'App Log Level',
'app_log_level_label_debug' => 'debug',
'app_log_level_label_info' => 'info',
'app_log_level_label_notice' => 'notice',
'app_log_level_label_warning' => 'warning',
'app_log_level_label_error' => 'error',
'app_log_level_label_critical' => 'critical',
'app_log_level_label_alert' => 'alert',
'app_log_level_label_emergency' => 'emergency',
'app_url_label' => 'App Url',
'app_url_placeholder' => 'App Url',
'db_connection_failed' => 'Could not connect to the database.',
'db_connection_label' => 'Database Connection',
'db_connection_label_mysql' => 'mysql',
'db_connection_label_sqlite' => 'sqlite',
'db_connection_label_pgsql' => 'pgsql',
'db_connection_label_sqlsrv' => 'sqlsrv',
'db_host_label' => 'Database Host',
'db_host_placeholder' => 'Database Host',
'db_port_label' => 'Database Port',
'db_port_placeholder' => 'Database Port',
'db_name_label' => 'Database Name',
'db_name_placeholder' => 'Database Name',
'db_username_label' => 'Database User Name',
'db_username_placeholder' => 'Database User Name',
'db_password_label' => 'Database Password',
'db_password_placeholder' => 'Database Password',
'app_tabs' => [
'more_info' => 'More Info',
'broadcasting_title' => 'Broadcasting, Caching, Session, &amp; Queue',
'broadcasting_label' => 'Broadcast Driver',
'broadcasting_placeholder' => 'Broadcast Driver',
'cache_label' => 'Cache Driver',
'cache_placeholder' => 'Cache Driver',
'session_label' => 'Session Driver',
'session_placeholder' => 'Session Driver',
'queue_label' => 'Queue Driver',
'queue_placeholder' => 'Queue Driver',
'redis_label' => 'Redis Driver',
'redis_host' => 'Redis Host',
'redis_password' => 'Redis Password',
'redis_port' => 'Redis Port',
'mail_label' => 'Mail',
'mail_driver_label' => 'Mail Driver',
'mail_driver_placeholder' => 'Mail Driver',
'mail_host_label' => 'Mail Host',
'mail_host_placeholder' => 'Mail Host',
'mail_port_label' => 'Mail Port',
'mail_port_placeholder' => 'Mail Port',
'mail_username_label' => 'Mail Username',
'mail_username_placeholder' => 'Mail Username',
'mail_password_label' => 'Mail Password',
'mail_password_placeholder' => 'Mail Password',
'mail_encryption_label' => 'Mail Encryption',
'mail_encryption_placeholder' => 'Mail Encryption',
'pusher_label' => 'Pusher',
'pusher_app_id_label' => 'Pusher App Id',
'pusher_app_id_palceholder' => 'Pusher App Id',
'pusher_app_key_label' => 'Pusher App Key',
'pusher_app_key_palceholder' => 'Pusher App Key',
'pusher_app_secret_label' => 'Pusher App Secret',
'pusher_app_secret_palceholder' => 'Pusher App Secret',
],
'buttons' => [
'setup_database' => 'Setup Database',
'setup_application' => 'Setup Application',
'install' => 'Install',
],
],
],
'classic' => [
'templateTitle' => 'Step 3 | Environment Settings | Classic Editor',
'title' => 'Classic Environment Editor',
'save' => 'Save .env',
'back' => 'Use Form Wizard',
'install' => 'Save and Install',
],
'success' => 'Your .env file settings have been saved.',
'errors' => 'Unable to save the .env file, Please create it manually.',
'title' => 'System parameter configuration',
'name_required' => 'An environment name is required.',
'app_name_label' => 'App Name',
'app_name_placeholder' => 'App Name',
'app_environment_label' => 'App Environment',
'app_environment_label_local' => 'Local',
'app_environment_label_developement' => 'Development',
'app_environment_label_qa' => 'Qa',
'app_environment_label_production' => 'Production',
'app_environment_label_other' => 'Other',
'app_environment_placeholder_other' => 'Enter your environment...',
'app_url_label' => 'App Url',
'app_url_placeholder' => 'App Url',
'db_connection_failed' => 'Could not connect to the database.',
'db_connection_label' => 'Database Connection',
'db_connection_label_mysql' => 'mysql',
'db_connection_label_sqlite' => 'sqlite',
'db_connection_label_pgsql' => 'pgsql',
'db_connection_label_sqlsrv' => 'sqlsrv',
'db_host_label' => 'Database Host',
'db_host_placeholder' => 'Database Host',
'db_port_label' => 'Database Port',
'db_port_placeholder' => 'Database Port',
'db_name_label' => 'Database Name',
'db_name_placeholder' => 'Database Name',
'db_username_label' => 'Database User Name',
'db_username_placeholder' => 'Database User Name',
'db_password_label' => 'Database Password',
'db_password_placeholder' => 'Database Password',
'admin_email' => '后台账号',
'admin_password' => '后台密码',
'install' => 'Install',
],
'install' => 'Install',
/*
*
@ -187,12 +111,14 @@ return [
'final' => [
'title' => 'Installation Finished',
'templateTitle' => 'Installation Finished',
'finished' => 'Application has been successfully installed.',
'migration' => 'Migration &amp; Seed Console Output:',
'console' => 'Application Console Output:',
'log' => 'Installation Log Entry:',
'env' => 'Final .env File:',
'exit' => 'Click here to exit',
'finished' => 'Congratulations, the system is successfully installed, let\'s experience it now',
'to_front' => 'Shop',
'to_admin' => 'Admin Panel',
],
/*

View File

@ -10,6 +10,8 @@ return [
'title' => 'Laravel安装程序',
'next' => '下一步',
'finish' => '安装',
'status' => '状态',
/*
*
@ -17,8 +19,10 @@ return [
*
*/
'welcome' => [
'title' => '欢迎来到Laravel安装程序',
'title' => '欢迎来到安装引导程序',
'describe' => '欢迎使用安装引导,在后面的步骤中我们将检测您的系统环境和安装条件是否达标,请根据每一步中的提示信息操作,谢谢。',
'message' => '欢迎来到安装向导.',
'next' => '检测系统环境',
],
/*
@ -27,7 +31,8 @@ return [
*
*/
'requirements' => [
'title' => '环境要求',
'title' => '系统环境要求检测',
'environment' => '环境',
],
/*
@ -36,41 +41,40 @@ return [
*
*/
'permissions' => [
'title' => '权限',
'title' => '目录权限检测',
'table' => '目录',
'next' => '配置环境参数',
'ask_permission' => '要求权限',
],
/*
*
* Environment page translations.
*
*/
*
* Environment page translations.
*
*/
'environment' => [
'wizard' => [
'form' => [
'app_url_label' => '您的应用URL',
'app_url_placeholder' => '输入您的应用URL',
'db_connection_failed' => '无法连接到数据库!',
'db_connection_label' => '数据库连接',
'db_connection_label_mysql' => 'mysql',
'db_connection_label_sqlite' => 'sqlite',
'db_connection_label_pgsql' => 'pgsql',
'db_connection_label_sqlsrv' => 'sqlsrv',
'db_host_label' => '数据库主机',
'db_host_placeholder' => '输入数据库主机ip或url',
'db_port_label' => '数据库端口',
'db_port_placeholder' => '输入数据库端口',
'db_name_label' => '数据库名',
'db_name_placeholder' => '输入数据库名',
'db_username_label' => '数据库账号',
'db_username_placeholder' => '输入数据库账号',
'db_password_label' => '数据库账号密码',
'db_password_placeholder' => '输入数据库账号密码',
'buttons' => [
'install' => '安装',
],
],
],
'title' => '系统参数配置',
'app_url_label' => '您的应用URL',
'app_url_placeholder' => '输入您的应用URL',
'db_connection_failed' => '无法连接到数据库!',
'db_connection_label' => '数据库连接',
'db_connection_label_mysql' => 'mysql',
'db_connection_label_sqlite' => 'sqlite',
'db_connection_label_pgsql' => 'pgsql',
'db_connection_label_sqlsrv' => 'sqlsrv',
'db_host_label' => '数据库主机',
'db_host_placeholder' => '输入数据库主机ip或url',
'db_port_label' => '数据库端口',
'db_port_placeholder' => '输入数据库端口',
'db_name_label' => '数据库名',
'db_name_placeholder' => '输入数据库名',
'db_username_label' => '数据库账号',
'db_username_placeholder' => '输入数据库账号',
'db_password_label' => '数据库账号密码',
'db_password_placeholder' => '输入数据库账号密码',
'admin_email' => '后台账号',
'admin_password' => '后台密码',
'install' => '安装',
],
/*
@ -79,8 +83,9 @@ return [
*
*/
'final' => [
'title' => '完成',
'finished' => '应用已成功安装.',
'exit' => '点击退出',
'title' => '获取安装结果',
'finished' => '恭喜您,系统安装成功,赶快体验吧',
'to_front' => '访问前台',
'to_admin' => '访问后台',
],
];

View File

@ -11,204 +11,14 @@
@section('content')
@php
$entry_key = 'installer::installer_messages.environment.wizard.form.';
$entry_key = 'installer::installer_messages.environment.';
@endphp
<div class="install-4">
<h3 class="mb-5">系统参数配置</h3>
<h3 class="mb-5">{{ __('installer::installer_messages.environment.title') }}</h3>
<form method="post" action="{{ route('installer.environment.save') }}" novalidate class="needs-validation">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{--
<div class="form-group {{ $errors->has('app_url') ? ' has-error ' : '' }}">
<label for="app_url">
{{ trans('installer::installer_messages.environment.wizard.form.app_url_label') }}
</label>
<input type="url" name="app_url" id="app_url" value="http://localhost"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.app_url_placeholder') }}" />
@if ($errors->has('app_url'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('app_url') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('database_connection') ? ' has-error ' : '' }}">
<label for="database_connection">
{{ trans('installer::installer_messages.environment.wizard.form.db_connection_label') }}
</label>
<select name="database_connection" id="database_connection">
<option value="mysql" selected>
{{ trans('installer::installer_messages.environment.wizard.form.db_connection_label_mysql') }}</option>
<option value="sqlite">
{{ trans('installer::installer_messages.environment.wizard.form.db_connection_label_sqlite') }}</option>
<option value="pgsql">
{{ trans('installer::installer_messages.environment.wizard.form.db_connection_label_pgsql') }}</option>
<option value="sqlsrv">
{{ trans('installer::installer_messages.environment.wizard.form.db_connection_label_sqlsrv') }}</option>
</select>
@if ($errors->has('database_connection'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('database_connection') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('database_hostname') ? ' has-error ' : '' }}">
<label for="database_hostname">
{{ trans('installer::installer_messages.environment.wizard.form.db_host_label') }}
</label>
<input type="text" name="database_hostname" id="database_hostname" value="127.0.0.1"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.db_host_placeholder') }}" />
@if ($errors->has('database_hostname'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('database_hostname') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('database_port') ? ' has-error ' : '' }}">
<label for="database_port">
{{ trans('installer::installer_messages.environment.wizard.form.db_port_label') }}
</label>
<input type="number" name="database_port" id="database_port" value="3306"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.db_port_placeholder') }}" />
@if ($errors->has('database_port'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('database_port') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('database_name') ? ' has-error ' : '' }}">
<label for="database_name">
{{ trans('installer::installer_messages.environment.wizard.form.db_name_label') }}
</label>
<input type="text" name="database_name" id="database_name" value=""
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.db_name_placeholder') }}" />
@if ($errors->has('database_name'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('database_name') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('database_username') ? ' has-error ' : '' }}">
<label for="database_username">
{{ trans('installer::installer_messages.environment.wizard.form.db_username_label') }}
</label>
<input type="text" name="database_username" id="database_username" value=""
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.db_username_placeholder') }}" />
@if ($errors->has('database_username'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('database_username') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('database_password') ? ' has-error ' : '' }}">
<label for="database_password">
{{ trans('installer::installer_messages.environment.wizard.form.db_password_label') }}
</label>
<input type="password" name="database_password" id="database_password" value=""
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.db_password_placeholder') }}" />
@if ($errors->has('database_password'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('database_password') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('mail_driver') ? ' has-error ' : '' }}">
<label for="mail_driver">
{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_driver_label') }}
<sup>
<a href="https://laravel.com/docs/5.4/mail" target="_blank"
title="{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.more_info') }}">
<i class="fa fa-info-circle fa-fw" aria-hidden="true"></i>
<span
class="sr-only">{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.more_info') }}</span>
</a>
</sup>
</label>
<input type="text" name="mail_driver" id="mail_driver" value="smtp"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_driver_placeholder') }}" />
@if ($errors->has('mail_driver'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('mail_driver') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('mail_host') ? ' has-error ' : '' }}">
<label
for="mail_host">{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_host_label') }}</label>
<input type="text" name="mail_host" id="mail_host" value="smtp.mailtrap.io"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_host_placeholder') }}" />
@if ($errors->has('mail_host'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('mail_host') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('mail_port') ? ' has-error ' : '' }}">
<label
for="mail_port">{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_port_label') }}</label>
<input type="number" name="mail_port" id="mail_port" value="2525"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_port_placeholder') }}" />
@if ($errors->has('mail_port'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('mail_port') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('mail_username') ? ' has-error ' : '' }}">
<label
for="mail_username">{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_username_label') }}</label>
<input type="text" name="mail_username" id="mail_username" value="null"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_username_placeholder') }}" />
@if ($errors->has('mail_username'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('mail_username') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('mail_password') ? ' has-error ' : '' }}">
<label
for="mail_password">{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_password_label') }}</label>
<input type="text" name="mail_password" id="mail_password" value="null"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_password_placeholder') }}" />
@if ($errors->has('mail_password'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('mail_password') }}
</span>
@endif
</div> --}}
{{-- <div class="form-group {{ $errors->has('mail_encryption') ? ' has-error ' : '' }}">
<label
for="mail_encryption">{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_encryption_label') }}</label>
<input type="text" name="mail_encryption" id="mail_encryption" value="null"
placeholder="{{ trans('installer::installer_messages.environment.wizard.form.app_tabs.mail_encryption_placeholder') }}" />
@if ($errors->has('mail_encryption'))
<span class="error-block">
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
{{ $errors->first('mail_encryption') }}
</span>
@endif
</div> --}}
<div class="row gx-4 gy-3">
<div class="col-sm-6">
<label class="form-label">
@ -240,7 +50,7 @@
{{ trans($entry_key . 'db_host_label') }}
</label>
<input class="form-control {{ $errors->has('database_hostname') ? 'is-invalid' : '' }}" name="database_hostname"
value="{{ old('database_hostname', '') }}" required placeholder="{{ trans($entry_key . 'db_host_placeholder') }}">
value="{{ old('database_hostname', 'localhost') }}" required placeholder="{{ trans($entry_key . 'db_host_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('database_hostname') ? $errors->first('database_hostname') : __('common.error_required', ['name' => trans($entry_key . 'db_host_label')]) }}</span>
</div>
@ -251,7 +61,7 @@
{{ trans($entry_key . 'db_port_label') }}
</label>
<input class="form-control {{ $errors->has('database_port') ? 'is-invalid' : '' }}" name="database_port"
value="{{ old('database_port', '') }}" required placeholder="{{ trans($entry_key . 'db_host_placeholder') }}">
value="{{ old('database_port', '3306') }}" required placeholder="{{ trans($entry_key . 'db_host_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('database_port') ? $errors->first('database_port') : __('common.error_required', ['name' => trans($entry_key . 'db_port_label')]) }}</span>
</div>
@ -271,7 +81,7 @@
{{ trans($entry_key . 'db_username_label') }}
</label>
<input class="form-control {{ $errors->has('database_username') ? 'is-invalid' : '' }}" name="database_username"
value="{{ old('database_username', '') }}" required placeholder="{{ trans($entry_key . 'db_username_placeholder') }}">
value="{{ old('database_username', 'root') }}" required placeholder="{{ trans($entry_key . 'db_username_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('database_username') ? $errors->first('database_username') : __('common.error_required', ['name' => trans($entry_key . 'db_username_label')]) }}</span>
</div>
@ -281,78 +91,37 @@
{{ trans($entry_key . 'db_password_label') }}
</label>
<input class="form-control {{ $errors->has('database_password') ? 'is-invalid' : '' }}" name="database_password"
value="{{ old('database_password', '') }}" placeholder="{{ trans($entry_key . 'db_password_placeholder') }}">
value="{{ old('database_password', '') }}" required placeholder="{{ trans($entry_key . 'db_password_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('database_password') ? $errors->first('database_password') : __('common.error_required', ['name' => trans($entry_key . 'db_password_label')]) }}</span>
</div>
{{-- <div class="col-sm-6">
<label class="form-label">
{{ trans($entry_key . 'app_tabs.mail_driver_label') }}
</label>
<input class="form-control {{ $errors->has('mail_driver') ? 'is-invalid' : '' }}" name="mail_driver"
value="{{ old('mail_driver', 'smtp') }}" required placeholder="{{ trans($entry_key . 'app_tabs.mail_driver_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('mail_driver') ? $errors->first('mail_driver') : __('common.error_required', ['name' => trans($entry_key . 'app_tabs.mail_driver_label')]) }}</span>
</div>
<div class="col-sm-6">
<label class="form-label">
{{ trans($entry_key . 'app_tabs.mail_host_label') }}
{{ trans($entry_key . 'admin_email') }}
</label>
<input class="form-control {{ $errors->has('mail_host') ? 'is-invalid' : '' }}" name="mail_host"
value="{{ old('mail_host', '') }}" placeholder="{{ trans($entry_key . 'app_tabs.mail_host_placeholder') }}">
<input class="form-control {{ $errors->has('admin_email') ? 'is-invalid' : '' }}" name="admin_email"
value="{{ old('admin_email', '') }}" required placeholder="{{ trans($entry_key . 'admin_email') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('mail_host') ? $errors->first('mail_host') : __('common.error_required', ['name' => trans($entry_key . 'app_tabs.mail_host_label')]) }}</span>
role="alert">{{ $errors->has('admin_email') ? $errors->first('admin_email') : __('common.error_required', ['name' => trans($entry_key . 'admin_email')]) }}</span>
</div>
<div class="col-sm-6">
<label class="form-label">
{{ trans($entry_key . 'app_tabs.mail_port_label') }}
{{ trans($entry_key . 'admin_password') }}
</label>
<input class="form-control {{ $errors->has('mail_port') ? 'is-invalid' : '' }}" name="mail_port"
value="{{ old('mail_port', '') }}" placeholder="{{ trans($entry_key . 'app_tabs.mail_port_placeholder') }}">
<input class="form-control {{ $errors->has('admin_password') ? 'is-invalid' : '' }}" type="password" name="admin_password" name="admin_password"
value="{{ old('admin_password', '') }}" required placeholder="{{ trans($entry_key . 'admin_password') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('mail_port') ? $errors->first('mail_port') : __('common.error_required', ['name' => trans($entry_key . 'app_tabs.mail_port_label')]) }}</span>
role="alert">{{ $errors->has('admin_password') ? $errors->first('admin_password') : __('common.error_required', ['name' => trans($entry_key . 'admin_password')]) }}</span>
</div>
<div class="col-sm-6">
<label class="form-label">
{{ trans($entry_key . 'app_tabs.mail_username_label') }}
</label>
<input class="form-control {{ $errors->has('mail_username') ? 'is-invalid' : '' }}" name="mail_username"
value="{{ old('mail_username', '') }}" placeholder="{{ trans($entry_key . 'app_tabs.mail_username_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('mail_username') ? $errors->first('mail_username') : __('common.error_required', ['name' => trans($entry_key . 'app_tabs.mail_username_label')]) }}</span>
</div>
<div class="col-sm-6">
<label class="form-label">
{{ trans($entry_key . 'app_tabs.mail_password_label') }}
</label>
<input class="form-control {{ $errors->has('mail_password') ? 'is-invalid' : '' }}" name="mail_password"
value="{{ old('mail_password', '') }}" type="password" placeholder="{{ trans($entry_key . 'app_tabs.mail_password_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('mail_password') ? $errors->first('mail_password') : __('common.error_required', ['name' => trans($entry_key . 'app_tabs.mail_password_label')]) }}</span>
</div>
<div class="col-sm-6">
<label class="form-label">
{{ trans($entry_key . 'app_tabs.mail_encryption_label') }}
</label>
<input class="form-control {{ $errors->has('mail_encryption') ? 'is-invalid' : '' }}" name="mail_encryption"
value="{{ old('mail_encryption', '') }}" type="password" placeholder="{{ trans($entry_key . 'app_tabs.mail_encryption_placeholder') }}">
<span class="invalid-feedback"
role="alert">{{ $errors->has('mail_encryption') ? $errors->first('mail_encryption') : __('common.error_required', ['name' => trans($entry_key . 'app_tabs.mail_encryption_label')]) }}</span>
</div> --}}
<div class="col-sm-12 my-5">
<div class="d-flex justify-content-end">
<button class="btn btn-primary d-flex align-items-center" type="submit">
{{ trans('installer::installer_messages.environment.wizard.form.buttons.install') }}
{{ trans('installer::installer_messages.environment.install') }}
<i class="bi bi-arrow-right-short fs-2 lh-1 ms-2"></i>
</button>
</div>

View File

@ -6,35 +6,22 @@
@section('title')
<i class="fa fa-flag-checkered fa-fw" aria-hidden="true"></i>
{{-- {{ trans('installer::installer_messages.final.title') }} --}}
{{ __('installer::installer_messages.final.title') }}
@endsection
@section('content')
<div class="install-2">
<h3 class="mb-5">安装结果</h3>
{{-- @if (session('message')['dbOutputLog'])
<p><strong><small>{{ trans('installer::installer_messages.final.migration') }}</small></strong></p>
<pre><code>{{ session('message')['dbOutputLog'] }}</code></pre>
@endif
<p><strong><small>{{ trans('installer::installer_messages.final.console') }}</small></strong></p>
<pre><code>{{ $finalMessages }}</code></pre>
<p><strong><small>{{ trans('installer::installer_messages.final.log') }}</small></strong></p>
<pre><code>{{ $finalStatusMessage }}</code></pre>
<p><strong><small>{{ trans('installer::installer_messages.final.env') }}</small></strong></p>
<pre><code>{{ $finalEnvFile }}</code></pre> --}}
<h3 class="mb-5">{{ __('installer::installer_messages.final.title') }}</h3>
<div class="d-flex justify-content-center flex-column align-items-center">
<div class="welcome-img mb-5" style="max-width: 260px;"><img src="{{ asset('/install/image/install-2.png') }}" class="img-fluid"></div>
<h5 class="text-center mb-5">恭喜你,系统安装成功,赶快体验吧</h5>
<h5 class="text-center mb-5">{{ __('installer::installer_messages.final.finished') }}</h5>
<div class="d-flex justify-content-center">
<a href="{{ url('/') }}" class="btn btn-primary">{{ trans('installer::installer_messages.final.exit') }}</a>
<a href="{{ url('/') }}" class="btn btn-primary">{{ trans('installer::installer_messages.final.to_front') }}</a>
<a href="{{ url('/admin') }}" class="btn btn-primary ms-3">{{ trans('installer::installer_messages.final.to_admin') }}</a>
</div>
</div>
</div>

View File

@ -15,78 +15,83 @@
<script src="{{ asset('vendor/jquery/jquery-3.6.0.min.js') }}"></script>
<script src="{{ asset('vendor/layer/3.5.1/layer.js') }}"></script>
<link rel="shortcut icon" href="{{ asset('/image/favicon.png') }}">
<script src="{{ asset('vendor/bootstrap/5.1.3/js/bootstrap.min.js') }}"></script>
{{-- <script src="{{ asset('vendor/bootstrap/5.1.3/js/bootstrap.min.js') }}"></script> --}}
<script src="{{ asset('vendor/bootstrap/5.1.3/js/bootstrap.bundle.min.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('/install/css/app.css') }}">
@yield('style')
</head>
<body>
<aside class="aside-wrap">
<div class="logo mb-5"><img src="{{ asset('/image/logo.png') }}" class="img-fluid"></div>
<div class="steps-wrap">
<ul>
<li class="{{ $steps == 1 ? 'ing' : '' }} {{ $steps > 1 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 1) <i class="bi bi-check-lg"></i> @else 1 @endif</span>
欢迎使用安装引导
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 2 ? 'ing' : '' }} {{ $steps > 2 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 2 && $steps != 2) <i class="bi bi-check-lg"></i> @else 2 @endif</span>
系统环境检测
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 3 ? 'ing' : '' }} {{ $steps > 3 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 3 && $steps != 3) <i class="bi bi-check-lg"></i> @else 3 @endif</span>
文件夹权限检测
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 4 ? 'ing' : '' }} {{ $steps > 4 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 4 && $steps != 4) <i class="bi bi-check-lg"></i> @else 4 @endif</span>
系统参数配置
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 5 ? 'ing' : '' }} {{ $steps > 5 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 5 && $steps != 5) <i class="bi bi-check-lg"></i> @else 5 @endif</span>
获取安装结果
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
</ul>
</div>
{{-- <div class="container d-flex justify-content-between align-items-center">
</div> --}}
</aside>
<div class="content">
@if (session('message'))
<p class="alert text-center">
<strong>
@if (is_array(session('message')))
{{ session('message')['message'] }}
@else
{{ session('message') }}
@endif
</strong>
</p>
@endif
@if (session()->has('errors'))
<div class="alert alert-danger" id="error_alert">
@foreach ($errors->all() as $error)
<div>{{ $error }}</div>
@endforeach
<div class="install-box">
<aside class="aside-wrap">
<div class="top">
<div class="logo mb-5"><img src="{{ asset('/image/logo.png') }}" class="img-fluid"></div>
<div class="steps-wrap">
<ul>
<li class="{{ $steps == 1 ? 'ing' : '' }} {{ $steps > 1 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 1) <i class="bi bi-check-lg"></i> @else 1 @endif</span>
{{ __('installer::installer_messages.welcome.title') }}
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 2 ? 'ing' : '' }} {{ $steps > 2 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 2 && $steps != 2) <i class="bi bi-check-lg"></i> @else 2 @endif</span>
{{ __('installer::installer_messages.requirements.title') }}
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 3 ? 'ing' : '' }} {{ $steps > 3 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 3 && $steps != 3) <i class="bi bi-check-lg"></i> @else 3 @endif</span>
{{ __('installer::installer_messages.permissions.title') }}
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 4 ? 'ing' : '' }} {{ $steps > 4 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 4 && $steps != 4) <i class="bi bi-check-lg"></i> @else 4 @endif</span>
{{ __('installer::installer_messages.environment.title') }}
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
<li class="{{ $steps == 5 ? 'ing' : '' }} {{ $steps > 5 ? 'success' : '' }}">
<div class="left">
<span class="index">@if ($steps > 5 && $steps != 5) <i class="bi bi-check-lg"></i> @else 5 @endif</span>
{{ __('installer::installer_messages.final.title') }}
</div>
<span class="right"><i class="bi bi-arrow-right-short"></i></span>
</li>
</ul>
</div>
</div>
@endif
<div class="bottom">
</div>
</aside>
@yield('content')
<div class="content">
@if (session('message'))
<p class="alert text-center">
<strong>
@if (is_array(session('message')))
{{ session('message')['message'] }}
@else
{{ session('message') }}
@endif
</strong>
</p>
@endif
@if (session()->has('errors'))
<div class="alert alert-danger" id="error_alert">
@foreach ($errors->all() as $error)
<div>{{ $error }}</div>
@endforeach
</div>
@endif
@yield('content')
</div>
</div>
@yield('scripts')
</body>

View File

@ -11,30 +11,20 @@
@section('content')
<div class="install-2">
<h3 class="mb-5">文件夹权限检测</h3>
{{-- <ul class="list">
@foreach ($permissions['permissions'] as $permission)
<li class="list__item list__item--permissions {{ $permission['isSet'] ? 'success' : 'error' }}">
{{ $permission['folder'] }}
<span>
<i class="fa fa-fw fa-{{ $permission['isSet'] ? 'check-circle-o' : 'exclamation-circle' }}"></i>
{{ $permission['permission'] }}
</span>
</li>
@endforeach
</ul> --}}
<h3 class="mb-5">{{ __('installer::installer_messages.permissions.title') }}</h3>
<table class="table table-hover text-black text-opacity-75 fs-5 mb-5">
<thead>
<tr>
<th width="70%">文件夹</th>
<th width="30%">状态</th>
<th width="40%">{{ __('installer::installer_messages.permissions.table') }}</th>
<th width="30%">{{ __('installer::installer_messages.permissions.next') }}</th>
<th width="30%">{{ __('installer::installer_messages.status') }}</th>
</tr>
</thead>
<tbody>
@foreach ($permissions['permissions'] as $permission)
<tr class="{{ $permission['isSet'] ? '' : 'table-danger' }}">
<td>{{ $permission['folder'] }} {{ $permission['permission'] }}</td>
<td>{{ $permission['folder'] }}</td>
<td>{{ $permission['permission'] }}</td>
<td>
<i class="bi bi-{{ $permission['isSet'] ? 'check-circle-fill' : 'exclamation-circle-fill' }} {{ $permission['isSet'] ? 'text-success' : 'text-danger' }} row-icon"
aria-hidden="true"></i>

View File

@ -11,11 +11,11 @@
@section('content')
<div class="install-2">
<h3 class="mb-5">系统环境检测</h3>
<h3 class="mb-5">{{ trans('installer::installer_messages.requirements.title') }}</h3>
<table class="table table-hover text-black text-opacity-75 fs-5 mb-5">
<thead>
<th width="70%">环境</th>
<th width="30%">状态</th>
<th width="70%">{{ trans('installer::installer_messages.requirements.environment') }}</th>
<th width="30%">{{ trans('installer::installer_messages.status') }}</th>
</thead>
<tbody>
@foreach ($requirements['requirements'] as $type => $requirement)
@ -39,27 +39,6 @@
aria-hidden="true"></i></td>
</tr>
@endforeach
{{-- <ul class="list-group">
<li class="list__item list__title {{ $phpSupportInfo['supported'] ? 'success' : 'error' }}">
<strong>{{ ucfirst($type) }}</strong>
@if ($type == 'php')
<small>(version {{ $phpSupportInfo['minimum'] }} required)</small>
<span class="float-right">
<strong>{{ $phpSupportInfo['current'] }}</strong>
<i class="bi bi-{{ $phpSupportInfo['supported'] ? 'check-circle-fill' : 'exclamation-circle-fill' }} row-icon"
aria-hidden="true"></i>
</span>
@endif
</li>
@foreach ($requirements['requirements'][$type] as $extention => $enabled)
<li class="list__item {{ $enabled ? 'success' : 'error' }}">
{{ $extention }}
<i class="fa fa-fw fa-{{ $enabled ? 'check-circle-o' : 'exclamation-circle' }} row-icon"
aria-hidden="true"></i>
</li>
@endforeach
</ul> --}}
@endforeach
</tbody>
</table>

View File

@ -10,10 +10,28 @@
@section('content')
<div class="install-1">
<h3 class="">{{ trans('installer::installer_messages.welcome.message') }}</h3>
<div class="d-flex align-items-center justify-content-between">
<h3 class="">{{ __('installer::installer_messages.welcome.title') }}</h3>
<div class="dropdown">
<a class="btn btn-outline-primary btn-sm dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
@foreach ($languages as $key => $language)
@if ($locale == $key)
{{ $language }}
@endif
@endforeach
</a>
<ul class="dropdown-menu">
@foreach ($languages as $key => $language)
<li><a class="dropdown-item" href="{{ route('installer.lang.switch', [$key]) }}">{{ $language }}</a></li>
@endforeach
</ul>
</div>
</div>
<div class="content-main d-flex justify-content-center align-items-center flex-column">
<div class="welcome-img"><img src="{{ asset('/install/image/install-1.png') }}" class="img-fluid"></div>
<h5 class="mb-5 text-muted fw-3 fw-normal guide-text text-center lh-base">欢迎使用安装引导,在后面的步骤中我们将检测您的系统环境和安装条件是否达标,请根据每一步中的提示信息操作,谢谢。</h5>
<h5 class="mb-5 text-muted fw-3 fw-normal guide-text text-center lh-base">{{ __('installer::installer_messages.welcome.describe') }}</h5>
<p class="text-center">
<a href="{{ route('installer.requirements') }}" class="btn btn-primary d-flex align-items-center">
{{ trans('installer::installer_messages.welcome.next') }}

View File

@ -3,20 +3,35 @@
$primary: #fd560f;
body {
// background-color: #f6f7f8;
background-color: #f3f6f8;
display: flex;
height: 100vh;
.install-box {
background-color: #f3f6f8;
display: flex;
height: 100vh;
margin: auto;
> .aside-wrap {
width: 30%;
background-color: #fff;
padding: 40px 20px 40px 40px;
}
> .aside-wrap {
width: 30%;
background-color: #fff;
padding: 40px 20px 40px 40px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
> .content {
width: 70%;
padding: 40px 60px;
> .content {
width: 70%;
padding: 40px 60px;
@media (min-width: 1441px) {
width: 60%;
}
}
.language-switch {
.form-select {
width: auto
}
}
}
}

View File

@ -1,17 +1,29 @@
body {
body .install-box {
background-color: #f3f6f8;
display: flex;
height: 100vh;
margin: auto;
}
body > .aside-wrap {
body .install-box > .aside-wrap {
width: 30%;
background-color: #fff;
padding: 40px 20px 40px 40px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
body > .content {
body .install-box > .content {
width: 70%;
padding: 40px 60px;
}
@media (min-width: 1441px) {
body .install-box > .content {
width: 60%;
}
}
body .install-box .language-switch .form-select {
width: auto;
}
.aside-wrap .logo img {
max-width: 180px;