Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Revert "Update mobile app custom fields draggable UI (#2186)"
Leendert de Borst89c41546bc9a
diff --git a/apps/mobile-app/components/form/AdvancedPasswordField.tsx b/apps/mobile-app/components/form/AdvancedPasswordField.tsxindex 029c2b16a..514f4ffae 100644--- a/apps/mobile-app/components/form/AdvancedPasswordField.tsx+++ b/apps/mobile-app/components/form/AdvancedPasswordField.tsx@@ -274,7 +274,6 @@ const AdvancedPasswordFieldComponent = forwardRef<AdvancedPasswordFieldRef, AdvaflexDirection: 'row',justifyContent: 'space-between',marginBottom: 20,- marginTop: 10,},modalTitle: {color: colors.text,diff --git a/apps/mobile-app/components/form/DraggableCustomFieldsList.tsx b/apps/mobile-app/components/form/DraggableCustomFieldsList.tsxindex ff1679252..020d2760c 100644--- a/apps/mobile-app/components/form/DraggableCustomFieldsList.tsx+++ b/apps/mobile-app/components/form/DraggableCustomFieldsList.tsx@@ -1,3 +1,4 @@+import { MaterialIcons } from '@expo/vector-icons';import * as Haptics from 'expo-haptics';import React, { useCallback } from 'react';import { View, StyleSheet } from 'react-native';@@ -99,26 +100,51 @@ const CustomFieldItem: React.FC<CustomFieldItemProps> = ({container: {backgroundColor: colors.accentBackground,borderRadius: 8,- padding: 8,+ },+ contentContainer: {+ flex: 1,+ },+ dragHandle: {+ alignItems: 'center',+ justifyContent: 'center',+ paddingLeft: 4,+ paddingRight: 0,+ paddingVertical: 12,},labelContainer: {marginBottom: 4,},+ outerContainer: {+ flexDirection: 'row',+ padding: 8,+ paddingRight: 4,+ },});return (<View style={styles.container}>- {/* Label row with inline, right-aligned drag handle */}- <View style={styles.labelContainer}>- <EditableFieldLabel- label={field.label}- onLabelChange={onLabelChange}- onDelete={onDelete}- drag={drag}- />+ <View style={styles.outerContainer}>+ {/* Field content */}+ <View style={styles.contentContainer}>+ {/* Label row */}+ <View style={styles.labelContainer}>+ <EditableFieldLabel+ label={field.label}+ onLabelChange={onLabelChange}+ onDelete={onDelete}+ />+ </View>+ {/* Input field */}+ {renderFieldInput()}+ </View>+ {/* Drag handle on right side */}+ <View+ style={styles.dragHandle}+ onTouchStart={drag}+ >+ <MaterialIcons name="drag-indicator" size={20} color={colors.textMuted} />+ </View></View>- {/* Input field */}- {renderFieldInput()}</View>);};diff --git a/apps/mobile-app/components/form/EditableFieldLabel.tsx b/apps/mobile-app/components/form/EditableFieldLabel.tsxindex 7c7fd7c82..33a5a68f3 100644--- a/apps/mobile-app/components/form/EditableFieldLabel.tsx+++ b/apps/mobile-app/components/form/EditableFieldLabel.tsx@@ -10,8 +10,6 @@ type EditableFieldLabelProps = {label: string;onLabelChange: (newLabel: string) => void;onDelete?: () => void;- /** When provided, shows a right-aligned drag handle on the label line that starts reordering. */- drag?: () => void;}/**@@ -21,8 +19,7 @@ type EditableFieldLabelProps = {export const EditableFieldLabel: React.FC<EditableFieldLabelProps> = ({label,onLabelChange,- onDelete,- drag+ onDelete}) => {const colors = useColors();const [isEditing, setIsEditing] = useState(false);@@ -72,10 +69,6 @@ export const EditableFieldLabel: React.FC<EditableFieldLabelProps> = ({deleteButton: {marginLeft: 4,},- dragHandle: {- marginLeft: 'auto',- padding: 2,- },editButton: {marginLeft: 4,padding: 2,@@ -159,15 +152,6 @@ export const EditableFieldLabel: React.FC<EditableFieldLabelProps> = ({<MaterialIcons name="delete" size={14} color={colors.destructive} /></TouchableHighlight>)}- {drag && (- <TouchableHighlight- style={[styles.actionButton, styles.dragHandle]}- onPressIn={drag}- underlayColor={colors.accentBackground}- >- <MaterialIcons name="drag-indicator" size={18} color={colors.textMuted} />- </TouchableHighlight>- )}</View>);};