diff --git a/apps/mobile/src/components/browse/BrowseTags.tsx b/apps/mobile/src/components/browse/BrowseTags.tsx index c1fc51c5a6b9..9dc4cddf1b52 100644 --- a/apps/mobile/src/components/browse/BrowseTags.tsx +++ b/apps/mobile/src/components/browse/BrowseTags.tsx @@ -16,14 +16,18 @@ import { TagModal } from '../modal/tag/TagModal'; type BrowseTagItemProps = { tag: Tag; onPress: () => void; + tagStyle?: string; }; -const BrowseTagItem: React.FC = ({ tag, onPress }) => { +export const BrowseTagItem: React.FC = ({ tag, onPress, tagStyle }) => { const modalRef = useRef(null); return ( { return ( - + Tags - + navigation.navigate('Tags')}> { modalRef.current?.present()}> @@ -92,7 +96,7 @@ const BrowseTags = () => { style={tw`relative h-auto w-[85.5vw] flex-col items-center justify-center overflow-hidden rounded-md border border-dashed border-sidebar-line p-4`} > - + You have no tags diff --git a/apps/mobile/src/components/browse/Categories.tsx b/apps/mobile/src/components/browse/Categories.tsx index 48bfb99f6c84..90dd8d0723b6 100644 --- a/apps/mobile/src/components/browse/Categories.tsx +++ b/apps/mobile/src/components/browse/Categories.tsx @@ -51,7 +51,7 @@ interface CategoryProps { const Category = ({ name, icon }: CategoryProps) => { return ( {icon} {name} diff --git a/apps/mobile/src/components/browse/Jobs.tsx b/apps/mobile/src/components/browse/Jobs.tsx index 960038a20a42..8b006c29fbc4 100644 --- a/apps/mobile/src/components/browse/Jobs.tsx +++ b/apps/mobile/src/components/browse/Jobs.tsx @@ -10,7 +10,7 @@ import Fade from '../layout/Fade'; const Jobs = () => { return ( - + Jobs @@ -45,18 +45,18 @@ const Job = ({ progress, message, error }: JobProps) => { : tw.color('accent'); return ( - Added Memories + Added Memories - + { switch (searchType) { case 'explorer': @@ -93,7 +94,7 @@ export default function Header({ {title || (routeTitle && route?.options.title)} diff --git a/apps/mobile/src/components/settings/SettingsItem.tsx b/apps/mobile/src/components/settings/SettingsItem.tsx index ed36ad6d1562..af0d8b447258 100644 --- a/apps/mobile/src/components/settings/SettingsItem.tsx +++ b/apps/mobile/src/components/settings/SettingsItem.tsx @@ -23,11 +23,11 @@ export function SettingsItem(props: SettingsItemProps) { : 'border-app-input border-l border-r'; return ( - + {props.leftIcon && ( {props.leftIcon({ size: 20, color: tw.color('ink-dull') })} diff --git a/apps/mobile/src/navigation/TabNavigator.tsx b/apps/mobile/src/navigation/TabNavigator.tsx index a5e12120dbca..f9a0d565429f 100644 --- a/apps/mobile/src/navigation/TabNavigator.tsx +++ b/apps/mobile/src/navigation/TabNavigator.tsx @@ -142,7 +142,7 @@ export default function TabNavigator() { tabBarTestID: screen.testID })} listeners={() => ({ - tabPress: () => { + focus: () => { setActiveIndex(index); } })} diff --git a/apps/mobile/src/navigation/tabs/BrowseStack.tsx b/apps/mobile/src/navigation/tabs/BrowseStack.tsx index 2d9d2b2c905f..87044354ff5a 100644 --- a/apps/mobile/src/navigation/tabs/BrowseStack.tsx +++ b/apps/mobile/src/navigation/tabs/BrowseStack.tsx @@ -6,6 +6,7 @@ import BrowseScreen from '~/screens/browse'; import LocationScreen from '~/screens/Location'; import { Locations } from '~/screens/Locations'; import TagScreen from '~/screens/Tag'; +import Tags from '~/screens/Tags'; import { TabScreenProps } from '../TabNavigator'; @@ -36,6 +37,13 @@ export default function BrowseStack() { ) }} /> +
+ }} + /> = diff --git a/apps/mobile/src/screens/Locations.tsx b/apps/mobile/src/screens/Locations.tsx index 91b2b6e972d4..e22a40da26c3 100644 --- a/apps/mobile/src/screens/Locations.tsx +++ b/apps/mobile/src/screens/Locations.tsx @@ -48,7 +48,7 @@ export const Locations = () => { fadeSides="top-bottom" orientation="vertical" color="mobile-screen" - width={50} + width={30} height="100%" > = ({ return ( @@ -114,7 +114,7 @@ const LocationItem: React.FC = ({ {`${byteSize(location.size_in_bytes)}`} diff --git a/apps/mobile/src/screens/Tags.tsx b/apps/mobile/src/screens/Tags.tsx new file mode 100644 index 000000000000..9791aa456cf4 --- /dev/null +++ b/apps/mobile/src/screens/Tags.tsx @@ -0,0 +1,49 @@ +import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs'; +import { useNavigation } from '@react-navigation/native'; +import { View } from 'react-native'; +import { FlatList } from 'react-native-gesture-handler'; +import { useCache, useLibraryQuery, useNodes } from '@sd/client'; +import { BrowseTagItem } from '~/components/browse/BrowseTags'; +import Fade from '~/components/layout/Fade'; +import { tw, twStyle } from '~/lib/tailwind'; +import { BrowseStackScreenProps } from '~/navigation/tabs/BrowseStack'; + +export default function Tags() { + const height = useBottomTabBarHeight(); + const tags = useLibraryQuery(['tags.list']); + const navigation = useNavigation['navigation']>(); + + useNodes(tags.data?.nodes); + const tagData = useCache(tags.data?.items); + return ( + + + ( + + navigation.navigate('Tag', { id: item.id, color: item.color! }) + } + /> + )} + numColumns={3} + columnWrapperStyle={tw`gap-2.5`} + horizontal={false} + keyExtractor={(item) => item.id.toString()} + showsHorizontalScrollIndicator={false} + ItemSeparatorComponent={() => } + contentContainerStyle={tw`py-5`} + /> + + + ); +} diff --git a/interface/app/$libraryId/overview/StatCard.tsx b/interface/app/$libraryId/overview/StatCard.tsx index 09cc1a169f7f..eed8357fcd3f 100644 --- a/interface/app/$libraryId/overview/StatCard.tsx +++ b/interface/app/$libraryId/overview/StatCard.tsx @@ -22,8 +22,8 @@ const StatCard = ({ icon, name, connectionType, ...stats }: StatCardProps) => { const isDark = useIsDark(); const { totalSpace, freeSpace, usedSpaceSpace } = useMemo(() => { - const totalSpace = byteSize(stats.totalSpace) - const freeSpace = stats.freeSpace == null ? totalSpace : byteSize(stats.freeSpace) + const totalSpace = byteSize(stats.totalSpace); + const freeSpace = stats.freeSpace == null ? totalSpace : byteSize(stats.freeSpace); return { totalSpace, freeSpace, @@ -42,7 +42,7 @@ const StatCard = ({ icon, name, connectionType, ...stats }: StatCardProps) => { return ( -
+
{stats.freeSpace && ( { {connectionType || 'Local'}
{/* */}