Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Show folder for search results in mobile app (#1665)

Leendert de Borstf9986894d10e
diff --git a/apps/mobile-app/app/(tabs)/items/index.tsx b/apps/mobile-app/app/(tabs)/items/index.tsx
index 7564ad6af..3af8adef0 100644
--- a/apps/mobile-app/app/(tabs)/items/index.tsx
+++ b/apps/mobile-app/app/(tabs)/items/index.tsx
@@ -1177,7 +1177,7 @@ export default function ItemsScreen(): React.ReactNode {
isLoadingItems ? (
<SkeletonLoader count={1} height={60} parts={2} />
) : (
- <ItemCard item={itm} onItemDelete={onItemDelete} />
+ <ItemCard item={itm} onItemDelete={onItemDelete} showFolderPath={!!searchQuery} />
)
}
ListEmptyComponent={renderEmptyComponent() as React.ReactElement}
diff --git a/apps/mobile-app/components/items/ItemCard.tsx b/apps/mobile-app/components/items/ItemCard.tsx
index c9c1cea37..ea877b95b 100644
--- a/apps/mobile-app/components/items/ItemCard.tsx
+++ b/apps/mobile-app/components/items/ItemCard.tsx
@@ -19,12 +19,13 @@ import { getFieldValue, FieldKey } from '@/utils/dist/core/models/vault';
type ItemCardProps = {
item: Item;
onItemDelete?: (itemId: string) => Promise<void>;
+ showFolderPath?: boolean;
};
/**
* Item card component for displaying vault items in a list.
*/
-export function ItemCard({ item, onItemDelete }: ItemCardProps): React.ReactNode {
+export function ItemCard({ item, onItemDelete, showFolderPath = false }: ItemCardProps): React.ReactNode {
const colors = useColors();
const { t } = useTranslation();
const { showConfirm } = useDialog();
@@ -257,6 +258,11 @@ export function ItemCard({ item, onItemDelete }: ItemCardProps): React.ReactNode
serviceNameRow: {
alignItems: 'center',
flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ folderPath: {
+ color: colors.textMuted,
+ fontSize: 14,
},
});
@@ -284,6 +290,9 @@ export function ItemCard({ item, onItemDelete }: ItemCardProps): React.ReactNode
<ItemIcon item={item} style={styles.logo} />
<View style={styles.itemInfo}>
<View style={styles.serviceNameRow}>
+ {showFolderPath && item.FolderPath && (
+ <Text style={styles.folderPath}>{item.FolderPath} &gt; </Text>
+ )}
<Text style={styles.serviceName}>
{getItemName(item)}
</Text>