diff --git a/.gitignore b/.gitignore index 1609f02..51d9202 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.log .DS_Store +._* .env .env.backup .env.production diff --git a/CHANGELOG.md b/CHANGELOG.md index 43909b1..949519a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,15 +7,15 @@ - Added user avatars (upload + display) and a basic profile page/API. - Seeded a Micha test user with verified email. +## 2026-01-11 +- Restyled the thread view to mimic phpBB: compact toolbar, title row, and post layout. +- Added phpBB-style post action buttons and post author info for replies. + ## 2026-01-02 - Added ACP general settings for forum name, theme, accents, and logo (no reload required). - Added admin-only upload endpoints and ACP UI for logos and favicons. - Applied forum branding, theme defaults, accents, logos, and favicon links in the SPA header. -## 2026-01-11 -- Restyled the thread view to mimic phpBB: compact toolbar, title row, and post layout. -- Added phpBB-style post action buttons and post author info for replies. - ## 2025-12-30 - Added soft deletes with audit metadata (deleted_at/deleted_by) for forums, threads, and posts. - Ensured API listings and ACP forum tree omit soft-deleted records by default. diff --git a/app/Http/Controllers/ForumController.php b/app/Http/Controllers/ForumController.php index 9c5dfd9..732516d 100644 --- a/app/Http/Controllers/ForumController.php +++ b/app/Http/Controllers/ForumController.php @@ -68,7 +68,12 @@ class ForumController extends Controller } } - $position = Forum::where('parent_id', $parentId)->max('position'); + if ($parentId === null) { + Forum::whereNull('parent_id')->increment('position'); + $position = 0; + } else { + $position = Forum::where('parent_id', $parentId)->max('position'); + } $forum = Forum::create([ 'name' => $data['name'], diff --git a/app/Http/Controllers/UploadController.php b/app/Http/Controllers/UploadController.php index a335fba..c5dd693 100644 --- a/app/Http/Controllers/UploadController.php +++ b/app/Http/Controllers/UploadController.php @@ -16,7 +16,13 @@ class UploadController extends Controller } $data = $request->validate([ - 'file' => ['required', 'image', 'mimes:jpg,jpeg,png,gif,webp', 'max:2048'], + 'file' => [ + 'required', + 'image', + 'mimes:jpg,jpeg,png,gif,webp', + 'max:2048', + 'dimensions:max_width=150,max_height=150', + ], ]); if ($user->avatar_path) { diff --git a/resources/js/index.css b/resources/js/index.css index 0d02e5a..409a8f9 100644 --- a/resources/js/index.css +++ b/resources/js/index.css @@ -1422,11 +1422,24 @@ a { } .bb-portal-user-avatar { - width: 72px; - height: 72px; + width: 150px; + height: 150px; border-radius: 12px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04)); border: 1px solid rgba(255, 255, 255, 0.15); + display: flex; + align-items: center; + justify-content: center; + color: var(--bb-accent, #f29b3f); + font-size: 2rem; + overflow: hidden; +} + +.bb-portal-user-avatar img { + width: auto; + height: auto; + max-width: 150px; + max-height: 150px; } .bb-portal-user-name { @@ -1644,6 +1657,14 @@ a { border-color: color-mix(in srgb, var(--bb-accent, #f29b3f) 85%, #000); } +.bb-tree-action-group { + width: 176px; +} + +.bb-tree-action-group .bb-action-group { + justify-content: flex-end; +} + .bb-drag-handle { font-size: 1.2rem; line-height: 1; diff --git a/resources/js/pages/Acp.jsx b/resources/js/pages/Acp.jsx index 1af9e63..dd20cb0 100644 --- a/resources/js/pages/Acp.jsx +++ b/resources/js/pages/Acp.jsx @@ -905,32 +905,34 @@ export default function Acp({ isAdmin }) { >