Commit f873d7fa by mushishixian

全局样式

parent d8cdbd89
<?php
namespace App\Admin\Actions;
use App\Admin\Forms\AdminSetting as AdminSettingForm;
use Dcat\Admin\Actions\Action;
use Dcat\Admin\Widgets\Modal;
class AdminSetting extends Action
{
/**
* @return string
*/
protected $title = '<i class="feather icon-settings" style="font-size: 1.5rem"></i>';
public function render()
{
$modal = Modal::make()
->id('admin-setting-config') // 导航栏显示弹窗,必须固定ID,随机ID会在刷新后失败
->title($this->title())
->body(AdminSettingForm::make())
->lg()
->button(
<<<HTML
<ul class="nav navbar-nav">
<li class="nav-item"> &nbsp;{$this->title()} &nbsp;</li>
</ul>
HTML
);
return $modal->render();
}
}
...@@ -6,4 +6,6 @@ use Dcat\Admin\Http\Controllers\AuthController as BaseAuthController; ...@@ -6,4 +6,6 @@ use Dcat\Admin\Http\Controllers\AuthController as BaseAuthController;
class AuthController extends BaseAuthController class AuthController extends BaseAuthController
{ {
// 自定义登陆view模板
protected $view = 'admin.login';
} }
...@@ -19,7 +19,7 @@ class UserAddressController extends AdminController ...@@ -19,7 +19,7 @@ class UserAddressController extends AdminController
{ {
return Grid::make(new UserAddress(), function (Grid $grid) { return Grid::make(new UserAddress(), function (Grid $grid) {
$grid->column('id')->sortable(); $grid->column('id')->sortable();
$grid->column('user_id'); $grid->column('user_id')->width(70);
$grid->column('country'); $grid->column('country');
$grid->column('first_name'); $grid->column('first_name');
$grid->column('last_name'); $grid->column('last_name');
...@@ -29,10 +29,9 @@ class UserAddressController extends AdminController ...@@ -29,10 +29,9 @@ class UserAddressController extends AdminController
$grid->column('postal_code'); $grid->column('postal_code');
$grid->column('created_at'); $grid->column('created_at');
$grid->column('updated_at')->sortable(); $grid->column('updated_at')->sortable();
$grid->filter(function (Grid\Filter $filter) { $grid->filter(function (Grid\Filter $filter) {
$filter->equal('id'); $filter->equal('id');
}); });
}); });
} }
...@@ -78,7 +77,7 @@ class UserAddressController extends AdminController ...@@ -78,7 +77,7 @@ class UserAddressController extends AdminController
$form->text('address_line2'); $form->text('address_line2');
$form->text('city'); $form->text('city');
$form->text('postal_code'); $form->text('postal_code');
$form->display('created_at'); $form->display('created_at');
$form->display('updated_at'); $form->display('updated_at');
}); });
......
<?php
namespace App\Admin\Forms;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
use Illuminate\Support\Arr;
class AdminSetting extends Form implements LazyRenderable
{
use LazyWidget;
/**
* 主题颜色.
*
* @var array
*/
protected $colors = [
'default' => 'Default',
'blue' => 'Blue',
'blue-light' => 'Blue Light',
// 'blue-dark' => 'Blue Dark',
'green' => 'Green',
];
protected $sidebarStyle = [
'light',
'primary',
'dark',
];
/**
* 处理表单请求.
*
* @param array $input
*
* @return mixed
*/
public function handle(array $input)
{
$input['layout']['horizontal_menu'] = in_array('horizontal_menu', $input['layout']['body_class'], true);
foreach (Arr::dot($input) as $k => $v) {
$this->update($k, $v);
}
return $this->response()->success(trans('admin.succeeded'));
}
/**
* 构建表单.
*/
public function form()
{
$this->radio('lang', trans('admin.lang'))->required()->options(['en' => 'English', 'zh_CN' => '简体中文']);
$this->radio('layout.color', trans('admin.layout.color'))
->required()
->options($this->colors);
$this->radio('layout.sidebar_style', trans('admin.layout.sidebar_style'))
->options(['light' => 'Light', 'primary' => 'Primary', 'dark' => 'Dark']);
$this->radio('layout.navbar_color', trans('admin.layout.navbar_color'))
->options([
'bg-primary' => 'Primary',
'bg-info' => 'Info',
'bg-warning' => 'Warning',
'bg-success' => 'Success',
'bg-danger' => 'Danger',
'bg-dark' => 'Dark',
]);
$this->checkbox('layout.body_class', trans('admin.layout.sidebar_style'))
->options([
'horizontal_menu' => 'Horizontal',
'sidebar-separate' => 'Sidebar Separate',
]);
}
/**
* 设置接口保存成功后的回调JS代码.
*
* 1.2秒后刷新整个页面.
*
* @return string|void
*/
public function savedScript()
{
return <<<'JS'
if (data.status) {
setTimeout(function () {
location.reload()
}, 1200);
}
JS;
}
/**
* 返回表单数据.
*
* @return array
*/
public function default()
{
return user_admin_config();
}
/**
* 更新配置.
*
* @param string $key
* @param string $value
*/
protected function update($key, $value)
{
user_admin_config([$key => $value]);
}
}
<?php
namespace App\Admin\Forms;
use Dcat\Admin\Models\Administrator;
use Dcat\Admin\Support\Helper;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
use Dcat\Admin\Contracts\LazyRenderable;
class ResetPassword extends Form implements LazyRenderable
{
use LazyWidget; // 使用异步加载功能
// 处理请求
public function handle(array $input)
{
// 获取外部传递参数
//$id = $this->payload['id'] ?? null;
$id = Helper::array($input['id'] ?? null);
// 表单参数
$password = $input['password'] ?? null;
if (! $id) {
return $this->error('参数错误');
}
$user = Administrator::query()->find($id);
if (! $user) {
return $this->error('用户不存在');
}
$user->update(['password' => bcrypt($password)]);
return $this->success('密码修改成功');
}
public function form()
{
// 获取外部传递参数
//$id = $this->payload['id'] ?? null;
$this->password('password')->required();
// 密码确认表单
$this->password('password_confirm')->same('password');
$this->hidden('id')->attribute('id', 'reset-password-id');
}
// 返回表单数据,如不需要可以删除此方法
public function default()
{
return [
'password' => '',
'password_confirm' => '',
];
}
}
<?php
namespace App\Admin\Forms;
use Dcat\Admin\Widgets\Form;
use Symfony\Component\HttpFoundation\Response;
class Setting extends Form
{
/**
* Handle the form request.
*
* @param array $input
*
* @return Response
*/
public function handle(array $input)
{
// dump($input);
// return $this->error('Your error message.');
return $this->success('Processed successfully.', '/');
}
/**
* Build a form here.
*/
public function form()
{
$this->text('name')->required();
$this->email('email')->rules('email');
}
/**
* The data of the form.
*
* @return array
*/
public function default()
{
return [
'name' => 'John Doe',
'email' => 'John.Doe@gmail.com',
];
}
}
<?php
namespace App\Admin\Forms;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Dcat\Admin\Widgets\Form;
class UserProfile extends Form implements LazyRenderable
{
use LazyWidget;
public function handle(array $input)
{
return $this->success('保存成功');
}
public function default()
{
return [
// 展示上个页面传递过来的值
'name' => $this->payload['name'] ?? '',
];
}
public function form()
{
$this->text('name', trans('admin.name'))->required()->help('用户昵称');
$this->image('avatar', trans('admin.avatar'))->autoUpload();
$this->password('old_password', trans('admin.old_password'));
$this->password('password', trans('admin.password'))
->minLength(5)
->maxLength(20)
->customFormat(function ($v) {
if ($v == $this->password) {
return;
}
return $v;
})
->help('请输入5-20个字符');
$this->password('password_confirmation', trans('admin.password_confirmation'))
->same('password')
->help('请输入确认密码');
}
}
...@@ -4,6 +4,7 @@ use Dcat\Admin\Admin; ...@@ -4,6 +4,7 @@ use Dcat\Admin\Admin;
use Dcat\Admin\Grid; use Dcat\Admin\Grid;
use Dcat\Admin\Form; use Dcat\Admin\Form;
use Dcat\Admin\Grid\Filter; use Dcat\Admin\Grid\Filter;
use Dcat\Admin\Layout\Navbar;
use Dcat\Admin\Show; use Dcat\Admin\Show;
/** /**
...@@ -24,3 +25,117 @@ use Dcat\Admin\Show; ...@@ -24,3 +25,117 @@ use Dcat\Admin\Show;
* Admin::js('/packages/prettydocs/js/main.js'); * Admin::js('/packages/prettydocs/js/main.js');
* *
*/ */
// 覆盖默认配置
config(['admin' => user_admin_config()]);
config(['app.locale' => config('admin.lang') ?: config('app.locale')]);
$primaryColor = Admin::color()->primary();
Admin::style(
<<<CSS
body {
font-size: 12px;
}
[class*=sidebar-dark-] {
background-image: linear-gradient(0deg, #191A23, #191A23);
}
.nav-link {
color: #B7B7B3;
font-weight: 200;
font-size:14px!important;
}
.nav-item {
margin-top:3px;
margin-bottom:3px;
}
a.nav-link.active {
background-color: $primaryColor!important;
}
body:not(.dark-mode) .table-collapse .custom-data-table tbody td {
height:30px;
}
body.dark-mode .table-collapse table.custom-data-table.data-table tbody td {
height:30px;
}
.form-group {
margin-bottom:5px;
}
.content-header {
display:none;
}
.datetime-range-fix {
}
/* .input-group {
max-height:30px;
} */
.table-main{
table-layout: fixed;
width: 100%;
}
.table-main table.custom-data-table td,
.table-main table.custom-data-table th{
z-index: 0;
}
.table-main table.custom-data-table thead,
.table-fixed table.custom-data-table thead tr th{
position: sticky;
top: 0;
background-color: #ececf1;
}
.table-fixed table.custom-data-table thead tr th {
z-index: 99;
}
CSS
);
// 追加菜单
Admin::menu()->add(include __DIR__.'/menu.php', 0);
Admin::navbar(function (Navbar $navbar) {
$method = config('admin.layout.horizontal_menu') ? 'left' : 'right';
$navbar->$method(
<<<HTML
<ul class="nav navbar-nav">
</ul>
HTML
);
// ajax请求不执行
if (! Dcat\Admin\Support\Helper::isAjaxRequest()) {
$navbar->$method(App\Admin\Actions\AdminSetting::make()->render());
}
// $navbar->right(view('admin.navbar-2'));
// 搜索框
$navbar->right(
<<<HTML
HTML
);
// 下拉面板
// $navbar->right(view('admin.navbar-1'));
});
Grid::resolving(function (Grid $grid) {
$grid->tableCollapse(true);
// $grid->withBorder();
$grid->paginate(20);
$grid->fixColumns(2);
});
<?php
return [
];
...@@ -13,5 +13,6 @@ Route::group([ ...@@ -13,5 +13,6 @@ Route::group([
], function (Router $router) { ], function (Router $router) {
$router->get('/', 'HomeController@index'); $router->get('/', 'HomeController@index');
$router->resource('userAddress', 'UserAddressController');
}); });
<?php
namespace App\Http\Middleware;
use Dcat\Admin\Admin;
use Dcat\Admin\Http\Auth\Permission;
use Illuminate\Http\Request;
use Symfony\Component\HttpKernel\Exception\HttpException;
class AccessControl
{
protected $denyMethods = ['POST', 'PUT', 'DELETE'];
protected $excepts = [
'POST' => [
'admin/auth/login',
'admin/form/step',
'admin/form',
'admin/dcat-api/value',
'admin/helpers/scaffold/table',
'admin/dcat-api/form',
],
];
public function handle(Request $request, \Closure $next)
{
// if (! config('app.deny_update')) {
// return $next($request);
// }
//
// foreach ($this->excepts as $method => $route) {
// if ($request->isMethod($method) && $request->is(...$route)) {
// return $next($request);
// }
// }
//
// if (in_array($request->getMethod(), $this->denyMethods)) {
// try {
// Permission::error();
// } catch (HttpException $e) {
// return Admin::json()->error('对不起,演示站点不支持修改数据。')->send();
// }
// }
return $next($request);
}
}
...@@ -14,6 +14,7 @@ class AppServiceProvider extends ServiceProvider ...@@ -14,6 +14,7 @@ class AppServiceProvider extends ServiceProvider
public function register() public function register()
{ {
// //
require_once __DIR__.'/../helpers.php';
} }
/** /**
......
<?php
use Illuminate\Support\Arr;
if (! function_exists('user_admin_config')) {
function user_admin_config($key = null, $value = null)
{
$session = session();
if (! $config = $session->get('admin.config')) {
$config = config('admin');
$config['lang'] = config('app.locale');
}
if (is_array($key)) {
// 保存
foreach ($key as $k => $v) {
Arr::set($config, $k, $v);
}
$session->put('admin.config', $config);
return;
}
if ($key === null) {
return $config;
}
return Arr::get($config, $key, $value);
}
}
...@@ -11,7 +11,7 @@ return [ ...@@ -11,7 +11,7 @@ return [
| login page. | login page.
| |
*/ */
'name' => 'Dcat Admin', 'name' => 'Semour Admin',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -22,7 +22,7 @@ return [ ...@@ -22,7 +22,7 @@ return [
| `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'. | `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'.
| |
*/ */
'logo' => '<img src="/vendor/dcat-admin/images/logo.png" width="35"> &nbsp;Dcat Admin', 'logo' => '<img src="/vendor/dcat-admin/images/logo.png" width="35"> &nbsp;Semour Admin',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -330,12 +330,12 @@ return [ ...@@ -330,12 +330,12 @@ return [
'sidebar_collapsed' => false, 'sidebar_collapsed' => false,
// light, primary, dark // light, primary, dark
'sidebar_style' => 'light', 'sidebar_style' => 'dark',
'dark_mode_switch' => false, 'dark_mode_switch' => true,
// bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
'navbar_color' => '', 'navbar_color' => 'bg-dark',
], ],
/* /*
......
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="facebook-f" class="svg-inline--fa fa-facebook-f fa-w-9" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M215.8 85H264V3.6C255.7 2.5 227.1 0 193.8 0 124.3 0 76.7 42.4 76.7 120.3V192H0v91h76.7v229h94V283h73.6l11.7-91h-85.3v-62.7c0-26.3 7.3-44.3 45.1-44.3z"></path></svg>
\ No newline at end of file
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="github-alt" class="svg-inline--fa fa-github-alt fa-w-15" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 512"><path fill="currentColor" d="M186.1 328.7c0 20.9-10.9 55.1-36.7 55.1s-36.7-34.2-36.7-55.1 10.9-55.1 36.7-55.1 36.7 34.2 36.7 55.1zM480 278.2c0 31.9-3.2 65.7-17.5 95-37.9 76.6-142.1 74.8-216.7 74.8-75.8 0-186.2 2.7-225.6-74.8-14.6-29-20.2-63.1-20.2-95 0-41.9 13.9-81.5 41.5-113.6-5.2-15.8-7.7-32.4-7.7-48.8 0-21.5 4.9-32.3 14.6-51.8 45.3 0 74.3 9 108.8 36 29-6.9 58.8-10 88.7-10 27 0 54.2 2.9 80.4 9.2 34-26.7 63-35.2 107.8-35.2 9.8 19.5 14.6 30.3 14.6 51.8 0 16.4-2.6 32.7-7.7 48.2 27.5 32.4 39 72.3 39 114.2zm-64.3 50.5c0-43.9-26.7-82.6-73.5-82.6-18.9 0-37 3.4-56 6-14.9 2.3-29.8 3.2-45.1 3.2-15.2 0-30.1-.9-45.1-3.2-18.7-2.6-37-6-56-6-46.8 0-73.5 38.7-73.5 82.6 0 87.8 80.4 101.3 150.4 101.3h48.2c70.3 0 150.6-13.4 150.6-101.3zm-82.6-55.1c-25.8 0-36.7 34.2-36.7 55.1s10.9 55.1 36.7 55.1 36.7-34.2 36.7-55.1-10.9-55.1-36.7-55.1z"></path></svg>
\ No newline at end of file
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="google" class="svg-inline--fa fa-google fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 488 512"><path fill="currentColor" d="M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"></path></svg>
\ No newline at end of file
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="twitter" class="svg-inline--fa fa-twitter fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>
\ No newline at end of file
...@@ -2,227 +2,234 @@ ...@@ -2,227 +2,234 @@
return [ return [
'scaffold' => [ 'scaffold' => [
'header' => 'Scaffold', 'header' => 'Scaffold',
'choose' => 'choose', 'choose' => 'choose',
'table' => 'Table', 'table' => 'Table',
'model' => 'Model', 'model' => 'Model',
'controller' => 'Controller', 'controller' => 'Controller',
'repository' => 'Repository', 'repository' => 'Repository',
'add_field' => 'Add field', 'add_field' => 'Add field',
'pk' => 'Primary key', 'pk' => 'Primary key',
'soft_delete' => 'Soft delete', 'soft_delete' => 'Soft delete',
'create_migration' => 'Create migration', 'create_migration' => 'Create migration',
'create_model' => 'Create model', 'create_model' => 'Create model',
'create_repository' => 'Create repository', 'create_repository' => 'Create repository',
'create_controller' => 'Create controller', 'create_controller' => 'Create controller',
'run_migrate' => 'Run migrate', 'run_migrate' => 'Run migrate',
'create_lang' => 'Create lang', 'create_lang' => 'Create lang',
'field' => 'field', 'field' => 'field',
'translation' => 'translation', 'translation' => 'translation',
'comment' => 'comment', 'comment' => 'comment',
'default' => 'default', 'default' => 'default',
'field_name' => 'field name', 'field_name' => 'field name',
'type' => 'type', 'type' => 'type',
'nullable' => 'nullable', 'nullable' => 'nullable',
'key' => 'key', 'key' => 'key',
'translate_title' => 'Translate Title', 'translate_title' => 'Translate Title',
'sync_translation_with_comment' => 'Sync translation and comment', 'sync_translation_with_comment' => 'Sync translation and comment',
], ],
'client' => [ 'client' => [
'delete_confirm' => 'Are you sure to delete this item ?', 'delete_confirm' => 'Are you sure to delete this item ?',
'confirm' => 'Confirm', 'confirm' => 'Confirm',
'cancel' => 'Cancel', 'cancel' => 'Cancel',
'refresh_succeeded' => 'Refresh succeeded !', 'refresh_succeeded' => 'Refresh succeeded !',
'close' => 'Close', 'close' => 'Close',
'selected_options' => ':num options selected', 'selected_options' => ':num options selected',
'exceed_max_item' => 'Maximum items exceeded.', 'exceed_max_item' => 'Maximum items exceeded.',
'no_preview' => 'No preview available.', 'no_preview' => 'No preview available.',
'500' => 'Internal server error !', '500' => 'Internal server error !',
'403' => 'Permission deny !', '403' => 'Permission deny !',
'401' => 'Unauthorized !', '401' => 'Unauthorized !',
'419' => 'Page expired !', '419' => 'Page expired !',
], ],
'online' => 'Online', 'online' => 'Online',
'login' => 'Login', 'login' => 'Login',
'logout' => 'Logout', 'logout' => 'Logout',
'setting' => 'Setting', 'setting' => 'Setting',
'name' => 'Name', 'name' => 'Name',
'username' => 'Username', 'username' => 'Username',
'user' => 'User', 'user' => 'User',
'alias' => 'Alias', 'alias' => 'Alias',
'routes' => 'Routes', 'routes' => 'Routes',
'route_action' => 'Route Action', 'route_action' => 'Route Action',
'middleware' => 'Middleware', 'middleware' => 'Middleware',
'method' => 'Method', 'method' => 'Method',
'old_password' => 'Old password', 'old_password' => 'Old password',
'password' => 'Password', 'password' => 'Password',
'password_confirmation' => 'Password confirmation', 'password_confirmation' => 'Password confirmation',
'old_password_error' => 'Incorrect password', 'old_password_error' => 'Incorrect password',
'remember_me' => 'Remember me', 'remember_me' => 'Remember me',
'user_setting' => 'User setting', 'user_setting' => 'User setting',
'avatar' => 'Avatar', 'avatar' => 'Avatar',
'list' => 'List', 'list' => 'List',
'new' => 'New', 'new' => 'New',
'create' => 'Create', 'create' => 'Create',
'delete' => 'Delete', 'delete' => 'Delete',
'remove' => 'Remove', 'remove' => 'Remove',
'edit' => 'Edit', 'edit' => 'Edit',
'quick_edit' => 'Quick Edit', 'quick_edit' => 'Quick Edit',
'view' => 'View', 'view' => 'View',
'continue_editing' => 'Continue editing', 'continue_editing' => 'Continue editing',
'continue_creating' => 'Continue creating', 'continue_creating' => 'Continue creating',
'detail' => 'Detail', 'detail' => 'Detail',
'browse' => 'Browse', 'browse' => 'Browse',
'reset' => 'Reset', 'reset' => 'Reset',
'export' => 'Export', 'export' => 'Export',
'batch_delete' => 'Batch delete', 'batch_delete' => 'Batch delete',
'save' => 'Save', 'save' => 'Save',
'refresh' => 'Refresh', 'refresh' => 'Refresh',
'order' => 'Order', 'order' => 'Order',
'expand' => 'Expand', 'expand' => 'Expand',
'collapse' => 'Collapse', 'collapse' => 'Collapse',
'filter' => 'Filter', 'filter' => 'Filter',
'search' => 'Search', 'search' => 'Search',
'close' => 'Close', 'close' => 'Close',
'show' => 'Show', 'show' => 'Show',
'entries' => 'entries', 'entries' => 'entries',
'captcha' => 'Captcha', 'captcha' => 'Captcha',
'action' => 'Action', 'action' => 'Action',
'title' => 'Title', 'title' => 'Title',
'description' => 'Description', 'description' => 'Description',
'back' => 'Back', 'back' => 'Back',
'back_to_list' => 'Back to List', 'back_to_list' => 'Back to List',
'submit' => 'Submit', 'submit' => 'Submit',
'menu' => 'Menu', 'menu' => 'Menu',
'input' => 'Input', 'input' => 'Input',
'succeeded' => 'Succeeded', 'succeeded' => 'Succeeded',
'failed' => 'Failed', 'failed' => 'Failed',
'delete_confirm' => 'Are you sure to delete this item ?', 'delete_confirm' => 'Are you sure to delete this item ?',
'delete_succeeded' => 'Delete succeeded !', 'delete_succeeded' => 'Delete succeeded !',
'delete_failed' => 'Delete failed !', 'delete_failed' => 'Delete failed !',
'update_succeeded' => 'Update succeeded !', 'update_succeeded' => 'Update succeeded !',
'update_failed' => 'Update failed !', 'update_failed' => 'Update failed !',
'save_succeeded' => 'Save succeeded !', 'save_succeeded' => 'Save succeeded !',
'save_failed' => 'Save failed !', 'save_failed' => 'Save failed !',
'refresh_succeeded' => 'Refresh succeeded !', 'refresh_succeeded' => 'Refresh succeeded !',
'login_successful' => 'Login successful', 'login_successful' => 'Login successful',
'choose' => 'Choose', 'choose' => 'Choose',
'choose_file' => 'Select file', 'choose_file' => 'Select file',
'choose_image' => 'Select image', 'choose_image' => 'Select image',
'more' => 'More', 'more' => 'More',
'deny' => 'Permission denied', 'deny' => 'Permission denied',
'administrator' => 'Administrator', 'administrator' => 'Administrator',
'no_data' => 'No data.', 'no_data' => 'No data.',
'roles' => 'Roles', 'roles' => 'Roles',
'permissions' => 'Permissions', 'permissions' => 'Permissions',
'slug' => 'Slug', 'slug' => 'Slug',
'created_at' => 'Created At', 'created_at' => 'Created At',
'updated_at' => 'Updated At', 'updated_at' => 'Updated At',
'alert' => 'Alert', 'alert' => 'Alert',
'parent_id' => 'Parent', 'parent_id' => 'Parent',
'icon' => 'Icon', 'icon' => 'Icon',
'uri' => 'URI', 'uri' => 'URI',
'operation_log' => 'Operation log', 'operation_log' => 'Operation log',
'parent_select_error' => 'Parent select error', 'parent_select_error' => 'Parent select error',
'tree' => 'Tree', 'tree' => 'Tree',
'table' => 'Table', 'table' => 'Table',
'default' => 'Default', 'default' => 'Default',
'import' => 'Import', 'import' => 'Import',
'is_not_import' => 'No', 'is_not_import' => 'No',
'selected_options' => ':num options selected', 'selected_options' => ':num options selected',
'pagination' => [ 'pagination' => [
'range' => 'Showing :first to :last of :total entries', 'range' => 'Showing :first to :last of :total entries',
], ],
'role' => 'Role', 'role' => 'Role',
'permission' => 'Permission', 'permission' => 'Permission',
'route' => 'Route', 'route' => 'Route',
'confirm' => 'Confirm', 'confirm' => 'Confirm',
'cancel' => 'Cancel', 'cancel' => 'Cancel',
'selectall' => 'Select all', 'selectall' => 'Select all',
'http' => [ 'http' => [
'method' => 'HTTP method', 'method' => 'HTTP method',
'path' => 'HTTP path', 'path' => 'HTTP path',
], ],
'all_methods_if_empty' => 'All methods if empty', 'all_methods_if_empty' => 'All methods if empty',
'all' => 'All', 'all' => 'All',
'current_page' => 'Current page', 'current_page' => 'Current page',
'selected_rows' => 'Selected rows', 'selected_rows' => 'Selected rows',
'upload' => 'Upload', 'upload' => 'Upload',
'new_folder' => 'New folder', 'new_folder' => 'New folder',
'time' => 'Time', 'time' => 'Time',
'size' => 'Size', 'size' => 'Size',
'between_start' => 'Start', 'between_start' => 'Start',
'between_end' => 'End', 'between_end' => 'End',
'next_page' => 'Next', 'next_page' => 'Next',
'prev_page' => 'Previous', 'prev_page' => 'Previous',
'next_step' => 'Next', 'next_step' => 'Next',
'prev_step' => 'Previous', 'prev_step' => 'Previous',
'done' => 'Done', 'done' => 'Done',
'listbox' => [ 'listbox' => [
'text_total' => 'Showing all {0}', 'text_total' => 'Showing all {0}',
'text_empty' => 'Empty list', 'text_empty' => 'Empty list',
'filtered' => '{0} / {1}', 'filtered' => '{0} / {1}',
'filter_clear' => 'Show all', 'filter_clear' => 'Show all',
'filter_placeholder' => 'Filter', 'filter_placeholder' => 'Filter',
], ],
'responsive' => [ 'responsive' => [
'display_all' => 'Display all', 'display_all' => 'Display all',
'display' => 'Display', 'display' => 'Display',
'focus' => 'Focus', 'focus' => 'Focus',
], ],
'uploader' => [ 'uploader' => [
'add_new_media' => 'Browse', 'add_new_media' => 'Browse',
'drag_file' => 'Or drag file here', 'drag_file' => 'Or drag file here',
'max_file_limit' => 'The :attribute may not be greater than :max.', 'max_file_limit' => 'The :attribute may not be greater than :max.',
'exceed_size' => 'Exceeds the maximum file-size', 'exceed_size' => 'Exceeds the maximum file-size',
'interrupt' => 'Interrupt', 'interrupt' => 'Interrupt',
'upload_failed' => 'Upload failed! Please try again.', 'upload_failed' => 'Upload failed! Please try again.',
'selected_files' => ':num files selected,size: :size。', 'selected_files' => ':num files selected,size: :size。',
'selected_has_failed' => 'Uploaded: :success, failed: :fail, <a class="retry" href="javascript:"";">retry </a>or<a class="ignore" href="javascript:"";"> ignore</a>', 'selected_has_failed' => 'Uploaded: :success, failed: :fail, <a class="retry" href="javascript:"";">retry </a>or<a class="ignore" href="javascript:"";"> ignore</a>',
'selected_success' => ':num(:size) files selected, Uploaded: :success.', 'selected_success' => ':num(:size) files selected, Uploaded: :success.',
'dot' => ', ', 'dot' => ', ',
'failed_num' => 'failed::fail.', 'failed_num' => 'failed::fail.',
'pause_upload' => 'Pause', 'pause_upload' => 'Pause',
'go_on_upload' => 'Go On', 'go_on_upload' => 'Go On',
'start_upload' => 'Upload', 'start_upload' => 'Upload',
'upload_success_message' => ':success files uploaded successfully', 'upload_success_message' => ':success files uploaded successfully',
'go_on_add' => 'New File', 'go_on_add' => 'New File',
'Q_TYPE_DENIED' => 'Sorry, the type of this file is not allowed!', 'Q_TYPE_DENIED' => 'Sorry, the type of this file is not allowed!',
'Q_EXCEED_NUM_LIMIT' => 'Sorry, maximum number of allowable file uploads has been exceeded!', 'Q_EXCEED_NUM_LIMIT' => 'Sorry, maximum number of allowable file uploads has been exceeded!',
'F_EXCEED_SIZE' => 'Sorry,the maximum file-size has been exceeded!', 'F_EXCEED_SIZE' => 'Sorry,the maximum file-size has been exceeded!',
'Q_EXCEED_SIZE_LIMIT' => 'Sorry, the maximum file-size has been exceeded!', 'Q_EXCEED_SIZE_LIMIT' => 'Sorry, the maximum file-size has been exceeded!',
'F_DUPLICATE' => 'Duplicate file.', 'F_DUPLICATE' => 'Duplicate file.',
'confirm_delete_file' => 'Are you sure delete this file from server?', 'confirm_delete_file' => 'Are you sure delete this file from server?',
'dimensions' => 'The image dimensions is invalid.', 'dimensions' => 'The image dimensions is invalid.',
], ],
'import_extension_confirm' => 'Are you sure import the extension?', 'import_extension_confirm' => 'Are you sure import the extension?',
'quick_create' => 'Quick create', 'quick_create' => 'Quick create',
'grid_items_selected' => '{n} items selected', 'grid_items_selected' => '{n} items selected',
'nothing_updated' => 'Nothing has been updated.', 'nothing_updated' => 'Nothing has been updated.',
'welcome_back' => 'Welcome back, please login to your account.', 'welcome_back' => 'Welcome back, please login to your account.',
'documentation' => 'Documentation', 'documentation' => 'Documentation',
'demo' => 'Demo', 'demo' => 'Demo',
'extensions' => 'Extensions', 'extensions' => 'Extensions',
'version' => 'Version', 'version' => 'Version',
'current_version' => 'Current version', 'current_version' => 'Current version',
'latest_version' => 'Latest version', 'latest_version' => 'Latest version',
'upgrade_to_version' => 'Upgrade to version :version', 'upgrade_to_version' => 'Upgrade to version :version',
'enable' => 'Enable', 'enable' => 'Enable',
'disable' => 'Disable', 'disable' => 'Disable',
'uninstall' => 'Uninstall', 'uninstall' => 'Uninstall',
'confirm_uninstall' => 'Please confirm that you wish to uninstall this extension. This may result in potential data loss.', 'confirm_uninstall' => 'Please confirm that you wish to uninstall this extension. This may result in potential data loss.',
'marketplace' => 'Marketplace', 'marketplace' => 'Marketplace',
'theme' => 'Theme', 'theme' => 'Theme',
'application' => 'Application', 'application' => 'Application',
'install_from_local' => 'Install From Local', 'install_from_local' => 'Install From Local',
'install_succeeded' => 'Install succeeded !', 'install_succeeded' => 'Install succeeded !',
'invalid_extension_package' => 'Invalid extension package !', 'invalid_extension_package' => 'Invalid extension package !',
'copied' => 'Copied', 'copied' => 'Copied',
'auth_failed' => 'These credentials do not match our records.', 'auth_failed' => 'These credentials do not match our records.',
'validation' => [ 'validation' => [
'match' => 'The :attribute and :other must match.', 'match' => 'The :attribute and :other must match.',
'minlength' => 'The :attribute must be at least :min characters.', 'minlength' => 'The :attribute must be at least :min characters.',
'maxlength' => 'The :attribute may not be greater than :max characters.', 'maxlength' => 'The :attribute may not be greater than :max characters.',
], ],
'admin_setting' => 'setting',
'lang' => 'language',
'layout' => [
'color' => 'Theme Color',
'sidebar_style' => 'Sidebar Style',
'navbar_color' => 'Navbar Color'
],
]; ];
...@@ -2,228 +2,235 @@ ...@@ -2,228 +2,235 @@
return [ return [
'scaffold' => [ 'scaffold' => [
'header' => '代码生成器', 'header' => '代码生成器',
'choose' => '选择已有数据表', 'choose' => '选择已有数据表',
'table' => '表名', 'table' => '表名',
'model' => '模型', 'model' => '模型',
'controller' => '控制器', 'controller' => '控制器',
'repository' => '数据仓库', 'repository' => '数据仓库',
'add_field' => '添加字段', 'add_field' => '添加字段',
'pk' => '主键', 'pk' => '主键',
'soft_delete' => '软删除', 'soft_delete' => '软删除',
'create_migration' => '创建表迁移文件', 'create_migration' => '创建表迁移文件',
'create_model' => '创建模型', 'create_model' => '创建模型',
'create_repository' => '创建数据仓库', 'create_repository' => '创建数据仓库',
'create_controller' => '创建控制器', 'create_controller' => '创建控制器',
'run_migrate' => '创建数据表', 'run_migrate' => '创建数据表',
'create_lang' => '创建翻译文件', 'create_lang' => '创建翻译文件',
'field' => '字段', 'field' => '字段',
'translation' => '翻译', 'translation' => '翻译',
'comment' => '注释', 'comment' => '注释',
'default' => '默认值', 'default' => '默认值',
'field_name' => '字段名', 'field_name' => '字段名',
'type' => '类型', 'type' => '类型',
'nullable' => '允许空值', 'nullable' => '允许空值',
'key' => '索引', 'key' => '索引',
'translate_title' => '翻译标题', 'translate_title' => '翻译标题',
'sync_translation_with_comment' => '同步翻译与注释', 'sync_translation_with_comment' => '同步翻译与注释',
], ],
'client' => [ 'client' => [
'delete_confirm' => '确认删除?', 'delete_confirm' => '确认删除?',
'confirm' => '确认', 'confirm' => '确认',
'cancel' => '取消', 'cancel' => '取消',
'refresh_succeeded' => '刷新成功 !', 'refresh_succeeded' => '刷新成功 !',
'submit' => '提交', 'submit' => '提交',
'close' => '关闭', 'close' => '关闭',
'selected_options' => '已选中:num个选项', 'selected_options' => '已选中:num个选项',
'exceed_max_item' => '已超出最大可选数量', 'exceed_max_item' => '已超出最大可选数量',
'no_preview' => '预览失败', 'no_preview' => '预览失败',
'500' => '系统繁忙,请稍后再试!', '500' => '系统繁忙,请稍后再试!',
'403' => '对不起,您没有权限访问,请与管理员联系。', '403' => '对不起,您没有权限访问,请与管理员联系。',
'401' => '请登录!', '401' => '请登录!',
'419' => '对不起,当前页面已失效,请刷新浏览器。', '419' => '对不起,当前页面已失效,请刷新浏览器。',
], ],
'home' => '主页', 'home' => '主页',
'online' => '在线', 'online' => '在线',
'login' => '登录', 'login' => '登录',
'logout' => '登出', 'logout' => '登出',
'setting' => '设置', 'setting' => '设置',
'name' => '名称', 'name' => '名称',
'username' => '用户名', 'username' => '用户名',
'old_password' => '旧密码', 'old_password' => '旧密码',
'password' => '密码', 'password' => '密码',
'password_confirmation' => '确认密码', 'password_confirmation' => '确认密码',
'old_password_error' => '请输入正确的旧密码', 'old_password_error' => '请输入正确的旧密码',
'remember_me' => '记住我', 'remember_me' => '记住我',
'user_setting' => '用户设置', 'user_setting' => '用户设置',
'avatar' => '头像', 'avatar' => '头像',
'list' => '列表', 'list' => '列表',
'new' => '新增', 'new' => '新增',
'create' => '创建', 'create' => '创建',
'delete' => '删除', 'delete' => '删除',
'remove' => '移除', 'remove' => '移除',
'edit' => '编辑', 'edit' => '编辑',
'quick_edit' => '快捷编辑', 'quick_edit' => '快捷编辑',
'continue_editing' => '继续编辑', 'continue_editing' => '继续编辑',
'continue_creating' => '继续创建', 'continue_creating' => '继续创建',
'view' => '查看', 'view' => '查看',
'detail' => '详细', 'detail' => '详细',
'browse' => '浏览', 'browse' => '浏览',
'reset' => '重置', 'reset' => '重置',
'export' => '导出', 'export' => '导出',
'batch_delete' => '批量删除', 'batch_delete' => '批量删除',
'save' => '保存', 'save' => '保存',
'refresh' => '刷新', 'refresh' => '刷新',
'order' => '排序', 'order' => '排序',
'expand' => '展开', 'expand' => '展开',
'collapse' => '收起', 'collapse' => '收起',
'filter' => '筛选', 'filter' => '筛选',
'search' => '搜索', 'search' => '搜索',
'close' => '关闭', 'close' => '关闭',
'show' => '显示', 'show' => '显示',
'entries' => '条', 'entries' => '条',
'captcha' => '验证码', 'captcha' => '验证码',
'action' => '操作', 'action' => '操作',
'title' => '标题', 'title' => '标题',
'description' => '简介', 'description' => '简介',
'back' => '返回', 'back' => '返回',
'back_to_list' => '返回列表', 'back_to_list' => '返回列表',
'submit' => '提交', 'submit' => '提交',
'menu' => '菜单', 'menu' => '菜单',
'input' => '输入', 'input' => '输入',
'succeeded' => '成功', 'succeeded' => '成功',
'failed' => '失败', 'failed' => '失败',
'delete_confirm' => '确认删除?', 'delete_confirm' => '确认删除?',
'delete_succeeded' => '删除成功 !', 'delete_succeeded' => '删除成功 !',
'delete_failed' => '删除失败 !', 'delete_failed' => '删除失败 !',
'update_succeeded' => '更新成功 !', 'update_succeeded' => '更新成功 !',
'update_failed' => '更新失败 !', 'update_failed' => '更新失败 !',
'save_succeeded' => '保存成功 !', 'save_succeeded' => '保存成功 !',
'save_failed' => '保存失败 !', 'save_failed' => '保存失败 !',
'refresh_succeeded' => '刷新成功 !', 'refresh_succeeded' => '刷新成功 !',
'login_successful' => '登录成功 !', 'login_successful' => '登录成功 !',
'choose' => '选择', 'choose' => '选择',
'choose_file' => '选择文件', 'choose_file' => '选择文件',
'choose_image' => '选择图片', 'choose_image' => '选择图片',
'more' => '更多', 'more' => '更多',
'deny' => '无权访问', 'deny' => '无权访问',
'administrator' => '管理员', 'administrator' => '管理员',
'roles' => '角色', 'roles' => '角色',
'permissions' => '权限', 'permissions' => '权限',
'slug' => '标识', 'slug' => '标识',
'created_at' => '创建时间', 'created_at' => '创建时间',
'updated_at' => '更新时间', 'updated_at' => '更新时间',
'alert' => '注意', 'alert' => '注意',
'parent_id' => '父级', 'parent_id' => '父级',
'icon' => '图标', 'icon' => '图标',
'uri' => '路径', 'uri' => '路径',
'operation_log' => '操作日志', 'operation_log' => '操作日志',
'parent_select_error' => '父级选择错误', 'parent_select_error' => '父级选择错误',
'default' => '默认', 'default' => '默认',
'table' => '表格', 'table' => '表格',
'no_data' => '暂无数据', 'no_data' => '暂无数据',
'routes' => '路由', 'routes' => '路由',
'alias' => '别名', 'alias' => '别名',
'route_action' => '处理器', 'route_action' => '处理器',
'middleware' => '中间件', 'middleware' => '中间件',
'import' => '导入', 'import' => '导入',
'is_not_import' => '未导入', 'is_not_import' => '未导入',
'selected_options' => '已选中:num个选项', 'selected_options' => '已选中:num个选项',
'method' => '方法', 'method' => '方法',
'user' => '用户', 'user' => '用户',
'pagination' => [ 'pagination' => [
'range' => '从 :first 到 :last ,总共 :total 条', 'range' => '从 :first 到 :last ,总共 :total 条',
], ],
'role' => '角色', 'role' => '角色',
'permission' => '权限', 'permission' => '权限',
'route' => '路由', 'route' => '路由',
'confirm' => '确认', 'confirm' => '确认',
'cancel' => '取消', 'cancel' => '取消',
'selectall' => '全选', 'selectall' => '全选',
'http' => [ 'http' => [
'method' => 'HTTP方法', 'method' => 'HTTP方法',
'path' => 'HTTP路径', 'path' => 'HTTP路径',
], ],
'all_methods_if_empty' => '为空默认为所有方法', 'all_methods_if_empty' => '为空默认为所有方法',
'all' => '全部', 'all' => '全部',
'current_page' => '当前页', 'current_page' => '当前页',
'selected_rows' => '选择的行', 'selected_rows' => '选择的行',
'upload' => '上传', 'upload' => '上传',
'new_folder' => '新建文件夹', 'new_folder' => '新建文件夹',
'time' => '时间', 'time' => '时间',
'size' => '大小', 'size' => '大小',
'between_start' => '起始', 'between_start' => '起始',
'between_end' => '结束', 'between_end' => '结束',
'next_page' => '下一页', 'next_page' => '下一页',
'prev_page' => '上一页', 'prev_page' => '上一页',
'next_step' => '下一步', 'next_step' => '下一步',
'prev_step' => '上一步', 'prev_step' => '上一步',
'done' => '完成', 'done' => '完成',
'listbox' => [ 'listbox' => [
'text_total' => '总共 {0} 项', 'text_total' => '总共 {0} 项',
'text_empty' => '空列表', 'text_empty' => '空列表',
'filtered' => '{0} / {1}', 'filtered' => '{0} / {1}',
'filter_clear' => '显示全部', 'filter_clear' => '显示全部',
'filter_placeholder' => '过滤', 'filter_placeholder' => '过滤',
], ],
'responsive' => [ 'responsive' => [
'display_all' => '显示全部', 'display_all' => '显示全部',
'display' => '字段', 'display' => '字段',
'focus' => '聚焦', 'focus' => '聚焦',
], ],
'uploader' => [ 'uploader' => [
'add_new_media' => '添加文件', 'add_new_media' => '添加文件',
'drag_file' => '或将文件拖到这里', 'drag_file' => '或将文件拖到这里',
'max_file_limit' => 'The :attribute may not be greater than :max.', 'max_file_limit' => 'The :attribute may not be greater than :max.',
'exceed_size' => '文件大小超出', 'exceed_size' => '文件大小超出',
'interrupt' => '上传暂停', 'interrupt' => '上传暂停',
'upload_failed' => '上传失败,请重试', 'upload_failed' => '上传失败,请重试',
'selected_files' => '选中:num个文件,共:size。', 'selected_files' => '选中:num个文件,共:size。',
'selected_has_failed' => '已成功上传:success个文件,:fail个文件上传失败,<a class="retry" href="javascript:"";">重新上传</a>失败文件或<a class="ignore" href="javascript:"";">忽略</a>', 'selected_has_failed' => '已成功上传:success个文件,:fail个文件上传失败,<a class="retry" href="javascript:"";">重新上传</a>失败文件或<a class="ignore" href="javascript:"";">忽略</a>',
'selected_success' => '共:num个(:size),已上传:success个。', 'selected_success' => '共:num个(:size),已上传:success个。',
'dot' => ',', 'dot' => ',',
'failed_num' => '失败:fail个。', 'failed_num' => '失败:fail个。',
'pause_upload' => '暂停上传', 'pause_upload' => '暂停上传',
'go_on_upload' => '继续上传', 'go_on_upload' => '继续上传',
'start_upload' => '开始上传', 'start_upload' => '开始上传',
'upload_success_message' => '已成功上传:success个文件', 'upload_success_message' => '已成功上传:success个文件',
'go_on_add' => '继续添加', 'go_on_add' => '继续添加',
'Q_TYPE_DENIED' => '对不起,不允许上传此类型文件', 'Q_TYPE_DENIED' => '对不起,不允许上传此类型文件',
'Q_EXCEED_NUM_LIMIT' => '对不起,已超出文件上传数量限制,最多只能上传:num个文件', 'Q_EXCEED_NUM_LIMIT' => '对不起,已超出文件上传数量限制,最多只能上传:num个文件',
'F_EXCEED_SIZE' => '对不起,当前选择的文件过大', 'F_EXCEED_SIZE' => '对不起,当前选择的文件过大',
'Q_EXCEED_SIZE_LIMIT' => '对不起,已超出文件大小限制', 'Q_EXCEED_SIZE_LIMIT' => '对不起,已超出文件大小限制',
'F_DUPLICATE' => '文件重复', 'F_DUPLICATE' => '文件重复',
'confirm_delete_file' => '您确定要删除这个文件吗?', 'confirm_delete_file' => '您确定要删除这个文件吗?',
'dimensions' => '图片规格不正确', 'dimensions' => '图片规格不正确',
], ],
'import_extension_confirm' => '确认导入拓展?', 'import_extension_confirm' => '确认导入拓展?',
'quick_create' => '快速创建', 'quick_create' => '快速创建',
'grid_items_selected' => '已选择 {n} 项', 'grid_items_selected' => '已选择 {n} 项',
'nothing_updated' => '没有任何数据被更改', 'nothing_updated' => '没有任何数据被更改',
'welcome_back' => '欢迎回来,请登录您的账号。', 'welcome_back' => '欢迎回来,请登录您的账号。',
'documentation' => '文档', 'documentation' => '文档',
'demo' => '示例', 'demo' => '示例',
'extensions' => '扩展', 'extensions' => '扩展',
'version' => '版本', 'version' => '版本',
'current_version' => '当前版本', 'current_version' => '当前版本',
'latest_version' => '最新版本', 'latest_version' => '最新版本',
'upgrade_to_version' => '更新至版本 :version', 'upgrade_to_version' => '更新至版本 :version',
'enable' => '启用', 'enable' => '启用',
'disable' => '禁用', 'disable' => '禁用',
'uninstall' => '卸载', 'uninstall' => '卸载',
'confirm_uninstall' => '您确定要卸载当前扩展吗?此操作将会移除扩展数据!', 'confirm_uninstall' => '您确定要卸载当前扩展吗?此操作将会移除扩展数据!',
'marketplace' => '应用市场', 'marketplace' => '应用市场',
'theme' => '主题', 'theme' => '主题',
'application' => '应用', 'application' => '应用',
'install_from_local' => '本地安装', 'install_from_local' => '本地安装',
'install_succeeded' => '安装成功', 'install_succeeded' => '安装成功',
'invalid_extension_package' => '安装包异常', 'invalid_extension_package' => '安装包异常',
'copied' => '已复制', 'copied' => '已复制',
'auth_failed' => '账号或密码错误', 'auth_failed' => '账号或密码错误',
'validation' => [ 'validation' => [
'match' => '与 :attribute 不匹配。', 'match' => '与 :attribute 不匹配。',
'minlength' => ':attribute 字符长度不能少于 :min。', 'minlength' => ':attribute 字符长度不能少于 :min。',
'maxlength' => ':attribute 字符长度不能超出 :max。', 'maxlength' => ':attribute 字符长度不能超出 :max。',
], ],
'admin_setting' => '设置',
'lang' => '语言',
'layout' => [
'color' => '主题颜色',
'sidebar_style' => '菜单样式',
'navbar_color' => '顶部栏颜色'
]
]; ];
...@@ -2,16 +2,17 @@ ...@@ -2,16 +2,17 @@
return [ return [
'titles' => [ 'titles' => [
'index' => '主页', 'index' => '主页',
'admin' => '系统', 'admin' => '系统',
'users' => '管理员', 'users' => '管理员',
'roles' => '角色', 'roles' => '角色',
'permission' => '权限', 'permission' => '权限',
'menu' => '菜单', 'menu' => '菜单',
'operation_log' => '操作日志', 'operation_log' => '操作日志',
'helpers' => '开发工具', 'helpers' => '开发工具',
'extensions' => '扩展', 'extensions' => '扩展',
'scaffold' => '代码生成器', 'scaffold' => '代码生成器',
'icons' => '图标', 'icons' => '图标',
'userAddress' => '用户地址',
], ],
]; ];
<style>
.row {
margin: 0;
}
.col-md-12,
.col-md-3 {
padding: 0;
}
@media screen and (min-width: 1000px) and (max-width: 1150px) {
.col-lg-3,
.col-lg-9 {
flex: 0 0 50%;
max-width: 50%;
}
}
@media screen and (min-width: 1151px) and (max-width: 1300px) {
.col-lg-3 {
flex: 0 0 40%;
max-width: 40%;
}
.col-lg-9 {
flex: 0 0 60%;
max-width: 60%;
}
}
@media screen and (min-width: 1301px) and (max-width: 1700px) {
.col-lg-3 {
flex: 0 0 35%;
max-width: 35%;
}
.col-lg-9 {
flex: 0 0 65%;
max-width: 65%;
}
}
.login-page {
height: auto;
}
.login-main {
position: relative;
display: flex;
min-height: 100vh;
flex-direction: row;
align-items: stretch;
margin: 0;
}
.login-main .login-page {
background-color: #fff;
}
.login-main .card {
box-shadow: none;
}
.login-main .auth-brand {
margin: 4rem 0 4rem;
font-size: 26px;
width: 325px;
}
@media (max-width: 576px) {
.login-main .auth-brand {
width: 90%;
margin-left: 24px
}
}
.login-main .login-logo {
font-size: 2.1rem;
font-weight: 300;
margin-bottom: 0.9rem;
text-align: left;
margin-left: 20px;
}
.login-main .login-box-msg {
margin: 0;
padding: 0 0 20px;
font-size: 0.9rem;
font-weight: 400;
text-align: left;
}
.login-main .btn {
width: 100%;
}
.login-page-right {
padding: 6rem 3rem;
flex: 1;
position: relative;
color: #fff;
background-color: rgba(0, 0, 0, 0.3);
text-align: center !important;
background: url(/vendor/dcat-admin/images/pages/login/bg.jpg) center;
background-size: cover;
}
.login-description {
position: absolute;
margin: 0 auto;
padding: 0 1.75rem;
bottom: 3rem;
left: 0;
right: 0;
}
.content-front {
position: absolute;
left: 0;
right: 0;
height: 100vh;
background: rgba(0,0,0,.1);
margin-top: -6rem;
}
body.dark-mode .content-front {
background: rgba(0,0,0,.3);
}
body.dark-mode .auth-brand {
color: #cacbd6
}
</style>
<div class="row login-main">
<div class="col-lg-3 col-12 bg-white">
<div class="login-page">
<div class="auth-brand text-lg-left">
{!! config('admin.logo') !!}
</div>
<div class="login-box">
<div class="login-logo mb-2">
<h4 class="mt-0"></h4>
<p class="login-box-msg mt-1 mb-1">{{ __('admin.welcome_back') }}</p>
</div>
<div class="card">
<div class="card-body login-card-body">
<form id="login-form" method="POST" action="{{ admin_url('auth/login') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<fieldset class="form-label-group form-group position-relative has-icon-left">
<input
type="text"
class="form-control {{ $errors->has('username') ? 'is-invalid' : '' }}"
name="username"
placeholder="{{ trans('admin.username') }}"
value="admin"
required
autofocus
>
<div class="form-control-position">
<i class="feather icon-user"></i>
</div>
<label for="email">{{ trans('admin.username') }}</label>
<div class="help-block with-errors"></div>
@if($errors->has('username'))
<span class="invalid-feedback text-danger" role="alert">
@foreach($errors->get('username') as $message)
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> {{$message}}</span><br>
@endforeach
</span>
@endif
</fieldset>
<br/>
<fieldset class="form-label-group form-group position-relative has-icon-left">
<input
minlength="5"
maxlength="20"
id="password"
type="password"
class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}"
name="password"
placeholder="{{ trans('admin.password') }}"
required
value="admin"
autocomplete="current-password"
>
<div class="form-control-position">
<i class="feather icon-lock"></i>
</div>
<label for="password">{{ trans('admin.password') }}</label>
<div class="help-block with-errors"></div>
@if($errors->has('password'))
<span class="invalid-feedback text-danger" role="alert">
@foreach($errors->get('password') as $message)
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> {{$message}}</span><br>
@endforeach
</span>
@endif
</fieldset>
<div class="form-group d-flex justify-content-between align-items-center">
<div class="text-left">
<fieldset class="checkbox">
<div class="vs-checkbox-con vs-checkbox-primary">
<input id="remember" name="remember" value="1" type="checkbox" {{ old('remember') ? 'checked' : '' }}>
<span class="vs-checkbox">
<span class="vs-checkbox--check">
<i class="vs-icon feather icon-check"></i>
</span>
</span>
<span> {{ trans('admin.remember_me') }}</span>
</div>
</fieldset>
</div>
</div>
<button type="submit" class="btn btn-primary float-right login-btn">
{{ __('admin.login') }}
&nbsp;
<i class="feather icon-arrow-right"></i>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-9 col-12 login-page-right">
<div class="content-front"></div>
<div class="login-description">
<p class="lead">
十分钟内构建一个功能完善的高颜值后台系统。
</p>
<p>
Dcat Admin
</p>
</div>
</div>
</div>
<script>
Dcat.ready(function () {
// ajax表单提交
$('#login-form').form({
validate: true,
});
});
</script>
<ul class="nav navbar-nav">
<li class="dropdown dropdown-notification nav-item">
<a class="nav-link nav-link-label" href="#" data-toggle="dropdown" aria-expanded="true"><i class="ficon feather icon-bell"></i><span class="badge badge-pill badge-primary badge-up">5</span></a>
<ul class="dropdown-menu dropdown-menu-media dropdown-menu-right ">
<li class="dropdown-menu-header">
<div class="dropdown-header m-0 p-2">
<h3 class="white">5 New</h3><span class="grey darken-2">App Notifications</span>
</div>
</li>
<li class="scrollable-container media-list ps ps--active-y">
<a class="d-flex justify-content-between" href="javascript:void(0)">
<div class="media d-flex align-items-start">
<div class="media-left"><i class="feather icon-plus-square font-medium-5 primary"></i></div>
<div class="media-body">
<h6 class="primary media-heading">You have new order!</h6><small class="notification-text"> Are
your going to meet me
tonight?</small>
</div><small>
<time class="media-meta" datetime="2015-06-11T18:29:20+08:00">9 hours
ago</time></small>
</div>
</a><a class="d-flex justify-content-between" href="javascript:void(0)">
<div class="media d-flex align-items-start">
<div class="media-left"><i class="feather icon-download-cloud font-medium-5 success"></i></div>
<div class="media-body">
<h6 class="success media-heading red darken-1">99% Server load</h6>
<small class="notification-text">You got new order of goods.</small>
</div><small>
<time class="media-meta" datetime="2015-06-11T18:29:20+08:00">5 hour
ago</time></small>
</div>
</a><a class="d-flex justify-content-between" href="javascript:void(0)">
<div class="media d-flex align-items-start">
<div class="media-left"><i class="feather icon-alert-triangle font-medium-5 danger"></i></div>
<div class="media-body">
<h6 class="danger media-heading yellow darken-3">Warning notifixation
</h6><small class="notification-text">Server have 99% CPU usage.</small>
</div><small>
<time class="media-meta" datetime="2015-06-11T18:29:20+08:00">Today</time></small>
</div>
</a>
<div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px; height: 254px;"><div class="ps__thumb-y" tabindex="0" style="top: 0px; height: 184px;"></div></div></li>
<li class="dropdown-menu-footer"><a class="dropdown-item p-1 text-center" href="javascript:void(0)">Read
all notifications</a></li>
</ul>
</li>
</ul>
\ No newline at end of file
<ul class="nav navbar-nav">
<li class="dropdown dropdown-language nav-item">
<a class="dropdown-toggle nav-link" href="#" id="dropdown-flag" data-toggle="dropdown">
<i class="flag-icon flag-icon-us"></i>
<span class="selected-language">English</span>
</a>
<ul class="dropdown-menu" aria-labelledby="dropdown-flag">
<li class="dropdown-item" href="#" data-language="en">
<a><i class="flag-icon flag-icon-us"></i> English</a>
</li>
<li class="dropdown-item" href="#" data-language="fr">
<a><i class="flag-icon flag-icon-fr"></i> French</a>
</li>
<lia class="dropdown-item" href="#" data-language="de">
<a><i class="flag-icon flag-icon-de"></i> German</a>
</lia>
</ul>
</li>
</ul>
\ No newline at end of file
<style>
.color-block {
width: 100px;
height: 20px;
background: #5c6bc6;
display: inline-block;
border-radius: .1rem;
color: white;
font-size: 13px;
text-align: center;
line-height: 20px;
}
.block-sm {
width: 40px;
}
</style>
<ul class="nav navbar-nav">
<li class="dropdown dropdown-language nav-item">
<a class="dropdown-toggle nav-link" href="#" id="dropdown-color" data-toggle="dropdown">
<span class="color-block" style="background: {{ $map[request()->get('_color_')] ?? \Dcat\Admin\Admin::color()->indigo() }}">
主题
</span>
</a>
<ul class="dropdown-menu" aria-labelledby="dropdown-color">
<li class="dropdown-item" href="#" data-language="en">
<a class="switch-color" data-value="indigo">
<span class="color-block" style="background: {{ \Dcat\Admin\Admin::color()->indigo() }}">indigo</span>
</a>
</li>
<li class="dropdown-item" href="#" data-language="fr">
<a class="switch-color" data-value="blue">
<span class="color-block" style="background: #5686d4">blue</span>
</a>
</li>
<lia class="dropdown-item" href="#" data-language="de">
<a class="switch-color" data-value="blue-dark">
<span class="color-block" style="background: #5686d4">
blue-dark
</span>
</a>
</lia>
</ul>
</li>
</ul>
<script>
Dcat.ready(function () {
$('.switch-color').click(function (e) {
window.location.href = '{{ admin_url('/') }}?_color_='+$(this).data('value');
})
});
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment