diff options
| author | xuatz <xzlow10@gmail.com> | 2025-07-17 17:24:33 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-17 09:24:33 +0100 |
| commit | fe69ca8ce88b51b0117aebfbb512fef16b4ebb35 (patch) | |
| tree | 32b8e96940b8a9de1ffe433347f95f33a47a8614 /apps/mobile/app/dashboard/(tabs)/settings.tsx | |
| parent | a3627569466677d3c0f585af3e04b7ce7a14249f (diff) | |
| download | karakeep-fe69ca8ce88b51b0117aebfbb512fef16b4ebb35.tar.zst | |
feat(mobile): Add user setting for default bookmark view mode (#1723)
* feat(mobile): add user setting for default bookmark view mode
* regen db migration script
* clean up implementation
* Update docs/docs/07-Development/01-setup.md
* Update GEMINI.md
* use local setting instead of storing value in db
* improve start-dev.sh to also handle for db migration
* rename mobileBookmarkClickDefaultViewMode to defaultBookmarkView for consistency
Diffstat (limited to 'apps/mobile/app/dashboard/(tabs)/settings.tsx')
| -rw-r--r-- | apps/mobile/app/dashboard/(tabs)/settings.tsx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/apps/mobile/app/dashboard/(tabs)/settings.tsx b/apps/mobile/app/dashboard/(tabs)/settings.tsx index db118df8..b0ba94df 100644 --- a/apps/mobile/app/dashboard/(tabs)/settings.tsx +++ b/apps/mobile/app/dashboard/(tabs)/settings.tsx @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { Pressable, Text, View } from "react-native"; +import { ActivityIndicator, Pressable, Text, View } from "react-native"; import { Slider } from "react-native-awesome-slider"; import { useSharedValue } from "react-native-reanimated"; import { Link } from "expo-router"; @@ -67,6 +67,31 @@ export default function Dashboard() { </Pressable> </Link> </View> + <View className="flex w-full flex-row items-center justify-between gap-8 rounded-lg bg-white px-4 py-2 dark:bg-accent"> + <Link + asChild + href="/dashboard/settings/bookmark-default-view" + className="flex-1" + > + <Pressable className="flex flex-row justify-between"> + <Text className="text-lg text-accent-foreground"> + Default Bookmark View + </Text> + <View className="flex flex-row items-center gap-2"> + {isSettingsLoading ? ( + <ActivityIndicator size="small" /> + ) : ( + <Text className="text-lg text-muted-foreground"> + {settings.defaultBookmarkView === "reader" + ? "Reader" + : "Browser"} + </Text> + )} + <ChevronRight color="rgb(0, 122, 255)" /> + </View> + </Pressable> + </Link> + </View> <Text className="w-full p-1 text-2xl font-bold text-foreground"> Upload Settings </Text> |
