Modules: Improved install command based on testing

- Updated output to be clearer
- Added warning and confirmation to local install flow
- Adjusted module folder name creation
This commit is contained in:
Dan Brown
2026-03-06 09:28:46 +00:00
parent ec3dd856db
commit f2f76a3c56
3 changed files with 22 additions and 5 deletions

View File

@@ -44,7 +44,7 @@ class ThemeModuleManager
*/
public function addFromZip(string $name, ThemeModuleZip $zip): ThemeModule
{
$baseFolderName = Str::limit(Str::slug($name), 20);
$baseFolderName = Str::limit(Str::slug($name), 40, '');
$folderName = $baseFolderName;
while (!$baseFolderName || file_exists($this->modulesFolderPath . DIRECTORY_SEPARATOR . $folderName)) {
$folderName = ($baseFolderName ?: 'mod') . '-' . Str::random(4);