summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/index.tsx26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/index.tsx b/src/index.tsx
index 390454b..288e1e6 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -3,6 +3,7 @@ import {
PanelSection,
PanelSectionRow,
ButtonItem,
+ Router,
} from "@decky/ui";
import { definePlugin, callable } from "@decky/api";
import { FaShip } from "react-icons/fa";
@@ -153,10 +154,33 @@ function FGModInstallerSection() {
);
}
+function MainRunningApp() {
+ const mainRunningApp = Router.MainRunningApp;
+
+ return (
+ <PanelSection title="Main Running App">
+ <PanelSectionRow>
+ <div>
+ {mainRunningApp ? (
+ <span>Main Running App: {mainRunningApp.display_name}</span>
+ ) : (
+ <span>No app is currently running.</span>
+ )}
+ </div>
+ </PanelSectionRow>
+ </PanelSection>
+ );
+}
+
export default definePlugin(() => ({
name: "Framegen Plugin",
titleView: <div>Framegen Plugin</div>,
- content: <MainContent />,
+ content: (
+ <>
+ <MainContent />
+ <MainRunningApp />
+ </>
+ ),
icon: <FaShip />,
onDismount() {
console.log("Framegen Plugin unmounted");