summaryrefslogtreecommitdiff
path: root/frontend/src/components/settings/pages
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/settings/pages')
-rw-r--r--frontend/src/components/settings/pages/plugin_list/index.tsx18
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