summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAAGaming <aa@mail.catvibers.me>2022-07-07 00:03:20 -0400
committerAAGaming <aa@mail.catvibers.me>2022-07-07 00:03:20 -0400
commit45949e84565cfcc7524e0975f997d0ea11de2f95 (patch)
treec95bde2aa3e9340d1a2cc9e36dc770907d3524ec
parente3a965329d2c4af130b25afba7f2572a1f1b5abe (diff)
downloaddecky-loader-45949e84565cfcc7524e0975f997d0ea11de2f95.tar.gz
decky-loader-45949e84565cfcc7524e0975f997d0ea11de2f95.zip
support non-ui plugins
-rw-r--r--frontend/src/components/PluginView.tsx22
-rw-r--r--frontend/src/plugin.ts6
2 files changed, 15 insertions, 13 deletions
diff --git a/frontend/src/components/PluginView.tsx b/frontend/src/components/PluginView.tsx
index 953abd25..cc6dbefc 100644
--- a/frontend/src/components/PluginView.tsx
+++ b/frontend/src/components/PluginView.tsx
@@ -12,16 +12,18 @@ const PluginView: VFC = () => {
return (
<PanelSection>
- {plugins.map(({ name, icon }) => (
- <PanelSectionRow key={name}>
- <ButtonItem layout="below" onClick={() => setActivePlugin(name)}>
- <div style={{ display: 'flex', justifyContent: 'space-between' }}>
- <div>{icon}</div>
- <div>{name}</div>
- </div>
- </ButtonItem>
- </PanelSectionRow>
- ))}
+ {plugins
+ .filter((p) => p.content)
+ .map(({ name, icon }) => (
+ <PanelSectionRow key={name}>
+ <ButtonItem layout="below" onClick={() => setActivePlugin(name)}>
+ <div style={{ display: 'flex', justifyContent: 'space-between' }}>
+ <div>{icon}</div>
+ <div>{name}</div>
+ </div>
+ </ButtonItem>
+ </PanelSectionRow>
+ ))}
</PanelSection>
);
};
diff --git a/frontend/src/plugin.ts b/frontend/src/plugin.ts
index 2780d679..ca36e75d 100644
--- a/frontend/src/plugin.ts
+++ b/frontend/src/plugin.ts
@@ -1,6 +1,6 @@
export interface Plugin {
- name: any;
- content: any;
- icon: any;
+ name: string;
+ icon: JSX.Element;
+ content?: JSX.Element;
onDismount?(): void;
}