From 0ad591650437ca40483f728d4086cb803222923d Mon Sep 17 00:00:00 2001 From: tracer Date: Fri, 13 Feb 2026 10:04:28 +0100 Subject: [PATCH] Add custom paths and ACP tab --- .gitignore | 2 ++ CHANGELOG.md | 1 + .../Controllers/SystemUpdateController.php | 12 +++++++++ resources/js/pages/Acp.jsx | 27 +++++++++++++------ 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 1e99d24..b7695a6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,12 +22,14 @@ /public/build /public/hot /public/storage +/public/custom /storage/app /storage/framework /storage/*.key /storage/pail /storage/framework/views/*.php /bootstrap/cache/*.php +/custom /vendor Homestead.json Homestead.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 08b7d6e..dfe3165 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Added CLI PHP interpreter options (php, keyhelp-php-domain, custom) with KeyHelp guidance. - Updated CLI update tooling and automation notes (KeyHelp PHP handling, CI runner requirements). - Adjusted ACP layout and tab styling for better dark-mode readability and auto-sizing sidebars. +- Added Custom top-level ACP tab and preserved /custom paths during in-app updates. ## 2026-02-10 - Reshaped ACP System tab with left navigation and dedicated views (Overview, Live Update, CLI, CI/CD). diff --git a/app/Http/Controllers/SystemUpdateController.php b/app/Http/Controllers/SystemUpdateController.php index 85151cd..0e8317d 100644 --- a/app/Http/Controllers/SystemUpdateController.php +++ b/app/Http/Controllers/SystemUpdateController.php @@ -113,6 +113,7 @@ class SystemUpdateController extends Controller $append('Syncing files...'); $usedRsync = false; $rsyncPath = trim((string) shell_exec('command -v rsync')); + $protectedPaths = ['custom', 'public/custom']; if ($rsyncPath !== '') { $usedRsync = true; $rsync = new Process([ @@ -122,6 +123,8 @@ class SystemUpdateController extends Controller '--exclude=.env', '--exclude=storage', '--exclude=public/storage', + '--exclude=custom', + '--exclude=public/custom', $sourceDir . '/', base_path() . '/', ]); @@ -134,6 +137,15 @@ class SystemUpdateController extends Controller ], 500); } } else { + foreach ($protectedPaths as $path) { + $sourcePath = $sourceDir . DIRECTORY_SEPARATOR . $path; + if (File::exists($sourcePath)) { + File::deleteDirectory($sourcePath); + if (File::exists($sourcePath)) { + File::delete($sourcePath); + } + } + } File::copyDirectory($sourceDir, base_path()); } diff --git a/resources/js/pages/Acp.jsx b/resources/js/pages/Acp.jsx index 14f23e8..d4997f5 100644 --- a/resources/js/pages/Acp.jsx +++ b/resources/js/pages/Acp.jsx @@ -3778,15 +3778,9 @@ function Acp({ isAdmin }) { )} {systemSection === 'insite' && ( <> -
-
-
Live Update
-
+
-

- Placeholder: run a live update from inside the forum, with safety checks - and status details. -

+

Live update controls will appear here.

{renderSystemRequirementsPanel()} @@ -3862,6 +3856,23 @@ function Acp({ isAdmin }) { )} + + + +
+
+
Custom
+
+
+

+ Place site-specific assets or overrides in `/custom` and `public/custom`. + These paths are preserved during in-place updates. +

+
+
+ +
+