mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 13:32:01 +00:00
Merge branch 'feat-disable-plugins' into marios8543/plugin-disable
This commit is contained in:
@@ -83,21 +83,22 @@ function PluginInteractables(props: { entry: ReorderableEntry<PluginTableData> }
|
|||||||
>
|
>
|
||||||
{t('PluginListIndex.uninstall')}
|
{t('PluginListIndex.uninstall')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{disabled ? <MenuItem
|
{disabled ?
|
||||||
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> :
|
|
||||||
// implement enabler
|
// 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 ? (
|
{hidden ? (
|
||||||
<MenuItem onSelected={onShow}>{t('PluginListIndex.show')}</MenuItem>
|
<MenuItem onSelected={onShow}>{t('PluginListIndex.show')}</MenuItem>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import Toaster from './toaster';
|
|||||||
import { getVersionInfo } from './updater';
|
import { getVersionInfo } from './updater';
|
||||||
import { getSetting, setSetting } from './utils/settings';
|
import { getSetting, setSetting } from './utils/settings';
|
||||||
import TranslationHelper, { TranslationClass } from './utils/TranslationHelper';
|
import TranslationHelper, { TranslationClass } from './utils/TranslationHelper';
|
||||||
|
import PluginDisablelModal from './components/modals/PluginDisablelModal';
|
||||||
|
|
||||||
const StorePage = lazy(() => import('./components/store/Store'));
|
const StorePage = lazy(() => import('./components/store/Store'));
|
||||||
const SettingsPage = lazy(() => import('./components/settings'));
|
const SettingsPage = lazy(() => import('./components/settings'));
|
||||||
@@ -342,7 +343,7 @@ class PluginLoader extends Logger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public disablePlugin(name: string, title: string, buttonText: string, description: string) {
|
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) {
|
public hasPlugin(name: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user