Skip to content

Commit 5ecd1f6

Browse files
committed
feat: banner nav optimized
1 parent 1a775f3 commit 5ecd1f6

File tree

60 files changed

+855
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+855
-142
lines changed

config/database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
'database' => env('DB_DATABASE', 'forge'),
6060
'username' => env('DB_USERNAME', 'forge'),
6161
'password' => env('DB_PASSWORD', ''),
62-
'charset' => 'utf8',
63-
'collation' => 'utf8_unicode_ci',
62+
'charset' => 'utf8mb4',
63+
'collation' => 'utf8mb4_unicode_ci',
6464
'prefix' => env('DB_PREFIX'),
6565
'strict' => true,
6666
],

module/AdminManager/Traits/AdminDashboardTrait.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ public function dashboard()
1616
{
1717

1818
$page = app(AdminPage::class);
19-
$page->pageTitle(L('Dashboard'))
20-
->row(new SecurityTooltipBox())
21-
->append(new Row(function (Row $row) {
22-
AdminWidgetDashboard::callIcon($row);
23-
}));
19+
$page->pageTitle(L('Dashboard'));
20+
$page->row(new SecurityTooltipBox());
21+
$page->append(new Row(function (Row $row) {
22+
AdminWidgetDashboard::callIcon($row);
23+
}));
2424
AdminWidgetDashboard::call($page);
2525
$page->append(new ServerInfoWidget());
2626
return $page;

module/AdminManager/View/widget/serverInfo.blade.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<div class="ub-panel ub-cover">
22
<div class="head">
3-
<div class="title">服务器信息</div>
3+
<div class="title">
4+
<i class="iconfont icon-desktop"></i>
5+
服务器信息
6+
</div>
47
</div>
58
<div class="body">
69
<table class="ub-table tw-font-mono">

module/Banner/Asset/style/banner.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

module/Banner/Biz/BannerPositionBiz.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ class BannerPositionBiz
1010
{
1111
use BizTrait;
1212

13+
public static function registerQuick($name, $title)
14+
{
15+
self::register(QuickBannerPositionBiz::make($name, $title));
16+
}
17+
1318

1419
public static function all()
1520
{

module/Partner/Biz/PartnerPositionBiz.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ class PartnerPositionBiz
1010
{
1111
use BizTrait;
1212

13+
public static function registerQuick($name, $title)
14+
{
15+
self::register(QuickPartnerPositionBiz::make($name, $title));
16+
}
17+
1318

1419
public static function all()
1520
{

module/Vendor/Admin/Config/AdminWidgetDashboard.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,17 @@
1111

1212
class AdminWidgetDashboard
1313
{
14-
private static $todo = [];
1514
private static $icon = [];
1615
private static $foot = [];
1716

17+
1818
public static function registerTodo($closure)
1919
{
20-
self::$todo[] = $closure;
2120
}
2221

22+
2323
public static function callTodo(Row $row)
2424
{
25-
foreach (self::$todo as $item) {
26-
call_user_func_array($item, [$row]);
27-
}
2825
}
2926

3027
public static function registerIcon($closure)
@@ -53,12 +50,13 @@ public static function call(AdminPage $page)
5350
if ($cnt > 0) {
5451
$url = $provider->verifyUrl();
5552
$title = $provider->title();
56-
$verifyHtml[] = "<a class='tw-mr-4 tw-inline-block' href='$url'>$title<span class='ub-text-danger'>$cnt</span>条</a>";
53+
$verifyHtml[] = "<a class='tw-mr-2 tw-mb-2 tw-inline-block tw-bg-yellow-100 tw-text-yellow-600 tw-py-1 tw-px-2 tw-rounded-2xl'
54+
href='$url' data-tab-open data-tab-title='$title'>$title <span class='ub-text-danger tw-font-bold'>$cnt</span> 条</a>";
5755
}
5856
}
5957
}
6058
if (!empty($verifyHtml)) {
61-
$page->row(Box::make(join("", $verifyHtml), '待审核'));
59+
$page->row(Box::make(join("", $verifyHtml), '<i class="iconfont icon-details"></i> 待审核'));
6260
}
6361

6462
foreach (self::$foot as $item) {

module/Vendor/Docs/release.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 3.9.0
2+
3+
- 新增:短信发送任务
4+
- 新增:系统安装新增curl、zip扩展检测
5+
- 新增:后台待审核链接在新标签页打开
6+
7+
---
8+
19
## 3.8.0 内容审核优化,二次验证基础工具,导入页面兼容多标签
210

311
- 新增:后台二次安全验证方式工具类

module/Vendor/Email/MailSendJob.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ public static function createHtml($email, $subject, $html, $emailUserName = null
4343
app('Illuminate\Contracts\Bus\Dispatcher')->dispatch($job);
4444
}
4545

46+
public static function createModule($module, $template, $email, $subject, $templateData = [], $emailUserName = null, $option = [], $delay = 0)
47+
{
48+
self::create($email, $subject, $template, $templateData, $emailUserName, $option, $delay, $module);
49+
}
50+
4651
public static function create($email, $subject, $template, $templateData = [], $emailUserName = null, $option = [], $delay = 0, $module = null)
4752
{
4853
self::checkConfig();
@@ -65,7 +70,7 @@ public function handle()
6570
$provider = app()->config->get('EmailSenderProvider');
6671

6772
$instance = MailSenderProvider::get($provider);
68-
Logger::info('Email', 'Start', $this->email . ' -> ' . $this->subject . ' -> ' . $this->template);
73+
Logger::info('Email', 'Start', $this->email . ' - ' . $this->subject . ' - ' . $this->template);
6974

7075
switch ($this->type) {
7176
case 'html':
@@ -99,6 +104,6 @@ public function handle()
99104
BizException::throwsIfEmpty('MailSendJob.HtmlEmpty', $html);
100105
$ret = $instance->send($this->email, $this->emailUserName, $this->subject, $html);
101106
BizException::throwsIfResponseError($ret);
102-
Logger::info('Email', 'End', $this->email . ' -> ' . $this->subject);
107+
Logger::info('Email', 'End', $this->email . ' - ' . $this->subject);
103108
}
104109
}

module/Vendor/Provider/Schedule/ScheduleProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Console\Scheduling\Schedule;
88
use ModStart\Core\Dao\ModelUtil;
99
use ModStart\Core\Util\RandomUtil;
10+
use ModStart\Core\Util\StrUtil;
1011
use ModStart\Core\Util\TimeUtil;
1112
use Illuminate\Support\Facades\Log;
1213

@@ -58,10 +59,11 @@ public static function call(Schedule $schedule)
5859
$dataId = $data['id'];
5960
$data = [];
6061
try {
61-
$data['result'] = call_user_func([$provider, 'run']);
62+
$result = call_user_func([$provider, 'run']);
63+
$data['result'] = StrUtil::mbLimit($result, 200);
6264
$data['status'] = RunStatus::SUCCESS;
6365
} catch (\Exception $e) {
64-
$data['result'] = $e->getMessage();
66+
$data['result'] = StrUtil::mbLimit($e->getMessage(), 200);
6567
$data['status'] = RunStatus::FAILED;
6668
}
6769
$data['endTime'] = date('Y-m-d H:i:s');

0 commit comments

Comments
 (0)