From 4daf028e7acb49932e274ad5c32cd98045c7474a Mon Sep 17 00:00:00 2001 From: botato <63275405+botatooo@users.noreply.github.com> Date: Fri, 1 Jul 2022 23:43:17 +0000 Subject: Uninstall functionality (#97) * 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 --- frontend/src/components/settings/index.tsx | 6 ++++ .../src/components/settings/pages/PluginList.tsx | 32 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 frontend/src/components/settings/pages/PluginList.tsx (limited to 'frontend/src/components/settings') diff --git a/frontend/src/components/settings/index.tsx b/frontend/src/components/settings/index.tsx index d4799fa9..f9c84c7b 100644 --- a/frontend/src/components/settings/index.tsx +++ b/frontend/src/components/settings/index.tsx @@ -1,6 +1,7 @@ import { SidebarNavigation } from 'decky-frontend-lib'; import GeneralSettings from './pages/GeneralSettings'; +import PluginList from './pages/PluginList'; export default function SettingsPage() { return ( @@ -13,6 +14,11 @@ export default function SettingsPage() { content: , route: '/decky/settings/general', }, + { + title: 'Plugins', + content: , + route: '/decky/settings/plugins', + }, ]} /> ); diff --git a/frontend/src/components/settings/pages/PluginList.tsx b/frontend/src/components/settings/pages/PluginList.tsx new file mode 100644 index 00000000..4fd2c063 --- /dev/null +++ b/frontend/src/components/settings/pages/PluginList.tsx @@ -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 ( +
+

No plugins installed

+
+ ); + } + + return ( + + ); +} -- cgit v1.2.3