diff --git a/octoprint_estop/__init__.py b/octoprint_estop/__init__.py index 70615c3..efc1669 100644 --- a/octoprint_estop/__init__.py +++ b/octoprint_estop/__init__.py @@ -13,10 +13,33 @@ class EstopPlugin(octoprint.plugin.AssetPlugin, ) def get_template_configs(self): return [ - dict(type="sidebar", name="Emergency STOP!", icon="fa fa-times", template="estop_sidebar.jinja2", styles=["display: none"], data_bind="visible: loginState.isUser") + dict(type="sidebar", name="Emergency STOP!", icon="fa icon-print", template="estop_sidebar.jinja2", styles=["display: none"], data_bind="visible: loginState.isUser") ] - -__plugin_name__ = "Emergency Stop Button" -__plugin_implementation__ = EstopPlugin() + + def get_update_information(self): + + return dict( + skeleton=dict( + displayName="Emergency Stop Button", + displayVersion=self._plugin_version, - \ No newline at end of file + # version check: github repository + type="github_release", + user="ntoff", + repo="OctoPrint-Estop", + current=self._plugin_version, + + # update method: pip + pip="https://github.com/ntoff/OctoPrint-Estop/archive/{target_version}.zip" + ) + ) +__plugin_name__ = "Emergency Stop Button" + +def __plugin_load__(): + global __plugin_implementation__ + __plugin_implementation__ = __plugin_implementation__ = EstopPlugin() + + global __plugin_hooks__ + __plugin_hooks__ = { + "octoprint.plugin.softwareupdate.check_config": __plugin_implementation__.get_update_information + } \ No newline at end of file