diff --git a/backend-rs/Cargo.lock b/backend-rs/Cargo.lock index b9d3460..53a6a48 100644 --- a/backend-rs/Cargo.lock +++ b/backend-rs/Cargo.lock @@ -247,7 +247,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fantastic-rs" -version = "0.5.0-alpha1" +version = "0.5.0-alpha2" dependencies = [ "log", "nrpc", diff --git a/backend-rs/Cargo.toml b/backend-rs/Cargo.toml index 8ecb949..bf64725 100644 --- a/backend-rs/Cargo.toml +++ b/backend-rs/Cargo.toml @@ -1,7 +1,14 @@ [package] name = "fantastic-rs" -version = "0.5.0-alpha1" +version = "0.5.0-alpha2" edition = "2021" +authors = ["NGnius (Graham) "] +description = "Backend (superuser) functionality for Fantastic" +license = "GPL-3.0-only" +repository = "https://git.ngni.us/NG-SD-Plugins/Fantastic" +keywords = ["utility", "fan-control", "root", "decky"] +readme = "../README.md" + [dependencies] usdpl-back = { version = "0.11", features = ["blocking"], path = "../../usdpl-rs/usdpl-back"} diff --git a/src/index.tsx b/src/index.tsx index 648849b..bc1767c 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,5 @@ import { definePlugin, - DialogButton, PanelSection, PanelSectionRow, Field, @@ -222,8 +221,12 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({serverAPI}) => { if (!usdplReady) { return ( - - + + + If you can read this, something probably went wrong :( + + ); } @@ -302,28 +305,15 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({serverAPI}) => { ); }; -const DeckyPluginRouterTest: VFC = () => { - return ( -
- Hello World! - {}}> - Go to Store - -
- ); -}; - export default definePlugin((serverApi: ServerAPI) => { - serverApi.routerHook.addRoute("/decky-plugin-test", DeckyPluginRouterTest, { - exact: true, - }); - (async function(){ - await backend.initBackend(); - usdplReady = true; - backend.getEnabled(); - name = await backend.getName(); - version = await backend.getVersion(); + if (!usdplReady) { + await backend.initBackend(); + usdplReady = true; + backend.getEnabled(); + name = await backend.getName(); + version = await backend.getVersion(); + } })(); let ico = ; @@ -338,7 +328,6 @@ export default definePlugin((serverApi: ServerAPI) => { icon: ico, onDismount() { clearInterval(periodicHook!); - serverApi.routerHook.removeRoute("/decky-plugin-test"); }, }; }); diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index 6604f5e..1dc1a2a 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -2,6 +2,12 @@ name = "fantastic-wasm" version = "0.5.0" edition = "2021" +authors = ["NGnius (Graham) "] +description = "Frontend bindings for fan control functionality" +license = "GPL-3.0-only" +repository = "https://git.ngni.us/NG-SD-Plugins/Fantastic" +keywords = ["utility", "fan-control", "root", "decky"] +readme = "../../README.md" [lib] crate-type = ["cdylib", "rlib"] @@ -21,7 +27,7 @@ decky = ["usdpl-front/decky"] [profile.release] # Tell `rustc` to optimize for small code size. opt-level = "s" -debug = true # while indev TODO turn off debug info +debug = false strip = true lto = true codegen-units = 4