mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-15 18:13:40 +03:00
initial browser/installer commit, injector get_tab and stateful utils
- Integrated plugin downloader/installer. It accepts POST requests at /browser/install_plugin, containing an artifact (basically an author/repo string like you'd find on github), and a release version, then fetches the zip file from the repo releases and unzips it inside the plugin dir, after asking for user confirmation (pop-up message in the plugin menu). - Injector get_tab method. Basically get_tabs with the usual search for a specific tab. Decided to implement this because it was needed again and again, and we kept pasting the same list search one-liner. - Utilities now have access to the main PluginManager class
This commit is contained in:
@@ -7,7 +7,7 @@ from os import path, listdir
|
||||
from importlib.util import spec_from_file_location, module_from_spec
|
||||
from logging import getLogger
|
||||
|
||||
from injector import get_tabs
|
||||
from injector import get_tabs, get_tab
|
||||
|
||||
class FileChangeHandler(FileSystemEventHandler):
|
||||
def __init__(self, loader, plugin_path) -> None:
|
||||
@@ -190,6 +190,6 @@ class Loader:
|
||||
return {"plugins": self.plugins.values()}
|
||||
|
||||
async def refresh_iframe(self):
|
||||
tab = next((i for i in await get_tabs() if i.title == "QuickAccess"), None)
|
||||
tab = await get_tab("QuickAccess")
|
||||
await tab.open_websocket()
|
||||
return await tab.evaluate_js("reloadIframe()")
|
||||
Reference in New Issue
Block a user