feat: prevent moving drive to the same bus type and update UI to reflect current bus status
This commit is contained in:
@@ -831,6 +831,12 @@ class Storage extends Component
|
||||
$drive = $this->drives[$this->movingDriveKey];
|
||||
$targetBus = $this->moveDriveTargetBus;
|
||||
|
||||
// Prevent moving to the same bus type
|
||||
if ($drive['bus'] === $targetBus) {
|
||||
$this->notify('Drive is already on the ' . $this->busTypes[$targetBus]['label'] . ' bus.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
// Get next available index on target bus
|
||||
$targetIndex = $this->getNextAvailableIndex($targetBus);
|
||||
if ($targetIndex === null) {
|
||||
|
||||
Reference in New Issue
Block a user