A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
mobile: Fix keyboard interactions in search and signin form
MohamedBassemcd10200c6457
diff --git a/apps/mobile/app/signin.tsx b/apps/mobile/app/signin.tsxindex 63e48f22..da7e2fea 100644--- a/apps/mobile/app/signin.tsx+++ b/apps/mobile/app/signin.tsx@@ -1,5 +1,12 @@import { useEffect, useState } from "react";-import { Text, View } from "react-native";+import {+ Keyboard,+ KeyboardAvoidingView,+ Platform,+ Text,+ TouchableWithoutFeedback,+ View,+} from "react-native";import { useRouter } from "expo-router";import Logo from "@/components/Logo";import { Button } from "@/components/ui/Button";@@ -48,53 +55,59 @@ export default function Signin() {};return (- <View className="flex h-full flex-col justify-center gap-2 px-4">- <View className="items-center">- <Logo />- </View>- {error && (- <Text className="w-full text-center text-red-500">{error}</Text>- )}- <View className="gap-2">- <Text className="font-bold">Server Address</Text>- <Input- className="w-full"- placeholder="Server Address"- value={settings.address}- autoCapitalize="none"- keyboardType="url"- onEndEditing={(e) =>- setSettings({ ...settings, address: e.nativeEvent.text })- }- />- </View>- <View className="gap-2">- <Text className="font-bold">Email</Text>- <Input- className="w-full"- placeholder="Email"- keyboardType="email-address"- autoCapitalize="none"- value={formData.email}- onChangeText={(e) => setFormData((s) => ({ ...s, email: e }))}- />- </View>- <View className="gap-2">- <Text className="font-bold">Password</Text>- <Input- className="w-full"- placeholder="Password"- secureTextEntry- value={formData.password}- onChangeText={(e) => setFormData((s) => ({ ...s, password: e }))}- />- </View>- <Button- className="w-full"- label="Sign In"- onPress={onSignin}- disabled={isPending}- />- </View>+ <KeyboardAvoidingView+ behavior={Platform.OS === "ios" ? "padding" : "height"}+ >+ <TouchableWithoutFeedback onPress={Keyboard.dismiss}>+ <View className="flex h-full flex-col justify-center gap-2 px-4">+ <View className="items-center">+ <Logo />+ </View>+ {error && (+ <Text className="w-full text-center text-red-500">{error}</Text>+ )}+ <View className="gap-2">+ <Text className="font-bold">Server Address</Text>+ <Input+ className="w-full"+ placeholder="Server Address"+ value={settings.address}+ autoCapitalize="none"+ keyboardType="url"+ onEndEditing={(e) =>+ setSettings({ ...settings, address: e.nativeEvent.text })+ }+ />+ </View>+ <View className="gap-2">+ <Text className="font-bold">Email</Text>+ <Input+ className="w-full"+ placeholder="Email"+ keyboardType="email-address"+ autoCapitalize="none"+ value={formData.email}+ onChangeText={(e) => setFormData((s) => ({ ...s, email: e }))}+ />+ </View>+ <View className="gap-2">+ <Text className="font-bold">Password</Text>+ <Input+ className="w-full"+ placeholder="Password"+ secureTextEntry+ value={formData.password}+ onChangeText={(e) => setFormData((s) => ({ ...s, password: e }))}+ />+ </View>+ <Button+ className="w-full"+ label="Sign In"+ onPress={onSignin}+ disabled={isPending}+ />+ </View>+ </TouchableWithoutFeedback>+ </KeyboardAvoidingView>);}diff --git a/apps/mobile/components/bookmarks/BookmarkList.tsx b/apps/mobile/components/bookmarks/BookmarkList.tsxindex 0c8ddb3c..e3c2bdb1 100644--- a/apps/mobile/components/bookmarks/BookmarkList.tsx+++ b/apps/mobile/components/bookmarks/BookmarkList.tsx@@ -1,5 +1,5 @@import { useEffect, useState } from "react";-import { Text, View } from "react-native";+import { Text, View, Keyboard } from "react-native";import Animated, { LinearTransition } from "react-native-reanimated";import { api } from "@/lib/trpc";@@ -53,6 +53,7 @@ export default function BookmarkList({data={data.bookmarks}refreshing={refreshing}onRefresh={onRefresh}+ onScrollBeginDrag={Keyboard.dismiss}keyExtractor={(b) => b.id}/>);