summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-09 17:39:13 -0500
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-09 17:39:13 -0500
commit6ffa297175d785bb2ef95c2f39d6d0f9a52cc795 (patch)
tree7de27aa78881b833718c00fe2c604c417ba14ce1
parent67f5dce2e5db6594beceb4aced270f691ad71874 (diff)
downloaddecky-bazzite-buddy-6ffa297175d785bb2ef95c2f39d6d0f9a52cc795.tar.gz
decky-bazzite-buddy-6ffa297175d785bb2ef95c2f39d6d0f9a52cc795.zip
fix: definePlugin draft
-rwxr-xr-xsrc/index.tsx32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/index.tsx b/src/index.tsx
index b0138b7..b8e33d1 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -45,39 +45,15 @@ function Content() {
}
export default definePlugin(() => {
- console.log("Template plugin initializing, this is called once on frontend startup")
-
- // serverApi.routerHook.addRoute("/decky-plugin-test", DeckyPluginRouterTest, {
- // exact: true,
- // });
-
- // Add an event listener to the "timer_event" event from the backend
- const listener = addEventListener<[
- test1: string,
- test2: boolean,
- test3: number
- ]>("timer_event", (test1, test2, test3) => {
- console.log("Template got timer_event with:", test1, test2, test3)
- toaster.toast({
- title: "template got timer_event",
- body: `${test1}, ${test2}, ${test3}`
- });
- });
+ console.log("WebPage Viewer plugin initializing");
return {
- // The name shown in various decky menus
- name: "Web Plugin",
- // The element displayed at the top of your plugin's menu
- titleView: <div className={staticClasses.Title}>Decky Example Plugin</div>,
- // The content of your plugin's menu
+ name: "WebPage Viewer",
+ titleView: <div className={staticClasses.Title}>WebPage Viewer</div>,
content: <Content />,
- // The icon displayed in the plugin list
icon: <FaShip />,
- // The function triggered when your plugin unloads
onDismount() {
- console.log("Unloading")
- removeEventListener("timer_event", listener);
- // serverApi.routerHook.removeRoute("/decky-plugin-test");
+ console.log("WebPage Viewer plugin unloaded");
},
};
});