From 6ffa297175d785bb2ef95c2f39d6d0f9a52cc795 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 9 Jan 2025 17:39:13 -0500 Subject: fix: definePlugin draft --- src/index.tsx | 32 ++++---------------------------- 1 file 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:
Decky Example Plugin
, - // The content of your plugin's menu + name: "WebPage Viewer", + titleView:
WebPage Viewer
, content: , - // The icon displayed in the plugin list icon: , - // 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"); }, }; }); -- cgit v1.2.3