jqh hace 5 años
padre
commit
676576b839

+ 1 - 0
resources/lang/en/admin.php

@@ -190,6 +190,7 @@ return [
     'quick_create'             => 'Quick create',
     'grid_items_selected'      => '{n} items selected',
     'nothing_updated'          => 'Nothing has been updated.',
+    'welcome_back'             => 'Welcome back, please login to your account.',
     'validation'               => [
         'match'     => 'The :attribute and :other must match.',
         'minlength' => 'The :attribute must be at least :min characters.',

+ 1 - 0
resources/lang/zh-CN/admin.php

@@ -191,6 +191,7 @@ return [
     'quick_create'             => '快速创建',
     'grid_items_selected'      => '已选择 {n} 项',
     'nothing_updated'          => '没有任何数据被更改',
+    'welcome_back'             => '欢迎回来,请登录您的账号。',
     'validation'               => [
         'match'     => '与 :attribute 不匹配。',
         'minlength' => ':attribute 字符长度不能少于 :min。',

+ 5 - 7
resources/views/pages/login.blade.php

@@ -2,23 +2,21 @@
     html body {background: #fff;}
 </style>
 
-<link rel="stylesheet" href="{{ admin_asset('@admin/css/pages/authentication.css') }}">
-
 <section class="row flexbox-container">
     <div class="col-xl-8 col-11 d-flex justify-content-center">
         <div class="card bg-authentication rounded-0 mb-0">
             <div class="row m-0">
-                <div class="col-lg-6 d-lg-block d-none text-center align-self-center px-1 py-0">
+                <div class="col-lg-6 d-lg-block d-none text-center align-self-center px-1 py-0" style="min-width: 240px">
                     <img src="{{ admin_asset('@admin/images/pages/login.png') }}" alt="branding logo">
                 </div>
                 <div class="col-lg-6 col-12 p-0">
-                    <div class="card rounded-0 mb-0 px-2">
-                        <div class="card-header pb-1">
+                    <div class="card rounded-0 mb-0 px-2" style="min-width: 400px">
+                        <div class="card-header pb-1 justify-content-center">
                             <div class="card-title">
-                                <h4 class="mb-0">{{ __('admin.login') }}</h4>
+                                <h4 class="m-auto">{{ config('admin.name') }}</h4>
                             </div>
                         </div>
-                        <p class="px-2">Welcome back, please login to your account.</p>
+                        <p class="px-2 text-center">{{ __('admin.welcome_back') }}</p>
                         <div class="card-content">
                             <div class="card-body pt-1">
                                 <form id="login-form" method="POST" action="{{ admin_url('auth/login') }}">

+ 9 - 0
src/Controllers/AuthController.php

@@ -23,6 +23,13 @@ class AuthController extends Controller
      */
     protected $view = 'admin::pages.login';
 
+    /**
+     * @var array
+     */
+    protected $css = [
+        '@admin/css/pages/authentication.css',
+    ];
+
     /**
      * @var string
      */
@@ -39,6 +46,8 @@ class AuthController extends Controller
             return redirect($this->redirectPath());
         }
 
+        Admin::css($this->css);
+
         return $content->full()->body(view($this->view));
     }