Skip to content

Commit

Permalink
Applying suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
shech2 committed Jan 3, 2024
1 parent 723610f commit 0c826fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -996,16 +996,17 @@ async function supportCMD(shell: Shell) {
}

// Menu to ask user if they want to send the log or Post it to mail
let fieldsNative = [
const fieldsNative = [
{prompt: "Copy log to clipboard"},
{prompt: "Send log to support"},
{prompt: "Save log to file"},
{prompt: "Cancel"}
]

// Ask user for choice
fieldsNative = !Capacitor.isNativePlatform() ? fieldsNative.splice(2,1) : fieldsNative
const choice = await shell.runForm(fieldsNative,"menu" , "Choose an option") // Switch case to handle user choice
!Capacitor.isNativePlatform() ? fieldsNative.splice(2,1) : fieldsNative
const choice = await shell.runForm(fieldsNative,"menu" , "Choose an option")
// Switch case to handle user choice
switch (choice) {
case "Copy log to clipboard":
// Saving the log to the clipboard
Expand Down

0 comments on commit 0c826fe

Please sign in to comment.