From 0817e533de7537eec47d52b4fe385ae0f65ef5cd Mon Sep 17 00:00:00 2001 From: pylixonly <82711525+pylixonly@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:44:34 +0800 Subject: [PATCH] fix: only show plugin browser on dev mode --- scripts/build.mjs | 1 + scripts/serve.mjs | 2 +- src/core/ui/settings/pages/Plugins/index.tsx | 2 +- .../ui/settings/pages/Plugins/sheets/PluginInfoActionSheet.tsx | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 532fd97..f85c88c 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -25,6 +25,7 @@ const { let context = null; +/** @type {import("esbuild").BuildOptions} */ const config = { entryPoints: ["src/entry.ts"], bundle: true, diff --git a/scripts/serve.mjs b/scripts/serve.mjs index addcfd8..05febd3 100644 --- a/scripts/serve.mjs +++ b/scripts/serve.mjs @@ -80,7 +80,7 @@ if (args.adb && isADBAvailableAndAppInstalled()) { if (key.name === "r") { console.info(chalk.yellow(`${chalk.bold("↻ Reloading")} ${packageName}`)); - restartAppFromADB(server.port) + restartAppFromADB(server.address().port) .then(() => console.info(chalk.greenBright(`${chalk.bold("✔ Executed")} reload command`))) .catch(e => console.error(e)); } diff --git a/src/core/ui/settings/pages/Plugins/index.tsx b/src/core/ui/settings/pages/Plugins/index.tsx index 81a7f51..41784c2 100644 --- a/src/core/ui/settings/pages/Plugins/index.tsx +++ b/src/core/ui/settings/pages/Plugins/index.tsx @@ -105,7 +105,7 @@ export default function Plugins() { ; }} - ListFooterComponent={() => ( + ListFooterComponent={() => __DEV__ && (