51 lines
1.9 KiB
PHP
51 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
use Slowlyo\OwlAdmin\Controllers\IndexController as BaseController;
|
|
use Slowlyo\OwlAdmin\Admin;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Slowlyo\OwlAdmin\Models\Extension;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class IndexController extends BaseController
|
|
{
|
|
public function settings(): JsonResponse|JsonResource
|
|
{
|
|
return $this->response()->success([
|
|
'nav' => Admin::getNav(),
|
|
'assets' => Admin::getAssets(),
|
|
'app_name' => config('admin.name'),
|
|
'locale' => config('app.locale'),
|
|
'layout' => config('admin.layout'),
|
|
'logo' => url(config('admin.logo')),
|
|
|
|
'login_captcha' => config('admin.auth.login_captcha'),
|
|
'show_development_tools' => config('admin.show_development_tools'),
|
|
'system_theme_setting' => array_merge(
|
|
Admin::setting()->get('system_theme_setting', []),
|
|
[
|
|
"animateInDuration"=> 550,
|
|
"animateInType"=> "alpha",
|
|
"animateOutDuration" => 450,
|
|
"animateOutType"=> "alpha",
|
|
"breadcrumb"=> true,
|
|
"breadcrumbIcon" => false,
|
|
"footer"=> false,
|
|
"keepAlive"=> false,
|
|
"layoutMode"=> "default",
|
|
"loginTemplate"=> "default",
|
|
"menuWidth"=> 220,
|
|
"siderTheme"=>"light",
|
|
"theme"=>"light",
|
|
"themeColor"=>"#4080FF",
|
|
"topTheme"=> "light",
|
|
'enableTab' => config('admin.layout.tab_enable'),
|
|
'tabIcon' => config('admin.layout.tab_icon'),
|
|
]
|
|
),
|
|
'enabled_extensions' => Extension::query()->where('is_enabled', 1)->pluck('name')?->toArray(),
|
|
]);
|
|
}
|
|
}
|