Plugin store button now uses built-in browser

This commit is contained in:
tza
2022-05-10 23:17:09 +03:00
parent 0d0e57e35a
commit f3ab0f5989
5 changed files with 19 additions and 24 deletions
-5
View File
@@ -27,7 +27,6 @@ class PluginBrowser:
server_instance.add_routes([
web.post("/browser/install_plugin", self.install_plugin),
web.get("/browser/redirect", self.redirect_to_store),
web.post("/browser/close_store", self.close_store)
])
def _unzip_to_plugin_dir(self, zip, name, hash):
@@ -73,10 +72,6 @@ class PluginBrowser:
async def redirect_to_store(self, request):
return web.Response(status=302, headers={"Location": self.store_url})
async def close_store(self, request):
await inject_to_tab("SP", "window.PLUGIN_STORE_TAB_INSTANCE.SetVisible(false)")
await inject_to_tab("SP", "SteamClient.BrowserView.Destroy(window.PLUGIN_STORE_TAB_INSTANCE)")
async def install_plugin(self, request):
data = await request.post()
get_event_loop().create_task(self.request_plugin_install(data["artifact"], data["version"], data["hash"]))