-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: POC uninstallation feature * Fixes, placeholder * bugfix: wrong function call * add oncancel and change function called * clean up plugin uninstall code * bugfix, uninstall in store * Limit scope of feature branch * feat: PluginLoader.unloadPlugin * problematic logs
- Loading branch information
Showing
4 changed files
with
102 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { DialogButton, staticClasses } from 'decky-frontend-lib'; | ||
import { FaTrash } from 'react-icons/fa'; | ||
|
||
export default function PluginList() { | ||
const plugins = window.DeckyPluginLoader?.getPlugins(); | ||
|
||
if (plugins.length === 0) { | ||
return ( | ||
<div> | ||
<p>No plugins installed</p> | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<ul style={{ listStyleType: 'none' }}> | ||
{window.DeckyPluginLoader?.getPlugins().map(({ name }) => ( | ||
<li style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}> | ||
<span>{name}</span> | ||
<div className={staticClasses.Title} style={{ marginLeft: 'auto', boxShadow: 'none' }}> | ||
<DialogButton | ||
style={{ height: '40px', width: '40px', padding: '10px 12px' }} | ||
onClick={() => window.DeckyPluginLoader.uninstall_plugin(name)} | ||
> | ||
<FaTrash /> | ||
</DialogButton> | ||
</div> | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters