diff --git a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js index 13dcbd37e..aba2cf5b7 100644 --- a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js +++ b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js @@ -241,6 +241,29 @@ $(function () { self.configurationDialog.modal(); }; + self.deleteGithubTokenApiKey = function () { + var data = { + plugins: { + softwareupdate: { + credentials: { + github: undefined + } + } + } + }; + + self.settings.saveData(data, { + success: function () { + self.performCheck(); + }, + complete: function () { + self.config_githubToken(""); + self.config_githubTokenSet(false); + }, + sending: true + }); + }; + self.savePluginSettings = function (viewModel, event) { var target = $(event.target); target.prepend(' '); diff --git a/src/octoprint/plugins/softwareupdate/templates/snippets/githubToken.jinja2 b/src/octoprint/plugins/softwareupdate/templates/snippets/githubToken.jinja2 index 133832211..2338ede6e 100644 --- a/src/octoprint/plugins/softwareupdate/templates/snippets/githubToken.jinja2 +++ b/src/octoprint/plugins/softwareupdate/templates/snippets/githubToken.jinja2 @@ -1,12 +1,16 @@