@@ -3,6 +3,7 @@ package com.x8bit.bitwarden.ui.vault.feature.addedit
3
3
import androidx.compose.foundation.layout.Spacer
4
4
import androidx.compose.foundation.layout.fillMaxWidth
5
5
import androidx.compose.foundation.layout.height
6
+ import androidx.compose.foundation.layout.padding
6
7
import androidx.compose.foundation.lazy.LazyListScope
7
8
import androidx.compose.runtime.Composable
8
9
import androidx.compose.ui.Modifier
@@ -14,6 +15,7 @@ import com.x8bit.bitwarden.R
14
15
import com.x8bit.bitwarden.ui.platform.base.util.standardHorizontalMargin
15
16
import com.x8bit.bitwarden.ui.platform.components.dropdown.BitwardenMultiSelectButton
16
17
import com.x8bit.bitwarden.ui.platform.components.field.BitwardenTextField
18
+ import com.x8bit.bitwarden.ui.platform.components.header.BitwardenListHeaderText
17
19
import com.x8bit.bitwarden.ui.platform.components.model.CardStyle
18
20
import com.x8bit.bitwarden.ui.vault.feature.addedit.handlers.VaultAddEditIdentityTypeHandlers
19
21
import com.x8bit.bitwarden.ui.vault.model.VaultIdentityTitle
@@ -27,6 +29,17 @@ fun LazyListScope.vaultAddEditIdentityItems(
27
29
identityState : VaultAddEditState .ViewState .Content .ItemType .Identity ,
28
30
identityItemTypeHandlers : VaultAddEditIdentityTypeHandlers ,
29
31
) {
32
+ item {
33
+ Spacer (modifier = Modifier .height(16 .dp))
34
+ BitwardenListHeaderText (
35
+ label = stringResource(id = R .string.personal_details),
36
+ modifier = Modifier
37
+ .fillMaxWidth()
38
+ .standardHorizontalMargin()
39
+ .padding(horizontal = 16 .dp),
40
+ )
41
+ }
42
+
30
43
item {
31
44
Spacer (modifier = Modifier .height(8 .dp))
32
45
TitleMultiSelectButton (
@@ -92,19 +105,30 @@ fun LazyListScope.vaultAddEditIdentityItems(
92
105
value = identityState.company,
93
106
onValueChange = identityItemTypeHandlers.onCompanyTextChange,
94
107
textFieldTestTag = " IdentityCompanyEntry" ,
95
- cardStyle = CardStyle .Middle () ,
108
+ cardStyle = CardStyle .Bottom ,
96
109
modifier = Modifier
97
110
.fillMaxWidth()
98
111
.standardHorizontalMargin(),
99
112
)
100
113
}
114
+ item {
115
+ Spacer (modifier = Modifier .height(height = 16 .dp))
116
+ BitwardenListHeaderText (
117
+ label = stringResource(id = R .string.identification),
118
+ modifier = Modifier
119
+ .fillMaxWidth()
120
+ .standardHorizontalMargin()
121
+ .padding(horizontal = 16 .dp),
122
+ )
123
+ Spacer (modifier = Modifier .height(height = 8 .dp))
124
+ }
101
125
item {
102
126
BitwardenTextField (
103
127
label = stringResource(id = R .string.ssn),
104
128
value = identityState.ssn,
105
129
onValueChange = identityItemTypeHandlers.onSsnTextChange,
106
130
textFieldTestTag = " IdentitySsnEntry" ,
107
- cardStyle = CardStyle .Middle (),
131
+ cardStyle = CardStyle .Top (),
108
132
modifier = Modifier
109
133
.fillMaxWidth()
110
134
.standardHorizontalMargin(),
@@ -128,19 +152,30 @@ fun LazyListScope.vaultAddEditIdentityItems(
128
152
value = identityState.licenseNumber,
129
153
onValueChange = identityItemTypeHandlers.onLicenseNumberTextChange,
130
154
textFieldTestTag = " IdentityLicenseNumberEntry" ,
131
- cardStyle = CardStyle .Middle () ,
155
+ cardStyle = CardStyle .Bottom ,
132
156
modifier = Modifier
133
157
.fillMaxWidth()
134
158
.standardHorizontalMargin(),
135
159
)
136
160
}
161
+ item {
162
+ Spacer (modifier = Modifier .height(height = 16 .dp))
163
+ BitwardenListHeaderText (
164
+ label = stringResource(id = R .string.contact_info),
165
+ modifier = Modifier
166
+ .fillMaxWidth()
167
+ .standardHorizontalMargin()
168
+ .padding(horizontal = 16 .dp),
169
+ )
170
+ Spacer (modifier = Modifier .height(height = 8 .dp))
171
+ }
137
172
item {
138
173
BitwardenTextField (
139
174
label = stringResource(id = R .string.email),
140
175
value = identityState.email,
141
176
onValueChange = identityItemTypeHandlers.onEmailTextChange,
142
177
textFieldTestTag = " IdentityEmailEntry" ,
143
- cardStyle = CardStyle .Middle (),
178
+ cardStyle = CardStyle .Top (),
144
179
modifier = Modifier
145
180
.fillMaxWidth()
146
181
.standardHorizontalMargin(),
@@ -152,19 +187,30 @@ fun LazyListScope.vaultAddEditIdentityItems(
152
187
value = identityState.phone,
153
188
onValueChange = identityItemTypeHandlers.onPhoneTextChange,
154
189
textFieldTestTag = " IdentityPhoneEntry" ,
155
- cardStyle = CardStyle .Middle () ,
190
+ cardStyle = CardStyle .Bottom ,
156
191
modifier = Modifier
157
192
.fillMaxWidth()
158
193
.standardHorizontalMargin(),
159
194
)
160
195
}
196
+ item {
197
+ Spacer (modifier = Modifier .height(height = 16 .dp))
198
+ BitwardenListHeaderText (
199
+ label = stringResource(id = R .string.address),
200
+ modifier = Modifier
201
+ .fillMaxWidth()
202
+ .standardHorizontalMargin()
203
+ .padding(horizontal = 16 .dp),
204
+ )
205
+ Spacer (modifier = Modifier .height(height = 8 .dp))
206
+ }
161
207
item {
162
208
BitwardenTextField (
163
209
label = stringResource(id = R .string.address1),
164
210
value = identityState.address1,
165
211
onValueChange = identityItemTypeHandlers.onAddress1TextChange,
166
212
textFieldTestTag = " IdentityAddressOneEntry" ,
167
- cardStyle = CardStyle .Middle (),
213
+ cardStyle = CardStyle .Top (),
168
214
modifier = Modifier
169
215
.fillMaxWidth()
170
216
.standardHorizontalMargin(),
0 commit comments