fix: only show plugin browser on dev mode

This commit is contained in:
pylixonly 2024-12-26 10:44:34 +08:00
parent 85cbac714a
commit 0817e533de
4 changed files with 4 additions and 3 deletions

View file

@ -25,6 +25,7 @@ const {
let context = null; let context = null;
/** @type {import("esbuild").BuildOptions} */
const config = { const config = {
entryPoints: ["src/entry.ts"], entryPoints: ["src/entry.ts"],
bundle: true, bundle: true,

View file

@ -80,7 +80,7 @@ if (args.adb && isADBAvailableAndAppInstalled()) {
if (key.name === "r") { if (key.name === "r") {
console.info(chalk.yellow(`${chalk.bold("↻ Reloading")} ${packageName}`)); 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`))) .then(() => console.info(chalk.greenBright(`${chalk.bold("✔ Executed")} reload command`)))
.catch(e => console.error(e)); .catch(e => console.error(e));
} }

View file

@ -105,7 +105,7 @@ export default function Plugins() {
</Card> </Card>
</View>; </View>;
}} }}
ListFooterComponent={() => ( ListFooterComponent={() => __DEV__ && (
<View style={{ alignItems: "center", justifyContent: "center", paddingTop: 16, gap: 12 }}><Button <View style={{ alignItems: "center", justifyContent: "center", paddingTop: 16, gap: 12 }}><Button
size="lg" size="lg"
text="Browse Plugins" text="Browse Plugins"

View file

@ -42,7 +42,7 @@ export default function PluginInfoActionSheet({ plugin, navigation }: PluginInfo
// }, // },
{ {
label: "Clear Data", label: "Clear Data",
iconSource: findAssetId("CopyIcon"), iconSource: findAssetId("FileIcon"),
variant: "destructive", variant: "destructive",
action: () => { action: () => {
} }