From b0c6ec5bf1b4e4dd9009d6d407e6b32169e4b557 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Wed, 1 Oct 2025 15:50:31 +0200 Subject: [PATCH] Add better choosing menu for gary API --- plugins/Commands/settings.tsx | 61 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/plugins/Commands/settings.tsx b/plugins/Commands/settings.tsx index 0bdb7b4..8e31a38 100644 --- a/plugins/Commands/settings.tsx +++ b/plugins/Commands/settings.tsx @@ -90,6 +90,35 @@ export default function Settings() { forceRerender(); }; + const showGarySourceSelection = () => { + alerts.showInputAlert({ + title: "Choose Gary Image Source", + content: "Select an image source:", + placeholder: "", + confirmText: "Cancel", + confirmColor: "grey", + onConfirm: () => {}, + extraOptions: [ + { + text: "Gary API", + onPress: () => handleGarySourceChange("gary"), + }, + { + text: "Cat API", + onPress: () => handleGarySourceChange("catapi"), + }, + { + text: "Minker API", + onPress: () => handleGarySourceChange("minker"), + }, + { + text: "Goober API", + onPress: () => handleGarySourceChange("goober"), + }, + ], + }); + }; + return ( { - alerts.showConfirmationAlert({ - title: "Choose Gary Image Source", - content: "Select the source for Gary images:", - confirmText: "Gary API", - confirmColor: "brand", - cancelText: "More Options", - onConfirm: () => handleGarySourceChange("gary"), - onCancel: () => { - alerts.showConfirmationAlert({ - title: "More Image Sources", - content: "Choose another source:", - confirmText: "Cat API", - cancelText: "Even More", - confirmColor: "brand", - onConfirm: () => handleGarySourceChange("catapi"), - onCancel: () => { - alerts.showConfirmationAlert({ - title: "Final Options", - content: "Last two options:", - confirmText: "Minker API", - cancelText: "Goober API", - confirmColor: "brand", - onConfirm: () => handleGarySourceChange("minker"), - onCancel: () => handleGarySourceChange("goober"), - }); - }, - }); - }, - }); - }} + onPress={showGarySourceSelection} />