diff options
| author | Jesse Bofill <jesse_bofill@yahoo.com> | 2025-10-06 15:39:59 -0600 |
|---|---|---|
| committer | Jesse Bofill <jesse_bofill@yahoo.com> | 2025-10-06 15:39:59 -0600 |
| commit | d2b6999520c7e7425a757644c30bc6b494f57b8c (patch) | |
| tree | 20954df00c51c4a42411b71defcd60a70c4daf33 | |
| parent | 1ae6519209c9bf079d8dff80d5bceb5a847b08b1 (diff) | |
| download | decky-loader-d2b6999520c7e7425a757644c30bc6b494f57b8c.tar.gz decky-loader-d2b6999520c7e7425a757644c30bc6b494f57b8c.zip | |
fix mistakes
| -rw-r--r-- | frontend/src/components/DeckyState.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/components/modals/PluginDisablelModal.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/components/settings/pages/plugin_list/index.tsx | 27 | ||||
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 3 |
4 files changed, 18 insertions, 16 deletions
diff --git a/frontend/src/components/DeckyState.tsx b/frontend/src/components/DeckyState.tsx index b2f7ac33..3d6e9dc4 100644 --- a/frontend/src/components/DeckyState.tsx +++ b/frontend/src/components/DeckyState.tsx @@ -47,7 +47,7 @@ export class DeckyState { return { plugins: this._plugins, disabled: this._disabledPlugins, - installedPlugins: this._disabledPlugins, + installedPlugins: this._installedPlugins, pluginOrder: this._pluginOrder, frozenPlugins: this._frozenPlugins, hiddenPlugins: this._hiddenPlugins, diff --git a/frontend/src/components/modals/PluginDisablelModal.tsx b/frontend/src/components/modals/PluginDisablelModal.tsx index 89cda293..c455f9fa 100644 --- a/frontend/src/components/modals/PluginDisablelModal.tsx +++ b/frontend/src/components/modals/PluginDisablelModal.tsx @@ -1,7 +1,7 @@ import { ConfirmModal, Spinner } from '@decky/ui'; import { FC, useState } from 'react'; -import { disablePlugin, uninstallPlugin } from '../../plugin'; +import { disablePlugin } from '../../plugin'; interface PluginUninstallModalProps { name: string; diff --git a/frontend/src/components/settings/pages/plugin_list/index.tsx b/frontend/src/components/settings/pages/plugin_list/index.tsx index f13cbe2b..da70f4ca 100644 --- a/frontend/src/components/settings/pages/plugin_list/index.tsx +++ b/frontend/src/components/settings/pages/plugin_list/index.tsx @@ -83,21 +83,22 @@ function PluginInteractables(props: { entry: ReorderableEntry<PluginTableData> } > {t('PluginListIndex.uninstall')} </MenuItem> - {disabled ? <MenuItem - onSelected={() => - DeckyPluginLoader.disablePlugin( - name, - t('PluginLoader.plugin_disable.title', { name }), - t('PluginLoader.plugin_disable.button'), - t('PluginLoader.plugin_disable.desc', { name }), - ) - } - > - {t('PluginListIndex.plugin_disable')} - </MenuItem> : + {disabled ? // implement enabler <> - </> + </> : + <MenuItem + onSelected={() => + DeckyPluginLoader.disablePlugin( + name, + t('PluginLoader.plugin_disable.title', { name }), + t('PluginLoader.plugin_disable.button'), + t('PluginLoader.plugin_disable.desc', { name }), + ) + } + > + {t('PluginListIndex.plugin_disable')} + </MenuItem> } {hidden ? ( <MenuItem onSelected={onShow}>{t('PluginListIndex.show')}</MenuItem> diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index 755c4460..36766495 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -39,6 +39,7 @@ import Toaster from './toaster'; import { getVersionInfo } from './updater'; import { getSetting, setSetting } from './utils/settings'; import TranslationHelper, { TranslationClass } from './utils/TranslationHelper'; +import PluginDisablelModal from './components/modals/PluginDisablelModal'; const StorePage = lazy(() => import('./components/store/Store')); const SettingsPage = lazy(() => import('./components/settings')); @@ -342,7 +343,7 @@ class PluginLoader extends Logger { } public disablePlugin(name: string, title: string, buttonText: string, description: string) { - showModal(<PluginUninstallModal name={name} title={title} buttonText={buttonText} description={description} />); + showModal(<PluginDisablelModal name={name} title={title} buttonText={buttonText} description={description} />); } public hasPlugin(name: string) { |
