mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 11:12:00 +00:00
Add Plugin Reload Button to Settings (#128)
* feat: add reload button to plugin list Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net> * refactor: move plugin actions into context menu Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { DialogButton, staticClasses } from 'decky-frontend-lib';
|
import { DialogButton, Menu, MenuItem, showContextMenu, staticClasses } from 'decky-frontend-lib';
|
||||||
import { FaTrash } from 'react-icons/fa';
|
import { FaEllipsisH } from 'react-icons/fa';
|
||||||
|
|
||||||
import { useDeckyState } from '../../../DeckyState';
|
import { useDeckyState } from '../../../DeckyState';
|
||||||
|
|
||||||
@@ -22,9 +22,17 @@ export default function PluginList() {
|
|||||||
<div className={staticClasses.Title} style={{ marginLeft: 'auto', boxShadow: 'none' }}>
|
<div className={staticClasses.Title} style={{ marginLeft: 'auto', boxShadow: 'none' }}>
|
||||||
<DialogButton
|
<DialogButton
|
||||||
style={{ height: '40px', width: '40px', padding: '10px 12px' }}
|
style={{ height: '40px', width: '40px', padding: '10px 12px' }}
|
||||||
onClick={() => window.DeckyPluginLoader.uninstallPlugin(name)}
|
onClick={(e: MouseEvent) =>
|
||||||
|
showContextMenu(
|
||||||
|
<Menu label="Plugin Actions">
|
||||||
|
<MenuItem onSelected={() => window.DeckyPluginLoader.importPlugin(name)}>Reload</MenuItem>
|
||||||
|
<MenuItem onSelected={() => window.DeckyPluginLoader.uninstallPlugin(name)}>Uninstall</MenuItem>
|
||||||
|
</Menu>,
|
||||||
|
e.currentTarget ?? window,
|
||||||
|
)
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<FaTrash />
|
<FaEllipsisH />
|
||||||
</DialogButton>
|
</DialogButton>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user