about summary refs log tree commit diff
path: root/src/view/screens/AppPasswords.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens/AppPasswords.tsx')
-rw-r--r--src/view/screens/AppPasswords.tsx41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/view/screens/AppPasswords.tsx b/src/view/screens/AppPasswords.tsx
index c3e837f84..db8ee98ba 100644
--- a/src/view/screens/AppPasswords.tsx
+++ b/src/view/screens/AppPasswords.tsx
@@ -159,24 +159,31 @@ function AppPassword({
   const store = useStores()
 
   const onDelete = React.useCallback(async () => {
-    Alert.alert(
-      'Delete App Password',
-      `Are you sure you want to delete the app password "${name}"?`,
-      [
-        {
-          text: 'Cancel',
-          style: 'cancel',
-        },
-        {
-          text: 'Delete',
-          style: 'destructive',
-          onPress: async () => {
-            await store.me.deleteAppPassword(name)
-            Toast.show('App password deleted')
+    if (isDesktopWeb) {
+      if (confirm('Delete app password?')) {
+        await store.me.deleteAppPassword(name)
+        Toast.show('App password deleted')
+      }
+    } else {
+      Alert.alert(
+        'Delete App Password',
+        `Are you sure you want to delete the app password "${name}"?`,
+        [
+          {
+            text: 'Cancel',
+            style: 'cancel',
           },
-        },
-      ],
-    )
+          {
+            text: 'Delete',
+            style: 'destructive',
+            onPress: async () => {
+              await store.me.deleteAppPassword(name)
+              Toast.show('App password deleted')
+            },
+          },
+        ],
+      )
+    }
   }, [store, name])
 
   return (