diff options
| author | Weblate <noreply@weblate.org> | 2023-06-08 14:40:08 +0000 |
|---|---|---|
| committer | Weblate <noreply@weblate.org> | 2023-06-08 14:40:08 +0000 |
| commit | 89bbbf6fe4348236f9828a39ddc8f1790cb2f2f4 (patch) | |
| tree | c175788ffc6917a66db810eb14073c57b750efb3 /frontend/src/plugin-loader.tsx | |
| parent | fdc556edeed416843f3e4b9d5c1a9e163dc72d89 (diff) | |
| parent | 9a05c228a004392df6921a7706f4ae6a62fff2d3 (diff) | |
| download | decky-loader-89bbbf6fe4348236f9828a39ddc8f1790cb2f2f4.tar.gz decky-loader-89bbbf6fe4348236f9828a39ddc8f1790cb2f2f4.zip | |
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'frontend/src/plugin-loader.tsx')
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index 57483293..6d20c2f0 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -1,5 +1,4 @@ import { - ConfirmModal, ModalRoot, PanelSection, PanelSectionRow, @@ -18,9 +17,11 @@ import LegacyPlugin from './components/LegacyPlugin'; import { deinitFilepickerPatches, initFilepickerPatches } from './components/modals/filepicker/patches'; import MultiplePluginsInstallModal from './components/modals/MultiplePluginsInstallModal'; import PluginInstallModal from './components/modals/PluginInstallModal'; +import PluginUninstallModal from './components/modals/PluginUninstallModal'; import NotificationBadge from './components/NotificationBadge'; import PluginView from './components/PluginView'; import WithSuspense from './components/WithSuspense'; +import { HiddenPluginsService } from './hidden-plugins-service'; import Logger from './logger'; import { InstallType, Plugin } from './plugin'; import RouterHook from './router-hook'; @@ -45,6 +46,7 @@ class PluginLoader extends Logger { private routerHook: RouterHook = new RouterHook(); public toaster: Toaster = new Toaster(); private deckyState: DeckyState = new DeckyState(); + public hiddenPluginsService = new HiddenPluginsService(this.deckyState); private reloadLock: boolean = false; // stores a list of plugin names which requested to be reloaded @@ -182,21 +184,8 @@ class PluginLoader extends Logger { ); } - public uninstallPlugin(name: string, title: string, button_text: string, description: string) { - showModal( - <ConfirmModal - onOK={async () => { - await this.callServerMethod('uninstall_plugin', { name }); - }} - onCancel={() => { - // do nothing - }} - strTitle={title} - strOKButtonText={button_text} - > - {description} - </ConfirmModal>, - ); + public uninstallPlugin(name: string, title: string, buttonText: string, description: string) { + showModal(<PluginUninstallModal name={name} title={title} buttonText={buttonText} description={description} />); } public hasPlugin(name: string) { @@ -220,6 +209,8 @@ class PluginLoader extends Logger { console.log(pluginOrder); this.deckyState.setPluginOrder(pluginOrder); }); + + this.hiddenPluginsService.init(); } public deinit() { |
