A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
mobile: Change bookmark cards images to not have any paddings
MohamedBassemc7f60955d94c
diff --git a/packages/mobile/app/sharing.tsx b/packages/mobile/app/sharing.tsxindex 5fb5ef8e..41c3212e 100644--- a/packages/mobile/app/sharing.tsx+++ b/packages/mobile/app/sharing.tsx@@ -48,8 +48,6 @@ export default function Sharing() {const router = useRouter();const [mode, setMode] = useState<Mode>({ type: "idle" });- const isInModal = router.canGoBack();-let comp;switch (mode.type) {case "idle": {@@ -72,12 +70,8 @@ export default function Sharing() {return;}- if (!isInModal) {- return;- }-const timeoutId = setTimeout(() => {- router.replace("../");+ router.replace("dashboard");}, 2000);return () => clearTimeout(timeoutId);@@ -86,7 +80,7 @@ export default function Sharing() {return (<View className="flex-1 items-center justify-center gap-4">{comp}- {isInModal ? <Link href="../">Dismiss</Link> : <Link href="/">Home</Link>}+ <Link href="dashboard">Dismiss</Link></View>);}diff --git a/packages/mobile/components/bookmarks/BookmarkCard.tsx b/packages/mobile/components/bookmarks/BookmarkCard.tsxindex 9b8b72f8..b6dd0f07 100644--- a/packages/mobile/components/bookmarks/BookmarkCard.tsx+++ b/packages/mobile/components/bookmarks/BookmarkCard.tsx@@ -117,24 +117,28 @@ function LinkCard({ bookmark }: { bookmark: ZBookmark }) {throw new Error("Wrong content type rendered");}- const parsedUrl = new URL(bookmark.content.url);+ const url = bookmark.content.url;+ const parsedUrl = new URL(url);const imageComp = bookmark.content.imageUrl ? (<Imagesource={{ uri: bookmark.content.imageUrl }}- className="h-56 min-h-56 w-full"+ className="h-56 min-h-56 w-full rounded-t object-cover"/>) : (- <Image source={require("@/assets/blur.jpeg")} className="h-56 w-full" />+ <Image+ source={require("@/assets/blur.jpeg")}+ className="h-56 w-full rounded-t"+ />);return (<View className="flex gap-2">{imageComp}- <View className="flex gap-2">+ <View className="flex gap-2 p-2"><TextclassName="line-clamp-2 text-xl font-bold"- onPress={() => WebBrowser.openBrowserAsync(bookmark.content.url)}+ onPress={() => WebBrowser.openBrowserAsync(url)}>{bookmark.content.title || parsedUrl.host}</Text>@@ -153,7 +157,7 @@ function TextCard({ bookmark }: { bookmark: ZBookmark }) {throw new Error("Wrong content type rendered");}return (- <View className="flex max-h-96 gap-2">+ <View className="flex max-h-96 gap-2 p-2"><View className="max-h-56 overflow-hidden pb-2"><Markdown>{bookmark.content.text}</Markdown></View>@@ -201,5 +205,5 @@ export default function BookmarkCard({break;}- return <View className="rounded bg-white p-4">{comp}</View>;+ return <View className="rounded bg-white">{comp}</View>;}diff --git a/packages/mobile/components/bookmarks/BookmarkList.tsx b/packages/mobile/components/bookmarks/BookmarkList.tsxindex 223b1bf4..130c8924 100644--- a/packages/mobile/components/bookmarks/BookmarkList.tsx+++ b/packages/mobile/components/bookmarks/BookmarkList.tsx@@ -46,15 +46,17 @@ export default function BookmarkList({}return (- <FlatList- contentContainerStyle={{- marginTop: 10,- gap: 10,- }}- renderItem={(b) => <BookmarkCard key={b.item.id} bookmark={b.item} />}- data={data.bookmarks}- refreshing={refreshing}- onRefresh={onRefresh}- />+ <View className="px-3">+ <FlatList+ contentContainerStyle={{+ marginTop: 10,+ gap: 10,+ }}+ renderItem={(b) => <BookmarkCard key={b.item.id} bookmark={b.item} />}+ data={data.bookmarks}+ refreshing={refreshing}+ onRefresh={onRefresh}+ />+ </View>);}