diff options
| author | Weblate <noreply@weblate.org> | 2023-06-02 10:07:20 +0000 |
|---|---|---|
| committer | Weblate <noreply@weblate.org> | 2023-06-02 10:07:20 +0000 |
| commit | 935de1ad0ce517892947fa913aae6fc3ed94f814 (patch) | |
| tree | 68e44661bd99168fc82330dc65d8556979d801d4 /frontend/src/components/settings/pages/plugin_list | |
| parent | 9542708c92ee3a1a926181634d752a2068aa463f (diff) | |
| parent | 2e8e0fc7c153cdeae055f4f0a7158afbae0e3485 (diff) | |
| download | decky-loader-935de1ad0ce517892947fa913aae6fc3ed94f814.tar.gz decky-loader-935de1ad0ce517892947fa913aae6fc3ed94f814.zip | |
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'frontend/src/components/settings/pages/plugin_list')
| -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 |
