Added update all button on pluginmenu
This commit is contained in:
committed by
Steffen Schröder
parent
b4d131404d
commit
9de5c340c3
@ -39,6 +39,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
||||
const ACTION_SETTING_BOOL = 'PluginMenuActionBoolSetting.';
|
||||
const ACTION_BACK_TO_PLUGINS = 'PluginMenu.BackToPlugins';
|
||||
const ACTION_PREFIX_UPDATEPLUGIN = 'PluginMenu.Update.';
|
||||
const ACTION_UPDATEPLUGINS = 'PluginMenu.Update.All';
|
||||
const SETTING_PERMISSION_CHANGE_PLUGIN_SETTINGS = 'Change Plugin Settings';
|
||||
|
||||
/*
|
||||
@ -334,6 +335,17 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
||||
}
|
||||
}
|
||||
|
||||
$numberOfOutdated = $this->maniaControl->updateManager->getNumberOfOutdatedPlugins();
|
||||
$updatePluginsButton = new Label_Button();
|
||||
$frame->add($updatePluginsButton);
|
||||
$updatePluginsButton->setHAlign(Control::RIGHT);
|
||||
$updatePluginsButton->setX($width * 0.1);
|
||||
$updatePluginsButton->setY(-35.5);
|
||||
$updatePluginsButton->setZ(2);
|
||||
$updatePluginsButton->setStyle($updatePluginsButton::STYLE_CardButtonSmall);
|
||||
$updatePluginsButton->setText('Update '.$numberOfOutdated.' plugin(s)');
|
||||
$updatePluginsButton->setAction(self::ACTION_UPDATEPLUGINS);
|
||||
|
||||
return $frame;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user