diff options
| author | Jonas Dellinger <jonas@dellinger.dev> | 2022-05-30 20:55:51 +0200 |
|---|---|---|
| committer | Jonas Dellinger <jonas@dellinger.dev> | 2022-05-30 20:55:51 +0200 |
| commit | 8fcaadd8f30182c61809748a324808add56ec1c0 (patch) | |
| tree | 1e8590a794c7e5b0461a79785e7c059b1a29d91b /frontend/src/plugin-loader.tsx | |
| parent | 007860f8f771a7ee62b1c384fbe4f741528a75d5 (diff) | |
| download | decky-loader-8fcaadd8f30182c61809748a324808add56ec1c0.tar.gz decky-loader-8fcaadd8f30182c61809748a324808add56ec1c0.zip | |
All props of route, expose routerHook
Diffstat (limited to 'frontend/src/plugin-loader.tsx')
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index fc1f57e9..200fffdc 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -64,7 +64,7 @@ class PluginLoader extends Logger { private async importReactPlugin(name: string) { let res = await fetch(`http://127.0.0.1:1337/plugins/${name}/frontend_bundle`); if (res.ok) { - let content = await eval(await res.text())(PluginLoader.createPluginAPI(name)); + let content = await eval(await res.text())(this.createPluginAPI(name)); this.plugins.push({ name: name, icon: content.icon, @@ -82,7 +82,7 @@ class PluginLoader extends Logger { }); } - static createPluginAPI(pluginName: string) { + createPluginAPI(pluginName: string) { return { routerHook: this.routerHook, async callServerMethod(methodName: string, args = {}) { |
