Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update ItemTypeSelector.tsx (#2287)
Leendert de Borst874c0b3d8b1f
diff --git a/apps/browser-extension/src/entrypoints/popup/components/Items/ItemTypeSelector.tsx b/apps/browser-extension/src/entrypoints/popup/components/Items/ItemTypeSelector.tsxindex 56d28fb64..b37c38670 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Items/ItemTypeSelector.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Items/ItemTypeSelector.tsx@@ -101,7 +101,7 @@ const ItemTypeSelector: React.FC<ItemTypeSelectorProps> = ({<buttontype="button"onClick={onRegenerateAlias}- className="relative flex-shrink-0 -my-1 p-1.5 text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 hover:bg-primary-100 dark:hover:bg-primary-900/40 rounded transition-colors"+ className="relative flex-shrink-0 -my-1 p-1.5 text-primary-600 dark:text-primary-400 hover:text-primary-800 dark:hover:text-primary-300 hover:bg-primary-300 dark:hover:bg-primary-900/40 rounded transition-colors"title={t('itemTypes.regenerateAlias')}><svg className='w-4 h-4' viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">diff --git a/apps/mobile-app/components/items/ItemTypeSelector.tsx b/apps/mobile-app/components/items/ItemTypeSelector.tsxindex 785f2c074..c9daac37e 100644--- a/apps/mobile-app/components/items/ItemTypeSelector.tsx+++ b/apps/mobile-app/components/items/ItemTypeSelector.tsx@@ -84,26 +84,20 @@ export const ItemTypeSelector: React.FC<ItemTypeSelectorProps> = ({paddingVertical: 12,marginBottom: 16,},- dropdownContainer: {- flex: 1,- flexDirection: 'row',- alignItems: 'center',- justifyContent: 'space-between',- },dropdownIcon: {- marginLeft: 8,+ marginLeft: 4,},labelContainer: {+ flex: 1,flexDirection: 'row',alignItems: 'center',- },- labelIcon: {- marginRight: 8,+ justifyContent: 'flex-end',+ marginLeft: 8,},labelText: {color: colors.primary,- fontWeight: '600',- fontSize: 14,+ fontSize: 12,+ opacity: 0.8,},modalContainer: {backgroundColor: 'rgba(0, 0, 0, 0.5)',@@ -143,6 +137,21 @@ export const ItemTypeSelector: React.FC<ItemTypeSelectorProps> = ({borderRadius: 6,marginLeft: 8,padding: 8,+ marginVertical: -6,+ },+ valueContainer: {+ flexDirection: 'row',+ alignItems: 'center',+ flexShrink: 1,+ },+ valueIcon: {+ marginRight: 8,+ },+ valueText: {+ color: colors.primary,+ fontWeight: '600',+ fontSize: 14,+ flexShrink: 1,},});@@ -150,28 +159,19 @@ export const ItemTypeSelector: React.FC<ItemTypeSelectorProps> = ({<View style={styles.container}><RobustPressableonPress={() => setShowDropdown(true)}- style={styles.dropdownContainer}+ style={styles.valueContainer}>- <View style={styles.labelContainer}>- {selectedTypeOption && (- <MaterialIcons- name={selectedTypeOption.icon}- size={20}- color={colors.primary}- style={styles.labelIcon}- />- )}- <ThemedText style={styles.labelText}>- {isEditMode ? t('itemTypes.editing') : t('itemTypes.creating')}{' '}- {selectedTypeOption ? t(selectedTypeOption.titleKey) : ''}- </ThemedText>- </View>- <MaterialIcons- name="keyboard-arrow-down"- size={24}- color={colors.primary}- style={styles.dropdownIcon}- />+ {selectedTypeOption && (+ <MaterialIcons+ name={selectedTypeOption.icon}+ size={20}+ color={colors.primary}+ style={styles.valueIcon}+ />+ )}+ <ThemedText style={styles.valueText} numberOfLines={1}>+ {selectedTypeOption ? t(selectedTypeOption.titleKey) : ''}+ </ThemedText></RobustPressable>{/* Regenerate alias button - only for Alias type in create mode */}@@ -184,6 +184,21 @@ export const ItemTypeSelector: React.FC<ItemTypeSelectorProps> = ({</RobustPressable>)}+ <RobustPressable+ onPress={() => setShowDropdown(true)}+ style={styles.labelContainer}+ >+ <ThemedText style={styles.labelText} numberOfLines={1}>+ {t('itemTypes.typeLabel')}+ </ThemedText>+ <MaterialIcons+ name="keyboard-arrow-down"+ size={24}+ color={colors.primary}+ style={styles.dropdownIcon}+ />+ </RobustPressable>+{/* Type Dropdown Modal */}<Modalvisible={showDropdown}