|
5 | 5 | namespace OpenForgeProject\MageForge\Console\Command; |
6 | 6 |
|
7 | 7 | use Laravel\Prompts\MultiSelectPrompt; |
| 8 | +use Laravel\Prompts\Spinner; |
8 | 9 | use OpenForgeProject\MageForge\Model\ThemeList; |
9 | 10 | use OpenForgeProject\MageForge\Model\ThemePath; |
10 | 11 | use OpenForgeProject\MageForge\Service\ThemeBuilder\BuilderPool; |
@@ -93,12 +94,23 @@ private function processBuildThemes( |
93 | 94 |
|
94 | 95 | if ($isVerbose) { |
95 | 96 | $io->title(sprintf('Building %d theme(s)', count($themeCodes))); |
96 | | - } |
97 | 97 |
|
98 | | - foreach ($themeCodes as $themeCode) { |
99 | | - if (!$this->processTheme($themeCode, $io, $output, $isVerbose, $successList)) { |
100 | | - continue; |
| 98 | + foreach ($themeCodes as $themeCode) { |
| 99 | + if (!$this->processTheme($themeCode, $io, $output, $isVerbose, $successList)) { |
| 100 | + continue; |
| 101 | + } |
101 | 102 | } |
| 103 | + } else { |
| 104 | + // Nutze Spinner mit der korrekten API |
| 105 | + $spinner = new Spinner('✨ Building theme ...'); |
| 106 | + $spinner->spin(function() use ($themeCodes, $io, $output, $isVerbose, &$successList) { |
| 107 | + foreach ($themeCodes as $themeCode) { |
| 108 | + if (!$this->processTheme($themeCode, $io, $output, $isVerbose, $successList)) { |
| 109 | + continue; |
| 110 | + } |
| 111 | + } |
| 112 | + return true; |
| 113 | + }); |
102 | 114 | } |
103 | 115 |
|
104 | 116 | $this->displayBuildSummary($io, $successList, microtime(true) - $startTime); |
|
0 commit comments