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