feat: add UI, add tests, refinements

This commit is contained in:
Benjamin Nussbaum 2025-06-11 12:28:45 +02:00
parent 56638b26e8
commit ccba0f23f1
9 changed files with 446 additions and 25 deletions

View file

@ -143,7 +143,13 @@ class PlaylistItem extends Model
}
$pluginMarkups = [];
$plugins = Plugin::whereIn('id', $this->getMashupPluginIds())->get();
$pluginIds = $this->getMashupPluginIds();
$plugins = Plugin::whereIn('id', $pluginIds)->get();
// Sort the collection to match plugin_ids order
$plugins = $plugins->sortBy(function ($plugin) use ($pluginIds) {
return array_search($plugin->id, $pluginIds);
})->values();
foreach ($plugins as $index => $plugin) {
$size = $this->getLayoutSize($index);