diff --git a/app/Blog/Controllers/AuthController.php b/app/Blog/Controllers/AuthController.php index a95e6f9..0c9af8b 100644 --- a/app/Blog/Controllers/AuthController.php +++ b/app/Blog/Controllers/AuthController.php @@ -25,13 +25,13 @@ class AuthController extends Controller 'password' => ['required', 'string'], ]); - $field = filter_var($credentials['email'], FILTER_VALIDATE_EMAIL) ? 'email' : 'name'; - $credentials[$field] = $credentials['email']; - unset($credentials['email']); + // 支持邮箱或用户名登录 + $login = $credentials['email']; + $field = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'name'; - $user = User::query()->where($field, $credentials[$field])->first(); + $user = User::query()->where($field, $login)->first(); - if ($user && $user->verifyPassword($request->password)) { + if ($user && $user->verifyPassword($credentials['password'])) { Auth::login($user, $request->boolean('remember')); $user->forceFill([ 'logincount' => $user->logincount + 1, diff --git a/plugins/neatstudio.payment/src/Filament/Pages/PaymentSettings.php b/plugins/neatstudio.payment/src/Filament/Pages/PaymentSettings.php index 1c465e1..2defc7f 100644 --- a/plugins/neatstudio.payment/src/Filament/Pages/PaymentSettings.php +++ b/plugins/neatstudio.payment/src/Filament/Pages/PaymentSettings.php @@ -4,7 +4,7 @@ namespace Plugins\Neatstudio\Payment\Filament\Pages; use App\Models\Setting; use Filament\Actions\Action; -use Filament\Forms\Components\Section; +use Filament\Schemas\Components\Section; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Toggle; use Filament\Forms\Concerns\InteractsWithForms; diff --git a/themes/modern/assets/style.css b/themes/modern/assets/style.css index 9e364c7..33ca763 100644 --- a/themes/modern/assets/style.css +++ b/themes/modern/assets/style.css @@ -31,8 +31,9 @@ a:hover { opacity: 0.8; } .m-link-btn { background: none; border: none; color: var(--accent); font-size: 14px; cursor: pointer; padding: 0; } .inline-form { display: inline; } -.main-layout { padding: 36px 20px; } -.main-layout .content { max-width: 720px; margin: 0 auto; } +.main-layout { display: flex; gap: 32px; align-items: flex-start; max-width: 1080px; margin: 0 auto; padding: 36px 20px; } +.main-layout .content { flex: 1; min-width: 0; max-width: 720px; } +.main-layout .sidebar { width: 300px; flex-shrink: 0; } .post-card, .post-full, .comments-section { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 26px 30px; margin-bottom: 22px; } .post-card.sticky { box-shadow: inset 3px 0 0 var(--accent); } diff --git a/themes/sablog/assets/style.css b/themes/sablog/assets/style.css index 4eb8a3c..131f5cf 100644 --- a/themes/sablog/assets/style.css +++ b/themes/sablog/assets/style.css @@ -84,6 +84,7 @@ a:hover { color: #f60; text-decoration: underline; } .sidebar .tagcloud a { color: #1c62b0; margin-right: 6px; } /* 兜底页面(归档/标签云/友链/评论/登录等使用默认布局) */ +.container.main-layout { max-width: 960px; margin: 0 auto; } .main-layout { display: flex; gap: 18px; align-items: flex-start; padding: 14px 10px; } .main-layout .content { flex: 1; min-width: 0; } .main-layout .sidebar { width: 280px; } diff --git a/themes/sablog/views/index.blade.php b/themes/sablog/views/index.blade.php index 2663390..5d9d2dc 100644 --- a/themes/sablog/views/index.blade.php +++ b/themes/sablog/views/index.blade.php @@ -1,6 +1,7 @@ @include('partials.head') @include('partials.header') +
@if(session('success'))
{{ session('success') }}
@@ -18,6 +19,7 @@ @include('partials.pagination', ['paginator' => $posts])
@include('partials.sidebar') +
{{-- #page --}} @include('partials.footer') diff --git a/themes/sablog/views/list.blade.php b/themes/sablog/views/list.blade.php index fce4aed..4e2b5dd 100644 --- a/themes/sablog/views/list.blade.php +++ b/themes/sablog/views/list.blade.php @@ -4,6 +4,7 @@ @include('partials.head') @include('partials.header') +

{{ $archiveTitle ?? ($category->name ?? '文章列表') }}

@@ -16,6 +17,7 @@ @include('partials.pagination', ['paginator' => $posts])
@include('partials.sidebar') +
{{-- #page --}} @include('partials.footer') diff --git a/themes/sablog/views/partials/footer.blade.php b/themes/sablog/views/partials/footer.blade.php index f0fb4fe..dafbfab 100644 --- a/themes/sablog/views/partials/footer.blade.php +++ b/themes/sablog/views/partials/footer.blade.php @@ -4,5 +4,4 @@

Powered by LaraLog · Laravel · Filament

-{{-- #page --}} {{-- #outmain --}} diff --git a/themes/sablog/views/partials/header.blade.php b/themes/sablog/views/partials/header.blade.php index aac4de6..07cffd8 100644 --- a/themes/sablog/views/partials/header.blade.php +++ b/themes/sablog/views/partials/header.blade.php @@ -27,4 +27,3 @@ -
diff --git a/themes/sablog/views/search.blade.php b/themes/sablog/views/search.blade.php index 25b9746..c96a375 100644 --- a/themes/sablog/views/search.blade.php +++ b/themes/sablog/views/search.blade.php @@ -2,6 +2,7 @@ @include('partials.head') @include('partials.header') +

搜索:{{ $keyword ?: '全部' }}

@@ -18,6 +19,7 @@ @include('partials.pagination', ['paginator' => $posts])
@include('partials.sidebar') +
{{-- #page --}} @include('partials.footer') diff --git a/themes/sablog/views/show.blade.php b/themes/sablog/views/show.blade.php index 76e2ac0..7409763 100644 --- a/themes/sablog/views/show.blade.php +++ b/themes/sablog/views/show.blade.php @@ -6,6 +6,7 @@ @include('partials.head') @include('partials.header') +
@if(session('success'))
{{ session('success') }}
@@ -82,6 +83,7 @@ @endif
@include('partials.sidebar') +
{{-- #page --}} @include('partials.footer') diff --git a/themes/sablog/views/tag.blade.php b/themes/sablog/views/tag.blade.php index c12615a..dbe8175 100644 --- a/themes/sablog/views/tag.blade.php +++ b/themes/sablog/views/tag.blade.php @@ -2,6 +2,7 @@ @include('partials.head') @include('partials.header') +

标签:{{ $tag->name }}

@@ -14,6 +15,7 @@ @include('partials.pagination', ['paginator' => $posts])
@include('partials.sidebar') +
{{-- #page --}} @include('partials.footer')