mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-15 18:13:40 +03:00
@@ -1,8 +1,10 @@
|
||||
import { DialogButton, staticClasses } from 'decky-frontend-lib';
|
||||
import { FaTrash } from 'react-icons/fa';
|
||||
|
||||
import { useDeckyState } from '../../DeckyState';
|
||||
|
||||
export default function PluginList() {
|
||||
const plugins = window.DeckyPluginLoader?.getPlugins();
|
||||
const { plugins } = useDeckyState();
|
||||
|
||||
if (plugins.length === 0) {
|
||||
return (
|
||||
@@ -14,7 +16,7 @@ export default function PluginList() {
|
||||
|
||||
return (
|
||||
<ul style={{ listStyleType: 'none' }}>
|
||||
{window.DeckyPluginLoader?.getPlugins().map(({ name }) => (
|
||||
{plugins.map(({ name }) => (
|
||||
<li style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
||||
<span>{name}</span>
|
||||
<div className={staticClasses.Title} style={{ marginLeft: 'auto', boxShadow: 'none' }}>
|
||||
|
||||
@@ -44,11 +44,13 @@ class PluginLoader extends Logger {
|
||||
});
|
||||
|
||||
this.routerHook.addRoute('/decky/store', () => <StorePage />);
|
||||
this.routerHook.addRoute('/decky/settings', () => <SettingsPage />);
|
||||
}
|
||||
|
||||
public getPlugins() {
|
||||
return this.plugins;
|
||||
this.routerHook.addRoute('/decky/settings', () => {
|
||||
return (
|
||||
<DeckyStateContextProvider deckyState={this.deckyState}>
|
||||
<SettingsPage />
|
||||
</DeckyStateContextProvider>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
public addPluginInstallPrompt(artifact: string, version: string, request_id: string, hash: string) {
|
||||
|
||||
Reference in New Issue
Block a user