Add custom paths and ACP tab
Some checks failed
CI/CD Pipeline / test (push) Successful in 12s
CI/CD Pipeline / deploy (push) Failing after 11s
CI/CD Pipeline / promote_stable (push) Has been skipped

This commit is contained in:
2026-02-13 10:04:28 +01:00
parent bac70c3927
commit 0ad5916504
4 changed files with 34 additions and 8 deletions

2
.gitignore vendored
View File

@@ -22,12 +22,14 @@
/public/build /public/build
/public/hot /public/hot
/public/storage /public/storage
/public/custom
/storage/app /storage/app
/storage/framework /storage/framework
/storage/*.key /storage/*.key
/storage/pail /storage/pail
/storage/framework/views/*.php /storage/framework/views/*.php
/bootstrap/cache/*.php /bootstrap/cache/*.php
/custom
/vendor /vendor
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml

View File

@@ -5,6 +5,7 @@
- Added CLI PHP interpreter options (php, keyhelp-php-domain, custom) with KeyHelp guidance. - 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). - 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. - 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 ## 2026-02-10
- Reshaped ACP System tab with left navigation and dedicated views (Overview, Live Update, CLI, CI/CD). - Reshaped ACP System tab with left navigation and dedicated views (Overview, Live Update, CLI, CI/CD).

View File

@@ -113,6 +113,7 @@ class SystemUpdateController extends Controller
$append('Syncing files...'); $append('Syncing files...');
$usedRsync = false; $usedRsync = false;
$rsyncPath = trim((string) shell_exec('command -v rsync')); $rsyncPath = trim((string) shell_exec('command -v rsync'));
$protectedPaths = ['custom', 'public/custom'];
if ($rsyncPath !== '') { if ($rsyncPath !== '') {
$usedRsync = true; $usedRsync = true;
$rsync = new Process([ $rsync = new Process([
@@ -122,6 +123,8 @@ class SystemUpdateController extends Controller
'--exclude=.env', '--exclude=.env',
'--exclude=storage', '--exclude=storage',
'--exclude=public/storage', '--exclude=public/storage',
'--exclude=custom',
'--exclude=public/custom',
$sourceDir . '/', $sourceDir . '/',
base_path() . '/', base_path() . '/',
]); ]);
@@ -134,6 +137,15 @@ class SystemUpdateController extends Controller
], 500); ], 500);
} }
} else { } 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()); File::copyDirectory($sourceDir, base_path());
} }

View File

@@ -3778,15 +3778,9 @@ function Acp({ isAdmin }) {
)} )}
{systemSection === 'insite' && ( {systemSection === 'insite' && (
<> <>
<div className="bb-acp-panel"> <div className="bb-acp-panel mb-3">
<div className="bb-acp-panel-header">
<h5 className="mb-0">Live Update</h5>
</div>
<div className="bb-acp-panel-body"> <div className="bb-acp-panel-body">
<p className="bb-muted mb-0"> <p className="bb-muted mb-0">Live update controls will appear here.</p>
Placeholder: run a live update from inside the forum, with safety checks
and status details.
</p>
</div> </div>
</div> </div>
{renderSystemRequirementsPanel()} {renderSystemRequirementsPanel()}
@@ -3862,6 +3856,23 @@ function Acp({ isAdmin }) {
</Row> </Row>
)} )}
</Tab> </Tab>
<Tab eventKey="custom" title="Custom">
<Row className="g-4">
<Col xs={12}>
<div className="bb-acp-panel">
<div className="bb-acp-panel-header">
<h5 className="mb-0">Custom</h5>
</div>
<div className="bb-acp-panel-body">
<p className="bb-muted mb-0">
Place site-specific assets or overrides in `/custom` and `public/custom`.
These paths are preserved during in-place updates.
</p>
</div>
</div>
</Col>
</Row>
</Tab>
</Tabs> </Tabs>
<Modal show={showModal} onHide={handleReset} centered size="lg"> <Modal show={showModal} onHide={handleReset} centered size="lg">
<Modal.Header closeButton closeVariant="white"> <Modal.Header closeButton closeVariant="white">