jqh 4 years ago
parent
commit
88887b66b8
2 changed files with 31 additions and 91 deletions
  1. 2 2
      tests/Feature/InstallTest.php
  2. 29 89
      tests/resources/config/admin.php

+ 2 - 2
tests/Feature/InstallTest.php

@@ -32,7 +32,7 @@ class InstallTest extends TestCase
         $this->assertFileExists(public_path(Admin::asset()->getRealPath('@admin')));
         $this->assertFileExists(database_path('migrations/2016_01_04_173148_create_admin_tables.php'));
         $this->assertFileExists(resource_path('lang/en/admin.php'));
-        $this->assertFileExists(resource_path('lang/zh-CN/admin.php'));
-        $this->assertFileExists(resource_path('lang/zh-CN/global.php'));
+        $this->assertFileExists(resource_path('lang/zh_CN/admin.php'));
+        $this->assertFileExists(resource_path('lang/zh_CN/global.php'));
     }
 }

+ 29 - 89
tests/resources/config/admin.php

@@ -22,7 +22,7 @@ return [
     | `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'.
     |
     */
-    'logo' => '<span>Dcat</span> Admin',
+    'logo' => '<img src="/vendor/dcat-admin/images/logo.png" width="35"> &nbsp;Dcat Admin',
 
     /*
     |--------------------------------------------------------------------------
@@ -34,7 +34,17 @@ return [
     | '<img src="http://logo-url" alt="Admin logo">'.
     |
     */
-    'logo-mini' => 'Da',
+    'logo-mini' => '<img src="/vendor/dcat-admin/images/logo.png">',
+
+    /*
+     |--------------------------------------------------------------------------
+     | User default avatar
+     |--------------------------------------------------------------------------
+     |
+     | Set a default avatar for newly created users.
+     |
+     */
+    'default_avatar' => '@admin/images/default-avatar.jpg',
 
     /*
     |--------------------------------------------------------------------------
@@ -85,14 +95,6 @@ return [
    */
     'assets_server' => env('ADMIN_ASSETS_SERVER'),
 
-    /*
-    |--------------------------------------------------------------------------
-    | Cdn setting
-    |--------------------------------------------------------------------------
-    |
-   */
-    'cdn' => env('ADMIN_CDN', false),
-
     /*
     |--------------------------------------------------------------------------
     | Access via `https`
@@ -117,7 +119,7 @@ return [
     'auth' => [
         'enable' => true,
 
-        'controller' => Dcat\Admin\Controllers\AuthController::class,
+        'controller' => App\Admin\Controllers\AuthController::class,
 
         'guard' => 'admin',
 
@@ -219,7 +221,7 @@ return [
     'upload' => [
 
         // Disk in `config/filesystem.php`.
-        'disk' => 'admin',
+        'disk' => 'public',
 
         // Image and file upload path under the disk above.
         'directory' => [
@@ -258,52 +260,15 @@ return [
         'menu_model' => Dcat\Admin\Models\Menu::class,
 
         // Pivot table for table above.
-        'operation_log_table'    => 'admin_operation_log',
-        'user_permissions_table' => 'admin_user_permissions',
         'role_users_table'       => 'admin_role_users',
         'role_permissions_table' => 'admin_role_permissions',
         'role_menu_table'        => 'admin_role_menu',
         'permission_menu_table'  => 'admin_permission_menu',
+        'settings_table'         => 'admin_settings',
+        'extensions_table'       => 'admin_extensions',
+        'extension_histories_table' => 'admin_extension_histories',
     ],
 
-    /*
-    |--------------------------------------------------------------------------
-    | User operation log setting
-    |--------------------------------------------------------------------------
-    |
-    | By setting this option to open or close operation log in dcat-admin.
-    |
-    */
-    'operation_log' => [
-
-        'enable' => true,
-
-        // Only logging allowed methods in the list
-        'allowed_methods' => ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'],
-
-        'secret_fields' => [
-            'password',
-            'password_confirmation',
-        ],
-
-        // Routes that will not log to database.
-        // All method to path like: auth/logs/*/edit
-        // or specific method to path like: get:auth/logs.
-        'except' => [
-            'auth/logs*',
-        ],
-    ],
-
-    /*
-    |--------------------------------------------------------------------------
-    | Admin map field provider
-    |--------------------------------------------------------------------------
-    |
-    | Supported: "tencent", "google", "yandex".
-    |
-    */
-    'map_provider' => 'google',
-
     /*
     |--------------------------------------------------------------------------
     | Application layout
@@ -312,42 +277,29 @@ return [
     | This value is the layout of admin pages.
     */
     'layout' => [
-        // vertical, horizontal
-        'mainLayout_type' => 'vertical',
+        // default, blue, blue-light, green
+        'color' => 'default',
 
         'body_class' => '',
 
         'sidebar_collapsed' => false,
 
-        'blank_page' => false,
+        // light, primary, dark
+        'sidebar_style' => 'light',
+
+        'dark_mode_switch' => false,
 
         // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
         'navbar_color' => '',
-
-        // floating, static, sticky, hidden
-        'vertical_menu_navbar_type' => 'floating',
-
-        // static, sticky, hidden
-        'footer_type' => 'static',
     ],
 
-    /*
-    |--------------------------------------------------------------------------
-    | Login page background image
-    |--------------------------------------------------------------------------
-    |
-    | This value is used to set the background image of login page.
-    |
-    */
-    'login_background_image' => '',
-
     /*
     |--------------------------------------------------------------------------
     | The exception handler class
     |--------------------------------------------------------------------------
     |
     */
-    'exception_handler' => \Dcat\Admin\Exception\Handler::class,
+    'exception_handler' => Dcat\Admin\Exception\Handler::class,
 
     /*
     |--------------------------------------------------------------------------
@@ -360,24 +312,12 @@ return [
 
     /*
     |--------------------------------------------------------------------------
-    | Extension Directory
-    |--------------------------------------------------------------------------
-    |
-    | When you use command `php artisan admin:extend` to generate extensions,
-    | the extension files will be generated in this directory.
-    */
-    'extension_dir' => app_path('Admin/Extensions'),
-
-    /*
-    |--------------------------------------------------------------------------
-    | Settings for extensions.
+    | Extension
     |--------------------------------------------------------------------------
-    |
-    | You can find all available extensions here
-    | https://github.com/dcat-admin-extensions.
-    |
     */
-    'extensions' => [
-
+    'extension' => [
+        // When you use command `php artisan admin:ext-make` to generate extensions,
+        // the extension files will be generated in this directory.
+        'dir' => base_path('dcat-admin-extensions'),
     ],
 ];