⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
improvements
daniel31x1306e04fa11e6f
diff --git a/apps/mobile/app/(tabs)/settings/index.tsx b/apps/mobile/app/(tabs)/settings/index.tsxindex d5582e6c..025815be 100644--- a/apps/mobile/app/(tabs)/settings/index.tsx+++ b/apps/mobile/app/(tabs)/settings/index.tsx@@ -18,12 +18,14 @@ import {FileText,Globe,LogOut,+ Mail,Moon,Smartphone,Sun,} from "lucide-react-native";import useDataStore from "@/store/data";import { ArchivedFormat } from "@/types/global";+import * as Clipboard from "expo-clipboard";export default function SettingsScreen() {const { signOut, auth } = useAuthStore();@@ -195,6 +197,29 @@ export default function SettingsScreen() {</View></View>+ <View>+ <Text className="mb-4 mx-4 text-neutral">Contact Us</Text>+ <View className="bg-base-200 rounded-xl flex-col">+ <TouchableOpacity+ className="flex-row gap-2 items-center justify-between py-3 px-4"+ onPress={async () => {+ await Clipboard.setStringAsync("[email protected]");+ Alert.alert("Copied to clipboard", "[email protected]");+ }}+ >+ <View className="flex-row items-center gap-2">+ size={20}+ color={rawTheme[colorScheme as ThemeName].neutral}+ />+ <Text className="text-base-content">+ </Text>+ </View>+ </TouchableOpacity>+ </View>+ </View>+<Text className="mx-auto text-sm text-neutral">Linkwarden for {Platform.OS === "ios" ? "iOS" : "Android"}{" "}{nativeApplicationVersion}diff --git a/apps/mobile/app/login.tsx b/apps/mobile/app/login.tsxindex 1ee4eedd..78cdcf0f 100644--- a/apps/mobile/app/login.tsx+++ b/apps/mobile/app/login.tsx@@ -6,6 +6,7 @@ import { Redirect } from "expo-router";import { useColorScheme } from "nativewind";import { useEffect, useState } from "react";import { View, Text, Dimensions, TouchableOpacity, Image } from "react-native";+import { SheetManager } from "react-native-actions-sheet";import Svg, { Path } from "react-native-svg";export default function HomeScreen() {@@ -145,13 +146,18 @@ export default function HomeScreen() {<Buttonvariant="accent"size="lg"- onPress={() =>- signIn(form.user, form.password, form.instance, form.token)- }+ onPress={() => {+ if (((form.user && form.password) || form.token) && form.instance) {+ signIn(form.user, form.password, form.instance, form.token);+ }+ }}><Text className="text-white">Login</Text></Button>- <TouchableOpacity className="w-fit mx-auto">+ <TouchableOpacity+ className="w-fit mx-auto"+ onPress={() => SheetManager.show("support-sheet")}+ ><Text className="text-neutral text-center w-fit">Need help?</Text></TouchableOpacity></View>diff --git a/apps/mobile/components/ActionSheets/Sheets.tsx b/apps/mobile/components/ActionSheets/Sheets.tsxindex 2e5b30eb..59a46be5 100644--- a/apps/mobile/components/ActionSheets/Sheets.tsx+++ b/apps/mobile/components/ActionSheets/Sheets.tsx@@ -3,15 +3,18 @@ import {RouteDefinition,SheetDefinition,} from "react-native-actions-sheet";+import SupportSheet from "./SupportSheet";import AddLinkSheet from "./AddLinkSheet";import EditLinkSheet from "./EditLinkSheet";import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+registerSheet("support-sheet", SupportSheet);registerSheet("add-link-sheet", AddLinkSheet);registerSheet("edit-link-sheet", EditLinkSheet);declare module "react-native-actions-sheet" {interface Sheets {+ "support-sheet": SheetDefinition;"add-link-sheet": SheetDefinition;"edit-link-sheet": SheetDefinition<{payload: {diff --git a/apps/mobile/components/ActionSheets/SupportSheet.tsx b/apps/mobile/components/ActionSheets/SupportSheet.tsxnew file mode 100644index 00000000..d0b21436--- /dev/null+++ b/apps/mobile/components/ActionSheets/SupportSheet.tsx@@ -0,0 +1,37 @@+import { Text, View } from "react-native";+import ActionSheet from "react-native-actions-sheet";+import { rawTheme, ThemeName } from "@/lib/colors";+import { useColorScheme } from "nativewind";+import * as Clipboard from "expo-clipboard";+import { Button } from "../ui/Button";++export default function SupportSheet() {+ const { colorScheme } = useColorScheme();++ async function handleEmailPress() {+ await Clipboard.setStringAsync("[email protected]");+ }++ return (+ <ActionSheet+ gestureEnabled+ indicatorStyle={{+ backgroundColor: rawTheme[colorScheme as ThemeName]["neutral-content"],+ }}+ containerStyle={{+ backgroundColor: rawTheme[colorScheme as ThemeName]["base-100"],+ }}+ >+ <View className="px-8 py-5 flex-col gap-4">+ <Text className="text-2xl font-bold text-base-content">Need help?</Text>+ <Text className="text-base-content">+ Whether you have a question or need assistance, feel free to reach out+ to us at [email protected]+ </Text>+ <Button onPress={handleEmailPress} variant="outline">+ <Text className="text-base-content">Copy Support Email</Text>+ </Button>+ </View>+ </ActionSheet>+ );+}