Don't show update button when there is no update
This commit is contained in:
parent
9de5c340c3
commit
78ea617a53
@ -336,15 +336,17 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
|||||||
}
|
}
|
||||||
|
|
||||||
$numberOfOutdated = $this->maniaControl->updateManager->getNumberOfOutdatedPlugins();
|
$numberOfOutdated = $this->maniaControl->updateManager->getNumberOfOutdatedPlugins();
|
||||||
$updatePluginsButton = new Label_Button();
|
if($numberOfOutdated > 0) {
|
||||||
$frame->add($updatePluginsButton);
|
$updatePluginsButton = new Label_Button();
|
||||||
$updatePluginsButton->setHAlign(Control::RIGHT);
|
$frame->add($updatePluginsButton);
|
||||||
$updatePluginsButton->setX($width * 0.1);
|
$updatePluginsButton->setHAlign(Control::RIGHT);
|
||||||
$updatePluginsButton->setY(-35.5);
|
$updatePluginsButton->setX($width * 0.1);
|
||||||
$updatePluginsButton->setZ(2);
|
$updatePluginsButton->setY(-35.5);
|
||||||
$updatePluginsButton->setStyle($updatePluginsButton::STYLE_CardButtonSmall);
|
$updatePluginsButton->setZ(2);
|
||||||
$updatePluginsButton->setText('Update '.$numberOfOutdated.' plugin(s)');
|
$updatePluginsButton->setStyle($updatePluginsButton::STYLE_CardButtonSmall);
|
||||||
$updatePluginsButton->setAction(self::ACTION_UPDATEPLUGINS);
|
$updatePluginsButton->setText('Update '.$numberOfOutdated.' plugin(s)');
|
||||||
|
$updatePluginsButton->setAction(self::ACTION_UPDATEPLUGINS);
|
||||||
|
}
|
||||||
|
|
||||||
return $frame;
|
return $frame;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user