diff options
| author | suchmememanyskill <38142618+suchmememanyskill@users.noreply.github.com> | 2023-06-02 03:44:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-01 18:44:55 -0700 |
| commit | 2e8e0fc7c153cdeae055f4f0a7158afbae0e3485 (patch) | |
| tree | 68e44661bd99168fc82330dc65d8556979d801d4 /frontend/src | |
| parent | 8049417e036a8d855d0455f32d71caf2ffc39c11 (diff) | |
| download | decky-loader-2e8e0fc7c153cdeae055f4f0a7158afbae0e3485.tar.gz decky-loader-2e8e0fc7c153cdeae055f4f0a7158afbae0e3485.zip | |
Plugin backend reload (#463)v2.10.0-pre1
Co-authored-by: beebls <102569435+beebls@users.noreply.github.com>
Diffstat (limited to 'frontend/src')
| -rw-r--r-- | frontend/src/components/settings/pages/plugin_list/index.tsx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/frontend/src/components/settings/pages/plugin_list/index.tsx b/frontend/src/components/settings/pages/plugin_list/index.tsx index 17f6d99d..fab8ec2b 100644 --- a/frontend/src/components/settings/pages/plugin_list/index.tsx +++ b/frontend/src/components/settings/pages/plugin_list/index.tsx @@ -44,7 +44,23 @@ function PluginInteractables(props: { entry: ReorderableEntry<PluginData> }) { const showCtxMenu = (e: MouseEvent | GamepadEvent) => { showContextMenu( <Menu label={t('PluginListIndex.plugin_actions')}> - <MenuItem onSelected={() => window.DeckyPluginLoader.importPlugin(pluginName, data?.version)}> + <MenuItem + onSelected={() => { + try { + fetch(`http://127.0.0.1:1337/plugins/${pluginName}/reload`, { + method: 'POST', + credentials: 'include', + headers: { + Authentication: window.deckyAuthToken, + }, + }); + } catch (err) { + console.error('Error Reloading Plugin Backend', err); + } + + window.DeckyPluginLoader.importPlugin(pluginName, data?.version); + }} + > {t('PluginListIndex.reload')} </MenuItem> <MenuItem |
