Audit: .dp → AppSpacing/AppRadius (tokenization, partial sweep)
Replaces ~163 raw .dp values with design-system tokens per CLAUDE.md rule. Covers most visible screens (Tasks, Residences, Profile, Documents, dialogs, kanban, forms). Adds AppSpacing/AppRadius imports where missing. Remaining sites are geometric/canvas values (stroke widths, icon sizes, non-standard values like 6.dp/14.dp/20.dp) or don't map to existing tokens. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,8 @@ import com.tt.honeyDue.network.ApiResult
|
|||||||
import com.tt.honeyDue.repository.LookupsRepository
|
import com.tt.honeyDue.repository.LookupsRepository
|
||||||
import com.tt.honeyDue.analytics.PostHogAnalytics
|
import com.tt.honeyDue.analytics.PostHogAnalytics
|
||||||
import com.tt.honeyDue.analytics.AnalyticsEvents
|
import com.tt.honeyDue.analytics.AnalyticsEvents
|
||||||
|
import com.tt.honeyDue.ui.theme.AppRadius
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import org.jetbrains.compose.resources.stringResource
|
import org.jetbrains.compose.resources.stringResource
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@@ -135,7 +137,7 @@ fun AddContractorDialog(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.heightIn(max = 500.dp)
|
.heightIn(max = 500.dp)
|
||||||
.verticalScroll(rememberScrollState()),
|
.verticalScroll(rememberScrollState()),
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
// Basic Information Section
|
// Basic Information Section
|
||||||
Text(
|
Text(
|
||||||
@@ -153,7 +155,7 @@ fun AddContractorDialog(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.testTag(AccessibilityIds.Contractor.nameField),
|
.testTag(AccessibilityIds.Contractor.nameField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.Person, null) },
|
leadingIcon = { Icon(Icons.Default.Person, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -169,7 +171,7 @@ fun AddContractorDialog(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.testTag(AccessibilityIds.Contractor.companyField),
|
.testTag(AccessibilityIds.Contractor.companyField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.Business, null) },
|
leadingIcon = { Icon(Icons.Default.Business, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -191,7 +193,7 @@ fun AddContractorDialog(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.menuAnchor(),
|
.menuAnchor(),
|
||||||
trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expandedResidenceMenu) },
|
trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expandedResidenceMenu) },
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.Home, null) },
|
leadingIcon = { Icon(Icons.Default.Home, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -235,7 +237,7 @@ fun AddContractorDialog(
|
|||||||
color = Color(0xFF6B7280)
|
color = Color(0xFF6B7280)
|
||||||
)
|
)
|
||||||
|
|
||||||
HorizontalDivider(modifier = Modifier.padding(vertical = 4.dp))
|
HorizontalDivider(modifier = Modifier.padding(vertical = AppSpacing.xs))
|
||||||
|
|
||||||
// Contact Information Section
|
// Contact Information Section
|
||||||
Text(
|
Text(
|
||||||
@@ -253,7 +255,7 @@ fun AddContractorDialog(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.testTag(AccessibilityIds.Contractor.phoneField),
|
.testTag(AccessibilityIds.Contractor.phoneField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.Phone, null) },
|
leadingIcon = { Icon(Icons.Default.Phone, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -269,7 +271,7 @@ fun AddContractorDialog(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.testTag(AccessibilityIds.Contractor.emailField),
|
.testTag(AccessibilityIds.Contractor.emailField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.Email, null) },
|
leadingIcon = { Icon(Icons.Default.Email, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -283,7 +285,7 @@ fun AddContractorDialog(
|
|||||||
label = { Text(stringResource(Res.string.contractors_form_website)) },
|
label = { Text(stringResource(Res.string.contractors_form_website)) },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.Language, null) },
|
leadingIcon = { Icon(Icons.Default.Language, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -291,7 +293,7 @@ fun AddContractorDialog(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
HorizontalDivider(modifier = Modifier.padding(vertical = 4.dp))
|
HorizontalDivider(modifier = Modifier.padding(vertical = AppSpacing.xs))
|
||||||
|
|
||||||
// Specialties Section
|
// Specialties Section
|
||||||
Text(
|
Text(
|
||||||
@@ -304,8 +306,8 @@ fun AddContractorDialog(
|
|||||||
// Multi-select specialties using chips
|
// Multi-select specialties using chips
|
||||||
FlowRow(
|
FlowRow(
|
||||||
modifier = Modifier.testTag(AccessibilityIds.Contractor.specialtyPicker),
|
modifier = Modifier.testTag(AccessibilityIds.Contractor.specialtyPicker),
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.sm)
|
||||||
) {
|
) {
|
||||||
contractorSpecialties.forEach { specialty ->
|
contractorSpecialties.forEach { specialty ->
|
||||||
FilterChip(
|
FilterChip(
|
||||||
@@ -326,7 +328,7 @@ fun AddContractorDialog(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HorizontalDivider(modifier = Modifier.padding(vertical = 4.dp))
|
HorizontalDivider(modifier = Modifier.padding(vertical = AppSpacing.xs))
|
||||||
|
|
||||||
// Address Section
|
// Address Section
|
||||||
Text(
|
Text(
|
||||||
@@ -342,7 +344,7 @@ fun AddContractorDialog(
|
|||||||
label = { Text(stringResource(Res.string.contractors_form_street_address)) },
|
label = { Text(stringResource(Res.string.contractors_form_street_address)) },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.LocationOn, null) },
|
leadingIcon = { Icon(Icons.Default.LocationOn, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -350,14 +352,14 @@ fun AddContractorDialog(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
Row(horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm)) {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = city,
|
value = city,
|
||||||
onValueChange = { city = it },
|
onValueChange = { city = it },
|
||||||
label = { Text(stringResource(Res.string.contractors_form_city)) },
|
label = { Text(stringResource(Res.string.contractors_form_city)) },
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
unfocusedBorderColor = Color(0xFFE5E7EB)
|
unfocusedBorderColor = Color(0xFFE5E7EB)
|
||||||
@@ -370,7 +372,7 @@ fun AddContractorDialog(
|
|||||||
label = { Text(stringResource(Res.string.contractors_form_state)) },
|
label = { Text(stringResource(Res.string.contractors_form_state)) },
|
||||||
modifier = Modifier.weight(0.5f),
|
modifier = Modifier.weight(0.5f),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
unfocusedBorderColor = Color(0xFFE5E7EB)
|
unfocusedBorderColor = Color(0xFFE5E7EB)
|
||||||
@@ -384,14 +386,14 @@ fun AddContractorDialog(
|
|||||||
label = { Text(stringResource(Res.string.contractors_form_zip_code)) },
|
label = { Text(stringResource(Res.string.contractors_form_zip_code)) },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
unfocusedBorderColor = Color(0xFFE5E7EB)
|
unfocusedBorderColor = Color(0xFFE5E7EB)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
HorizontalDivider(modifier = Modifier.padding(vertical = 4.dp))
|
HorizontalDivider(modifier = Modifier.padding(vertical = AppSpacing.xs))
|
||||||
|
|
||||||
// Notes Section
|
// Notes Section
|
||||||
Text(
|
Text(
|
||||||
@@ -410,7 +412,7 @@ fun AddContractorDialog(
|
|||||||
.height(100.dp)
|
.height(100.dp)
|
||||||
.testTag(AccessibilityIds.Contractor.notesField),
|
.testTag(AccessibilityIds.Contractor.notesField),
|
||||||
maxLines = 4,
|
maxLines = 4,
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
leadingIcon = { Icon(Icons.Default.Notes, null) },
|
leadingIcon = { Icon(Icons.Default.Notes, null) },
|
||||||
colors = OutlinedTextFieldDefaults.colors(
|
colors = OutlinedTextFieldDefaults.colors(
|
||||||
focusedBorderColor = Color(0xFF3B82F6),
|
focusedBorderColor = Color(0xFF3B82F6),
|
||||||
@@ -429,7 +431,7 @@ fun AddContractorDialog(
|
|||||||
contentDescription = null, // decorative
|
contentDescription = null, // decorative
|
||||||
tint = if (isFavorite) Color(0xFFF59E0B) else Color(0xFF9CA3AF)
|
tint = if (isFavorite) Color(0xFFF59E0B) else Color(0xFF9CA3AF)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text(stringResource(Res.string.contractors_form_mark_favorite), color = Color(0xFF111827))
|
Text(stringResource(Res.string.contractors_form_mark_favorite), color = Color(0xFF111827))
|
||||||
}
|
}
|
||||||
Switch(
|
Switch(
|
||||||
@@ -526,6 +528,6 @@ fun AddContractorDialog(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
containerColor = Color.White,
|
containerColor = Color.White,
|
||||||
shape = RoundedCornerShape(16.dp)
|
shape = RoundedCornerShape(AppRadius.lg)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ import com.tt.honeyDue.platform.rememberImagePicker
|
|||||||
import com.tt.honeyDue.platform.rememberCameraPicker
|
import com.tt.honeyDue.platform.rememberCameraPicker
|
||||||
import com.tt.honeyDue.platform.HapticFeedbackType
|
import com.tt.honeyDue.platform.HapticFeedbackType
|
||||||
import com.tt.honeyDue.platform.rememberHapticFeedback
|
import com.tt.honeyDue.platform.rememberHapticFeedback
|
||||||
|
import com.tt.honeyDue.ui.theme.AppRadius
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import com.tt.honeyDue.platform.rememberImageBitmap
|
import com.tt.honeyDue.platform.rememberImageBitmap
|
||||||
import com.tt.honeyDue.ui.haptics.Haptics
|
import com.tt.honeyDue.ui.haptics.Haptics
|
||||||
import kotlinx.datetime.*
|
import kotlinx.datetime.*
|
||||||
@@ -95,7 +97,7 @@ fun CompleteTaskDialog(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.verticalScroll(rememberScrollState()),
|
.verticalScroll(rememberScrollState()),
|
||||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.lg)
|
||||||
) {
|
) {
|
||||||
// Contractor Selection Dropdown
|
// Contractor Selection Dropdown
|
||||||
ExposedDropdownMenuBox(
|
ExposedDropdownMenuBox(
|
||||||
@@ -224,7 +226,7 @@ fun CompleteTaskDialog(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
|
|
||||||
// Interactive Star Rating
|
// Interactive Star Rating
|
||||||
Row(
|
Row(
|
||||||
@@ -271,12 +273,12 @@ fun CompleteTaskDialog(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
|
|
||||||
// Photo buttons
|
// Photo buttons
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm)
|
||||||
) {
|
) {
|
||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
@@ -291,7 +293,7 @@ fun CompleteTaskDialog(
|
|||||||
contentDescription = null, // decorative
|
contentDescription = null, // decorative
|
||||||
modifier = Modifier.size(18.dp)
|
modifier = Modifier.size(18.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.xs))
|
||||||
Text(stringResource(Res.string.completions_camera))
|
Text(stringResource(Res.string.completions_camera))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,20 +310,20 @@ fun CompleteTaskDialog(
|
|||||||
contentDescription = null, // decorative
|
contentDescription = null, // decorative
|
||||||
modifier = Modifier.size(18.dp)
|
modifier = Modifier.size(18.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.xs))
|
||||||
Text(stringResource(Res.string.completions_library))
|
Text(stringResource(Res.string.completions_library))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Image thumbnails with preview
|
// Image thumbnails with preview
|
||||||
if (selectedImages.isNotEmpty()) {
|
if (selectedImages.isNotEmpty()) {
|
||||||
Spacer(modifier = Modifier.height(12.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.md))
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.horizontalScroll(rememberScrollState()),
|
.horizontalScroll(rememberScrollState()),
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm)
|
||||||
) {
|
) {
|
||||||
selectedImages.forEachIndexed { index, imageData ->
|
selectedImages.forEachIndexed { index, imageData ->
|
||||||
ImageThumbnail(
|
ImageThumbnail(
|
||||||
@@ -339,7 +341,7 @@ fun CompleteTaskDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Helper text
|
// Helper text
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.xs))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.completions_add_photos_helper),
|
text = stringResource(Res.string.completions_add_photos_helper),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
@@ -411,7 +413,7 @@ private fun ImageThumbnail(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(80.dp)
|
.size(80.dp)
|
||||||
.clip(RoundedCornerShape(8.dp))
|
.clip(RoundedCornerShape(AppRadius.sm))
|
||||||
.background(MaterialTheme.colorScheme.surfaceVariant)
|
.background(MaterialTheme.colorScheme.surfaceVariant)
|
||||||
) {
|
) {
|
||||||
if (imageBitmap != null) {
|
if (imageBitmap != null) {
|
||||||
@@ -440,7 +442,7 @@ private fun ImageThumbnail(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.TopEnd)
|
.align(Alignment.TopEnd)
|
||||||
.padding(4.dp)
|
.padding(AppSpacing.xs)
|
||||||
.size(20.dp)
|
.size(20.dp)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(MaterialTheme.colorScheme.error)
|
.background(MaterialTheme.colorScheme.error)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import androidx.compose.ui.text.style.TextAlign
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import honeydue.composeapp.generated.resources.*
|
import honeydue.composeapp.generated.resources.*
|
||||||
import com.tt.honeyDue.models.SharedContractor
|
import com.tt.honeyDue.models.SharedContractor
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import org.jetbrains.compose.resources.stringResource
|
import org.jetbrains.compose.resources.stringResource
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -69,7 +70,7 @@ fun ContractorImportConfirmDialog(
|
|||||||
textAlign = TextAlign.Center
|
textAlign = TextAlign.Center
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.lg))
|
||||||
|
|
||||||
// Contractor details
|
// Contractor details
|
||||||
Column(
|
Column(
|
||||||
@@ -91,7 +92,7 @@ fun ContractorImportConfirmDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sharedContractor.specialtyNames.isNotEmpty()) {
|
if (sharedContractor.specialtyNames.isNotEmpty()) {
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = sharedContractor.specialtyNames.joinToString(", "),
|
text = sharedContractor.specialtyNames.joinToString(", "),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
@@ -100,7 +101,7 @@ fun ContractorImportConfirmDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
sharedContractor.exportedBy?.let { exportedBy ->
|
sharedContractor.exportedBy?.let { exportedBy ->
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.contractors_shared_by, exportedBy),
|
text = stringResource(Res.string.contractors_shared_by, exportedBy),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
@@ -124,7 +125,7 @@ fun ContractorImportConfirmDialog(
|
|||||||
strokeWidth = 2.dp,
|
strokeWidth = 2.dp,
|
||||||
color = MaterialTheme.colorScheme.onPrimary
|
color = MaterialTheme.colorScheme.onPrimary
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text(stringResource(Res.string.common_importing))
|
Text(stringResource(Res.string.common_importing))
|
||||||
} else {
|
} else {
|
||||||
Text(stringResource(Res.string.common_import))
|
Text(stringResource(Res.string.common_import))
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import com.tt.honeyDue.models.ResidenceUser
|
|||||||
import com.tt.honeyDue.models.ResidenceShareCode
|
import com.tt.honeyDue.models.ResidenceShareCode
|
||||||
import com.tt.honeyDue.network.ApiResult
|
import com.tt.honeyDue.network.ApiResult
|
||||||
import com.tt.honeyDue.network.APILayer
|
import com.tt.honeyDue.network.APILayer
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -81,7 +82,7 @@ fun ManageUsersDialog(
|
|||||||
tint = MaterialTheme.colorScheme.primary,
|
tint = MaterialTheme.colorScheme.primary,
|
||||||
modifier = Modifier.size(28.dp)
|
modifier = Modifier.size(28.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text("Invite Others")
|
Text("Invite Others")
|
||||||
}
|
}
|
||||||
IconButton(onClick = onDismiss) {
|
IconButton(onClick = onDismiss) {
|
||||||
@@ -102,32 +103,32 @@ fun ManageUsersDialog(
|
|||||||
Text(
|
Text(
|
||||||
text = error ?: "Unknown error",
|
text = error ?: "Unknown error",
|
||||||
color = MaterialTheme.colorScheme.error,
|
color = MaterialTheme.colorScheme.error,
|
||||||
modifier = Modifier.padding(16.dp)
|
modifier = Modifier.padding(AppSpacing.lg)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
// Share sections (primary owner only)
|
// Share sections (primary owner only)
|
||||||
if (isPrimaryOwner) {
|
if (isPrimaryOwner) {
|
||||||
// Easy Share section (on top - recommended)
|
// Easy Share section (on top - recommended)
|
||||||
Card(
|
Card(
|
||||||
modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp),
|
modifier = Modifier.fillMaxWidth().padding(bottom = AppSpacing.sm),
|
||||||
colors = CardDefaults.cardColors(
|
colors = CardDefaults.cardColors(
|
||||||
containerColor = MaterialTheme.colorScheme.surfaceVariant
|
containerColor = MaterialTheme.colorScheme.surfaceVariant
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.padding(16.dp)) {
|
Column(modifier = Modifier.padding(AppSpacing.lg)) {
|
||||||
Text(
|
Text(
|
||||||
text = "Easy Share",
|
text = "Easy Share",
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
onClick = { onSharePackage() },
|
onClick = { onSharePackage() },
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
Icon(Icons.Default.Share, "Share", modifier = Modifier.size(18.dp))
|
Icon(Icons.Default.Share, "Share", modifier = Modifier.size(18.dp))
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text("Send Invite Link")
|
Text("Send Invite Link")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,14 +136,14 @@ fun ManageUsersDialog(
|
|||||||
text = "Send a .honeydue file via Messages, Email, or share. They just tap to join.",
|
text = "Send a .honeydue file via Messages, Email, or share. They just tap to join.",
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
modifier = Modifier.padding(top = 8.dp)
|
modifier = Modifier.padding(top = AppSpacing.sm)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Divider with "or"
|
// Divider with "or"
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp),
|
modifier = Modifier.fillMaxWidth().padding(vertical = AppSpacing.sm),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
HorizontalDivider(modifier = Modifier.weight(1f))
|
HorizontalDivider(modifier = Modifier.weight(1f))
|
||||||
@@ -150,25 +151,25 @@ fun ManageUsersDialog(
|
|||||||
text = "or",
|
text = "or",
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
modifier = Modifier.padding(horizontal = 16.dp)
|
modifier = Modifier.padding(horizontal = AppSpacing.lg)
|
||||||
)
|
)
|
||||||
HorizontalDivider(modifier = Modifier.weight(1f))
|
HorizontalDivider(modifier = Modifier.weight(1f))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Share Code section
|
// Share Code section
|
||||||
Card(
|
Card(
|
||||||
modifier = Modifier.fillMaxWidth().padding(bottom = 16.dp),
|
modifier = Modifier.fillMaxWidth().padding(bottom = AppSpacing.lg),
|
||||||
colors = CardDefaults.cardColors(
|
colors = CardDefaults.cardColors(
|
||||||
containerColor = MaterialTheme.colorScheme.surfaceVariant
|
containerColor = MaterialTheme.colorScheme.surfaceVariant
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.padding(16.dp)) {
|
Column(modifier = Modifier.padding(AppSpacing.lg)) {
|
||||||
Text(
|
Text(
|
||||||
text = "Share Code",
|
text = "Share Code",
|
||||||
style = MaterialTheme.typography.titleSmall,
|
style = MaterialTheme.typography.titleSmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
@@ -206,7 +207,7 @@ fun ManageUsersDialog(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
@@ -236,7 +237,7 @@ fun ManageUsersDialog(
|
|||||||
} else {
|
} else {
|
||||||
Icon(Icons.Default.Refresh, "Generate", modifier = Modifier.size(18.dp))
|
Icon(Icons.Default.Refresh, "Generate", modifier = Modifier.size(18.dp))
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text(if (shareCode != null) "Generate New Code" else "Generate Code")
|
Text(if (shareCode != null) "Generate New Code" else "Generate Code")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,7 +246,7 @@ fun ManageUsersDialog(
|
|||||||
text = "Share this 6-character code. They can enter it in the app to join.",
|
text = "Share this 6-character code. They can enter it in the app to join.",
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
modifier = Modifier.padding(top = 8.dp)
|
modifier = Modifier.padding(top = AppSpacing.sm)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,7 +257,7 @@ fun ManageUsersDialog(
|
|||||||
Text(
|
Text(
|
||||||
text = "Users (${users.size})",
|
text = "Users (${users.size})",
|
||||||
style = MaterialTheme.typography.titleMedium,
|
style = MaterialTheme.typography.titleMedium,
|
||||||
modifier = Modifier.padding(bottom = 8.dp)
|
modifier = Modifier.padding(bottom = AppSpacing.sm)
|
||||||
)
|
)
|
||||||
|
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
@@ -303,10 +304,10 @@ private fun UserListItem(
|
|||||||
onRemove: () -> Unit
|
onRemove: () -> Unit
|
||||||
) {
|
) {
|
||||||
Card(
|
Card(
|
||||||
modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp)
|
modifier = Modifier.fillMaxWidth().padding(vertical = AppSpacing.xs)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth().padding(12.dp),
|
modifier = Modifier.fillMaxWidth().padding(AppSpacing.md),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
@@ -317,7 +318,7 @@ private fun UserListItem(
|
|||||||
style = MaterialTheme.typography.bodyLarge
|
style = MaterialTheme.typography.bodyLarge
|
||||||
)
|
)
|
||||||
if (isOwner) {
|
if (isOwner) {
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Surface(
|
Surface(
|
||||||
color = MaterialTheme.colorScheme.primaryContainer,
|
color = MaterialTheme.colorScheme.primaryContainer,
|
||||||
shape = MaterialTheme.shapes.small
|
shape = MaterialTheme.shapes.small
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import androidx.compose.ui.text.style.TextAlign
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import honeydue.composeapp.generated.resources.*
|
import honeydue.composeapp.generated.resources.*
|
||||||
import com.tt.honeyDue.models.SharedResidence
|
import com.tt.honeyDue.models.SharedResidence
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import org.jetbrains.compose.resources.stringResource
|
import org.jetbrains.compose.resources.stringResource
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,7 +67,7 @@ fun ResidenceImportConfirmDialog(
|
|||||||
textAlign = TextAlign.Center
|
textAlign = TextAlign.Center
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.lg))
|
||||||
|
|
||||||
// Residence details
|
// Residence details
|
||||||
Column(
|
Column(
|
||||||
@@ -80,7 +81,7 @@ fun ResidenceImportConfirmDialog(
|
|||||||
)
|
)
|
||||||
|
|
||||||
sharedResidence.sharedBy?.let { sharedBy ->
|
sharedResidence.sharedBy?.let { sharedBy ->
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.properties_shared_by, sharedBy),
|
text = stringResource(Res.string.properties_shared_by, sharedBy),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
@@ -89,7 +90,7 @@ fun ResidenceImportConfirmDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
sharedResidence.expiresAt?.let { expiresAt ->
|
sharedResidence.expiresAt?.let { expiresAt ->
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.xs))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.properties_expires, expiresAt),
|
text = stringResource(Res.string.properties_expires, expiresAt),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
@@ -113,7 +114,7 @@ fun ResidenceImportConfirmDialog(
|
|||||||
strokeWidth = 2.dp,
|
strokeWidth = 2.dp,
|
||||||
color = MaterialTheme.colorScheme.onPrimary
|
color = MaterialTheme.colorScheme.onPrimary
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text(stringResource(Res.string.properties_joining))
|
Text(stringResource(Res.string.properties_joining))
|
||||||
} else {
|
} else {
|
||||||
Text(stringResource(Res.string.properties_join_button))
|
Text(stringResource(Res.string.properties_join_button))
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import com.tt.honeyDue.models.Document
|
|||||||
import com.tt.honeyDue.models.DocumentCategory
|
import com.tt.honeyDue.models.DocumentCategory
|
||||||
import com.tt.honeyDue.models.DocumentType
|
import com.tt.honeyDue.models.DocumentType
|
||||||
import com.tt.honeyDue.testing.AccessibilityIds
|
import com.tt.honeyDue.testing.AccessibilityIds
|
||||||
|
import com.tt.honeyDue.ui.theme.AppRadius
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun DocumentCard(document: Document, isWarrantyCard: Boolean = false, onClick: () -> Unit) {
|
fun DocumentCard(document: Document, isWarrantyCard: Boolean = false, onClick: () -> Unit) {
|
||||||
@@ -46,9 +48,9 @@ private fun WarrantyCardContent(document: Document, onClick: () -> Unit) {
|
|||||||
.testTag(AccessibilityIds.Document.documentCard)
|
.testTag(AccessibilityIds.Document.documentCard)
|
||||||
.clickable(onClick = onClick),
|
.clickable(onClick = onClick),
|
||||||
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
|
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.fillMaxWidth().padding(16.dp)) {
|
Column(modifier = Modifier.fillMaxWidth().padding(AppSpacing.lg)) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
@@ -62,7 +64,7 @@ private fun WarrantyCardContent(document: Document, onClick: () -> Unit) {
|
|||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.xs))
|
||||||
document.itemName?.let { itemName ->
|
document.itemName?.let { itemName ->
|
||||||
Text(
|
Text(
|
||||||
itemName,
|
itemName,
|
||||||
@@ -76,8 +78,8 @@ private fun WarrantyCardContent(document: Document, onClick: () -> Unit) {
|
|||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(statusColor.copy(alpha = 0.2f), RoundedCornerShape(8.dp))
|
.background(statusColor.copy(alpha = 0.2f), RoundedCornerShape(AppRadius.sm))
|
||||||
.padding(horizontal = 8.dp, vertical = 4.dp)
|
.padding(horizontal = AppSpacing.sm, vertical = AppSpacing.xs)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
when {
|
when {
|
||||||
@@ -93,7 +95,7 @@ private fun WarrantyCardContent(document: Document, onClick: () -> Unit) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(12.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.md))
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
@@ -110,7 +112,7 @@ private fun WarrantyCardContent(document: Document, onClick: () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (document.isActive && daysUntilExpiration >= 0) {
|
if (document.isActive && daysUntilExpiration >= 0) {
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
"$daysUntilExpiration days remaining",
|
"$daysUntilExpiration days remaining",
|
||||||
style = MaterialTheme.typography.labelMedium,
|
style = MaterialTheme.typography.labelMedium,
|
||||||
@@ -119,11 +121,11 @@ private fun WarrantyCardContent(document: Document, onClick: () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.category?.let { category ->
|
document.category?.let { category ->
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(Color(0xFFE5E7EB), RoundedCornerShape(6.dp))
|
.background(Color(0xFFE5E7EB), RoundedCornerShape(6.dp))
|
||||||
.padding(horizontal = 8.dp, vertical = 4.dp)
|
.padding(horizontal = AppSpacing.sm, vertical = AppSpacing.xs)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
DocumentCategory.fromValue(category).displayName,
|
DocumentCategory.fromValue(category).displayName,
|
||||||
@@ -152,17 +154,17 @@ private fun RegularDocumentCardContent(document: Document, onClick: () -> Unit)
|
|||||||
.testTag(AccessibilityIds.Document.documentCard)
|
.testTag(AccessibilityIds.Document.documentCard)
|
||||||
.clickable(onClick = onClick),
|
.clickable(onClick = onClick),
|
||||||
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
|
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth().padding(16.dp),
|
modifier = Modifier.fillMaxWidth().padding(AppSpacing.lg),
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp)
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
// Document icon
|
// Document icon
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(56.dp)
|
.size(56.dp)
|
||||||
.background(typeColor.copy(alpha = 0.1f), RoundedCornerShape(8.dp)),
|
.background(typeColor.copy(alpha = 0.1f), RoundedCornerShape(AppRadius.sm)),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@@ -187,7 +189,7 @@ private fun RegularDocumentCardContent(document: Document, onClick: () -> Unit)
|
|||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.xs))
|
||||||
|
|
||||||
if (document.description?.isNotBlank() == true) {
|
if (document.description?.isNotBlank() == true) {
|
||||||
Text(
|
Text(
|
||||||
@@ -197,16 +199,16 @@ private fun RegularDocumentCardContent(document: Document, onClick: () -> Unit)
|
|||||||
maxLines = 2,
|
maxLines = 2,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(typeColor.copy(alpha = 0.2f), RoundedCornerShape(4.dp))
|
.background(typeColor.copy(alpha = 0.2f), RoundedCornerShape(AppRadius.xs))
|
||||||
.padding(horizontal = 6.dp, vertical = 2.dp)
|
.padding(horizontal = 6.dp, vertical = 2.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import coil3.compose.SubcomposeAsyncImageContent
|
|||||||
import com.tt.honeyDue.models.TaskCompletionImage
|
import com.tt.honeyDue.models.TaskCompletionImage
|
||||||
import com.tt.honeyDue.network.ApiClient
|
import com.tt.honeyDue.network.ApiClient
|
||||||
import com.tt.honeyDue.ui.components.AuthenticatedImage
|
import com.tt.honeyDue.ui.components.AuthenticatedImage
|
||||||
|
import com.tt.honeyDue.ui.theme.AppRadius
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun PhotoViewerDialog(
|
fun PhotoViewerDialog(
|
||||||
@@ -52,7 +54,7 @@ fun PhotoViewerDialog(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth(0.95f)
|
.fillMaxWidth(0.95f)
|
||||||
.fillMaxHeight(0.9f),
|
.fillMaxHeight(0.9f),
|
||||||
shape = RoundedCornerShape(16.dp),
|
shape = RoundedCornerShape(AppRadius.lg),
|
||||||
color = MaterialTheme.colorScheme.background
|
color = MaterialTheme.colorScheme.background
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
@@ -62,7 +64,7 @@ fun PhotoViewerDialog(
|
|||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp),
|
.padding(AppSpacing.lg),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
@@ -93,7 +95,7 @@ fun PhotoViewerDialog(
|
|||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(16.dp),
|
.padding(AppSpacing.lg),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Center
|
verticalArrangement = Arrangement.Center
|
||||||
) {
|
) {
|
||||||
@@ -107,7 +109,7 @@ fun PhotoViewerDialog(
|
|||||||
)
|
)
|
||||||
|
|
||||||
selectedImage!!.caption?.let { caption ->
|
selectedImage!!.caption?.let { caption ->
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.lg))
|
||||||
Card(
|
Card(
|
||||||
colors = CardDefaults.cardColors(
|
colors = CardDefaults.cardColors(
|
||||||
containerColor = MaterialTheme.colorScheme.surfaceVariant
|
containerColor = MaterialTheme.colorScheme.surfaceVariant
|
||||||
@@ -116,7 +118,7 @@ fun PhotoViewerDialog(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = caption,
|
text = caption,
|
||||||
modifier = Modifier.padding(16.dp),
|
modifier = Modifier.padding(AppSpacing.lg),
|
||||||
style = MaterialTheme.typography.bodyMedium
|
style = MaterialTheme.typography.bodyMedium
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -128,14 +130,14 @@ fun PhotoViewerDialog(
|
|||||||
columns = GridCells.Fixed(2),
|
columns = GridCells.Fixed(2),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(16.dp),
|
.padding(AppSpacing.lg),
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.md),
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
items(images) { image ->
|
items(images) { image ->
|
||||||
Card(
|
Card(
|
||||||
onClick = { selectedImage = image },
|
onClick = { selectedImage = image },
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
|
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
|
||||||
) {
|
) {
|
||||||
Column {
|
Column {
|
||||||
@@ -151,7 +153,7 @@ fun PhotoViewerDialog(
|
|||||||
image.caption?.let { caption ->
|
image.caption?.let { caption ->
|
||||||
Text(
|
Text(
|
||||||
text = caption,
|
text = caption,
|
||||||
modifier = Modifier.padding(8.dp),
|
modifier = Modifier.padding(AppSpacing.sm),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
maxLines = 2
|
maxLines = 2
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.tt.honeyDue.util.DateUtils
|
import com.tt.honeyDue.util.DateUtils
|
||||||
|
import com.tt.honeyDue.ui.theme.AppRadius
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
import org.jetbrains.compose.ui.tooling.preview.Preview
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -22,13 +24,13 @@ fun SimpleTaskListItem(
|
|||||||
) {
|
) {
|
||||||
Card(
|
Card(
|
||||||
modifier = modifier.fillMaxWidth(),
|
modifier = modifier.fillMaxWidth(),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
|
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp)
|
.padding(AppSpacing.lg)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
@@ -51,14 +53,14 @@ fun SimpleTaskListItem(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = priority?.uppercase() ?: "LOW",
|
text = priority?.uppercase() ?: "LOW",
|
||||||
modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp),
|
modifier = Modifier.padding(horizontal = AppSpacing.sm, vertical = AppSpacing.xs),
|
||||||
style = MaterialTheme.typography.labelSmall
|
style = MaterialTheme.typography.labelSmall
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (description != null) {
|
if (description != null) {
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.xs))
|
||||||
Text(
|
Text(
|
||||||
text = description,
|
text = description,
|
||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
@@ -66,7 +68,7 @@ fun SimpleTaskListItem(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
@@ -96,8 +98,8 @@ fun SimpleTaskListItem(
|
|||||||
fun SimpleTaskListItemPreview() {
|
fun SimpleTaskListItemPreview() {
|
||||||
MaterialTheme {
|
MaterialTheme {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(16.dp),
|
modifier = Modifier.padding(AppSpacing.lg),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.sm)
|
||||||
) {
|
) {
|
||||||
SimpleTaskListItem(
|
SimpleTaskListItem(
|
||||||
title = "Fix leaky faucet",
|
title = "Fix leaky faucet",
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import com.tt.honeyDue.models.TaskPriority
|
|||||||
import com.tt.honeyDue.models.TaskFrequency
|
import com.tt.honeyDue.models.TaskFrequency
|
||||||
import com.tt.honeyDue.models.TaskCompletion
|
import com.tt.honeyDue.models.TaskCompletion
|
||||||
import com.tt.honeyDue.util.DateUtils
|
import com.tt.honeyDue.util.DateUtils
|
||||||
|
import com.tt.honeyDue.ui.theme.AppRadius
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
import org.jetbrains.compose.resources.stringResource
|
import org.jetbrains.compose.resources.stringResource
|
||||||
import org.jetbrains.compose.ui.tooling.preview.Preview
|
import org.jetbrains.compose.ui.tooling.preview.Preview
|
||||||
|
|
||||||
@@ -59,7 +61,7 @@ fun TaskCard(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(AppRadius.md),
|
||||||
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp),
|
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp),
|
||||||
colors = CardDefaults.cardColors(
|
colors = CardDefaults.cardColors(
|
||||||
containerColor = MaterialTheme.colorScheme.surfaceContainerHigh
|
containerColor = MaterialTheme.colorScheme.surfaceContainerHigh
|
||||||
@@ -81,15 +83,15 @@ fun TaskCard(
|
|||||||
style = MaterialTheme.typography.titleMedium,
|
style = MaterialTheme.typography.titleMedium,
|
||||||
color = MaterialTheme.colorScheme.onSurface
|
color = MaterialTheme.colorScheme.onSurface
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
// Pill-style category badge
|
// Pill-style category badge
|
||||||
Surface(
|
Surface(
|
||||||
color = MaterialTheme.colorScheme.surfaceVariant,
|
color = MaterialTheme.colorScheme.surfaceVariant,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = (task.category?.name ?: "").uppercase(),
|
text = (task.category?.name ?: "").uppercase(),
|
||||||
modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp),
|
modifier = Modifier.padding(horizontal = AppSpacing.md, vertical = 6.dp),
|
||||||
style = MaterialTheme.typography.labelSmall,
|
style = MaterialTheme.typography.labelSmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||||
)
|
)
|
||||||
@@ -98,7 +100,7 @@ fun TaskCard(
|
|||||||
|
|
||||||
Column(
|
Column(
|
||||||
horizontalAlignment = Alignment.End,
|
horizontalAlignment = Alignment.End,
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.sm)
|
||||||
) {
|
) {
|
||||||
// Priority badge with semantic colors
|
// Priority badge with semantic colors
|
||||||
val priorityColor = when (task.priority?.name?.lowercase()) {
|
val priorityColor = when (task.priority?.name?.lowercase()) {
|
||||||
@@ -110,10 +112,10 @@ fun TaskCard(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.background(
|
||||||
priorityColor.copy(alpha = 0.15f),
|
priorityColor.copy(alpha = 0.15f),
|
||||||
RoundedCornerShape(12.dp)
|
RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
.padding(horizontal = 12.dp, vertical = 6.dp),
|
.padding(horizontal = AppSpacing.md, vertical = 6.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.xs),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
@@ -134,11 +136,11 @@ fun TaskCard(
|
|||||||
val statusColor = MaterialTheme.colorScheme.tertiary
|
val statusColor = MaterialTheme.colorScheme.tertiary
|
||||||
Surface(
|
Surface(
|
||||||
color = statusColor.copy(alpha = 0.15f),
|
color = statusColor.copy(alpha = 0.15f),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.tasks_card_in_progress),
|
text = stringResource(Res.string.tasks_card_in_progress),
|
||||||
modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp),
|
modifier = Modifier.padding(horizontal = AppSpacing.md, vertical = 6.dp),
|
||||||
style = MaterialTheme.typography.labelSmall,
|
style = MaterialTheme.typography.labelSmall,
|
||||||
color = statusColor
|
color = statusColor
|
||||||
)
|
)
|
||||||
@@ -148,7 +150,7 @@ fun TaskCard(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (task.description != null) {
|
if (task.description != null) {
|
||||||
Spacer(modifier = Modifier.height(12.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.md))
|
||||||
Text(
|
Text(
|
||||||
text = task.description,
|
text = task.description,
|
||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
@@ -156,23 +158,23 @@ fun TaskCard(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.lg))
|
||||||
HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant)
|
HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant)
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.lg))
|
||||||
|
|
||||||
// Metadata pills
|
// Metadata pills
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp)
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
// Date pill
|
// Date pill
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.background(
|
||||||
MaterialTheme.colorScheme.surfaceVariant,
|
MaterialTheme.colorScheme.surfaceVariant,
|
||||||
RoundedCornerShape(12.dp)
|
RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
.padding(horizontal = 12.dp, vertical = 6.dp),
|
.padding(horizontal = AppSpacing.md, vertical = 6.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(6.dp)
|
horizontalArrangement = Arrangement.spacedBy(6.dp)
|
||||||
) {
|
) {
|
||||||
@@ -195,9 +197,9 @@ fun TaskCard(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(
|
.background(
|
||||||
MaterialTheme.colorScheme.surfaceVariant,
|
MaterialTheme.colorScheme.surfaceVariant,
|
||||||
RoundedCornerShape(12.dp)
|
RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
.padding(horizontal = 12.dp, vertical = 6.dp),
|
.padding(horizontal = AppSpacing.md, vertical = 6.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(6.dp)
|
horizontalArrangement = Arrangement.spacedBy(6.dp)
|
||||||
) {
|
) {
|
||||||
@@ -220,13 +222,13 @@ fun TaskCard(
|
|||||||
if (buttonTypes.isNotEmpty() || task.completionCount > 0) {
|
if (buttonTypes.isNotEmpty() || task.completionCount > 0) {
|
||||||
var showActionsMenu by remember { mutableStateOf(false) }
|
var showActionsMenu by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.lg))
|
||||||
HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant)
|
HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant)
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.lg))
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp)
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
// Actions dropdown menu based on buttonTypes array
|
// Actions dropdown menu based on buttonTypes array
|
||||||
if (buttonTypes.isNotEmpty()) {
|
if (buttonTypes.isNotEmpty()) {
|
||||||
@@ -238,14 +240,14 @@ fun TaskCard(
|
|||||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||||
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
|
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
|
||||||
),
|
),
|
||||||
shape = RoundedCornerShape(8.dp)
|
shape = RoundedCornerShape(AppRadius.sm)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.MoreVert,
|
Icons.Default.MoreVert,
|
||||||
contentDescription = null, // decorative
|
contentDescription = null, // decorative
|
||||||
modifier = Modifier.size(18.dp)
|
modifier = Modifier.size(18.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.tasks_card_actions),
|
text = stringResource(Res.string.tasks_card_actions),
|
||||||
style = MaterialTheme.typography.labelLarge,
|
style = MaterialTheme.typography.labelLarge,
|
||||||
@@ -308,7 +310,7 @@ fun TaskCard(
|
|||||||
containerColor = MaterialTheme.colorScheme.tertiaryContainer,
|
containerColor = MaterialTheme.colorScheme.tertiaryContainer,
|
||||||
contentColor = MaterialTheme.colorScheme.onTertiaryContainer
|
contentColor = MaterialTheme.colorScheme.onTertiaryContainer
|
||||||
),
|
),
|
||||||
shape = RoundedCornerShape(8.dp)
|
shape = RoundedCornerShape(AppRadius.sm)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.CheckCircle,
|
Icons.Default.CheckCircle,
|
||||||
@@ -524,7 +526,7 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp)
|
.padding(AppSpacing.lg)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
@@ -540,11 +542,11 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
completion.rating?.let { rating ->
|
completion.rating?.let { rating ->
|
||||||
Surface(
|
Surface(
|
||||||
color = MaterialTheme.colorScheme.tertiaryContainer,
|
color = MaterialTheme.colorScheme.tertiaryContainer,
|
||||||
shape = RoundedCornerShape(8.dp)
|
shape = RoundedCornerShape(AppRadius.sm)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "$rating★",
|
text = "$rating★",
|
||||||
modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp),
|
modifier = Modifier.padding(horizontal = AppSpacing.sm, vertical = AppSpacing.xs),
|
||||||
style = MaterialTheme.typography.labelMedium,
|
style = MaterialTheme.typography.labelMedium,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
color = MaterialTheme.colorScheme.onTertiaryContainer
|
color = MaterialTheme.colorScheme.onTertiaryContainer
|
||||||
@@ -555,7 +557,7 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
|
|
||||||
// Display contractor or manual entry
|
// Display contractor or manual entry
|
||||||
completion.contractorDetails?.let { contractor ->
|
completion.contractorDetails?.let { contractor ->
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.Build,
|
Icons.Default.Build,
|
||||||
@@ -563,7 +565,7 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
modifier = Modifier.size(16.dp),
|
modifier = Modifier.size(16.dp),
|
||||||
tint = MaterialTheme.colorScheme.primary
|
tint = MaterialTheme.colorScheme.primary
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.xs))
|
||||||
Column {
|
Column {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.tasks_card_completed_by, contractor.name),
|
text = stringResource(Res.string.tasks_card_completed_by, contractor.name),
|
||||||
@@ -580,7 +582,7 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ?: completion.completedByName?.let {
|
} ?: completion.completedByName?.let {
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.tasks_card_completed_by, it),
|
text = stringResource(Res.string.tasks_card_completed_by, it),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
@@ -598,7 +600,7 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
completion.notes?.let {
|
completion.notes?.let {
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = it,
|
text = it,
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
@@ -608,7 +610,7 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
|
|
||||||
// Show button to view photos if images exist
|
// Show button to view photos if images exist
|
||||||
if (hasImages) {
|
if (hasImages) {
|
||||||
Spacer(modifier = Modifier.height(12.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.md))
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
println("View Photos button clicked!")
|
println("View Photos button clicked!")
|
||||||
@@ -625,7 +627,7 @@ fun CompletionCard(completion: TaskCompletion) {
|
|||||||
contentDescription = null, // decorative
|
contentDescription = null, // decorative
|
||||||
modifier = Modifier.size(18.dp)
|
modifier = Modifier.size(18.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(Res.string.tasks_card_view_photos, completion.images?.size ?: 0),
|
text = stringResource(Res.string.tasks_card_view_photos, completion.images?.size ?: 0),
|
||||||
style = MaterialTheme.typography.labelLarge,
|
style = MaterialTheme.typography.labelLarge,
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import androidx.compose.ui.unit.dp
|
|||||||
import com.tt.honeyDue.models.TaskColumn
|
import com.tt.honeyDue.models.TaskColumn
|
||||||
import com.tt.honeyDue.models.TaskDetail
|
import com.tt.honeyDue.models.TaskDetail
|
||||||
import com.tt.honeyDue.testing.AccessibilityIds
|
import com.tt.honeyDue.testing.AccessibilityIds
|
||||||
|
import com.tt.honeyDue.ui.theme.AppRadius
|
||||||
|
import com.tt.honeyDue.ui.theme.AppSpacing
|
||||||
|
|
||||||
@OptIn(ExperimentalFoundationApi::class)
|
@OptIn(ExperimentalFoundationApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
@@ -131,19 +133,19 @@ private fun TaskColumn(
|
|||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(
|
.background(
|
||||||
MaterialTheme.colorScheme.surface,
|
MaterialTheme.colorScheme.surface,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
// Header
|
// Header
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp),
|
.padding(AppSpacing.lg),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@@ -189,7 +191,7 @@ private fun TaskColumn(
|
|||||||
tint = color.copy(alpha = 0.3f),
|
tint = color.copy(alpha = 0.3f),
|
||||||
modifier = Modifier.size(48.dp)
|
modifier = Modifier.size(48.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = "No tasks",
|
text = "No tasks",
|
||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
@@ -202,8 +204,8 @@ private fun TaskColumn(
|
|||||||
|
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
contentPadding = PaddingValues(16.dp),
|
contentPadding = PaddingValues(AppSpacing.lg),
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
items(tasks, key = { it.id }) { task ->
|
items(tasks, key = { it.id }) { task ->
|
||||||
TaskCard(
|
TaskCard(
|
||||||
@@ -323,12 +325,12 @@ private fun DynamicTaskColumn(
|
|||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(horizontal = 16.dp, vertical = 12.dp),
|
.padding(horizontal = AppSpacing.lg, vertical = AppSpacing.md),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@@ -374,7 +376,7 @@ private fun DynamicTaskColumn(
|
|||||||
tint = columnColor.copy(alpha = 0.3f),
|
tint = columnColor.copy(alpha = 0.3f),
|
||||||
modifier = Modifier.size(48.dp)
|
modifier = Modifier.size(48.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.sm))
|
||||||
Text(
|
Text(
|
||||||
text = "No tasks",
|
text = "No tasks",
|
||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
@@ -393,7 +395,7 @@ private fun DynamicTaskColumn(
|
|||||||
top = 8.dp,
|
top = 8.dp,
|
||||||
bottom = 16.dp + bottomPadding
|
bottom = 16.dp + bottomPadding
|
||||||
),
|
),
|
||||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.lg)
|
||||||
) {
|
) {
|
||||||
items(column.tasks, key = { it.id }) { task ->
|
items(column.tasks, key = { it.id }) { task ->
|
||||||
// Use existing TaskCard component with buttonTypes array
|
// Use existing TaskCard component with buttonTypes array
|
||||||
|
|||||||
@@ -543,7 +543,7 @@ fun DocumentFormScreen(
|
|||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(OrganicSpacing.cozy),
|
modifier = Modifier.padding(OrganicSpacing.cozy),
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
stringResource(Res.string.documents_form_existing_photos, existingImages.size),
|
stringResource(Res.string.documents_form_existing_photos, existingImages.size),
|
||||||
@@ -557,8 +557,8 @@ fun DocumentFormScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(200.dp)
|
.height(200.dp)
|
||||||
.clip(RoundedCornerShape(8.dp))
|
.clip(RoundedCornerShape(AppRadius.sm))
|
||||||
.border(1.dp, MaterialTheme.colorScheme.outline, RoundedCornerShape(8.dp)),
|
.border(1.dp, MaterialTheme.colorScheme.outline, RoundedCornerShape(AppRadius.sm)),
|
||||||
contentScale = ContentScale.Crop
|
contentScale = ContentScale.Crop
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -573,7 +573,7 @@ fun DocumentFormScreen(
|
|||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(OrganicSpacing.cozy),
|
modifier = Modifier.padding(OrganicSpacing.cozy),
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp)
|
verticalArrangement = Arrangement.spacedBy(AppSpacing.md)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
if (isEditMode) {
|
if (isEditMode) {
|
||||||
@@ -593,7 +593,7 @@ fun DocumentFormScreen(
|
|||||||
enabled = selectedImages.size < maxImages
|
enabled = selectedImages.size < maxImages
|
||||||
) {
|
) {
|
||||||
Icon(Icons.Default.CameraAlt, null, modifier = Modifier.size(18.dp))
|
Icon(Icons.Default.CameraAlt, null, modifier = Modifier.size(18.dp))
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.xs))
|
||||||
Text(stringResource(Res.string.documents_form_camera))
|
Text(stringResource(Res.string.documents_form_camera))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,7 +603,7 @@ fun DocumentFormScreen(
|
|||||||
enabled = selectedImages.size < maxImages
|
enabled = selectedImages.size < maxImages
|
||||||
) {
|
) {
|
||||||
Icon(Icons.Default.Photo, null, modifier = Modifier.size(18.dp))
|
Icon(Icons.Default.Photo, null, modifier = Modifier.size(18.dp))
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(AppSpacing.xs))
|
||||||
Text(stringResource(Res.string.documents_form_gallery))
|
Text(stringResource(Res.string.documents_form_gallery))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -659,7 +659,7 @@ fun DocumentFormScreen(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
com.tt.honeyDue.util.ErrorMessageParser.parse((operationState as ApiResult.Error).message),
|
com.tt.honeyDue.util.ErrorMessageParser.parse((operationState as ApiResult.Error).message),
|
||||||
modifier = Modifier.padding(12.dp),
|
modifier = Modifier.padding(AppSpacing.md),
|
||||||
color = MaterialTheme.colorScheme.error
|
color = MaterialTheme.colorScheme.error
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -584,7 +584,7 @@ fun ProfileScreen(
|
|||||||
},
|
},
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
@@ -596,7 +596,7 @@ fun ProfileScreen(
|
|||||||
},
|
},
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
@@ -608,7 +608,7 @@ fun ProfileScreen(
|
|||||||
},
|
},
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (errorMessage.isNotEmpty()) {
|
if (errorMessage.isNotEmpty()) {
|
||||||
@@ -654,13 +654,13 @@ fun ProfileScreen(
|
|||||||
colors = CardDefaults.cardColors(
|
colors = CardDefaults.cardColors(
|
||||||
containerColor = MaterialTheme.colorScheme.primaryContainer
|
containerColor = MaterialTheme.colorScheme.primaryContainer
|
||||||
),
|
),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp),
|
.padding(AppSpacing.lg),
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.md),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@@ -693,7 +693,7 @@ fun ProfileScreen(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(56.dp),
|
.height(56.dp),
|
||||||
enabled = email.isNotEmpty() && !isLoading,
|
enabled = email.isNotEmpty() && !isLoading,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
@@ -703,7 +703,7 @@ fun ProfileScreen(
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.sm),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Icon(Icons.Default.Save, contentDescription = null) // decorative
|
Icon(Icons.Default.Save, contentDescription = null) // decorative
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ fun RegisterScreen(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.testTag(AccessibilityIds.Authentication.registerUsernameField),
|
.testTag(AccessibilityIds.Authentication.registerUsernameField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
@@ -146,7 +146,7 @@ fun RegisterScreen(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.testTag(AccessibilityIds.Authentication.registerEmailField),
|
.testTag(AccessibilityIds.Authentication.registerEmailField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
|
|
||||||
OrganicDivider()
|
OrganicDivider()
|
||||||
@@ -163,7 +163,7 @@ fun RegisterScreen(
|
|||||||
.testTag(AccessibilityIds.Authentication.registerPasswordField),
|
.testTag(AccessibilityIds.Authentication.registerPasswordField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
visualTransformation = PasswordVisualTransformation(),
|
visualTransformation = PasswordVisualTransformation(),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
@@ -178,7 +178,7 @@ fun RegisterScreen(
|
|||||||
.testTag(AccessibilityIds.Authentication.registerConfirmPasswordField),
|
.testTag(AccessibilityIds.Authentication.registerConfirmPasswordField),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
visualTransformation = PasswordVisualTransformation(),
|
visualTransformation = PasswordVisualTransformation(),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ fun ResidencesScreen(
|
|||||||
.fillMaxWidth(0.7f)
|
.fillMaxWidth(0.7f)
|
||||||
.height(56.dp)
|
.height(56.dp)
|
||||||
.testTag(AccessibilityIds.Residence.emptyStateButton),
|
.testTag(AccessibilityIds.Residence.emptyStateButton),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(OrganicSpacing.compact),
|
horizontalArrangement = Arrangement.spacedBy(OrganicSpacing.compact),
|
||||||
@@ -295,7 +295,7 @@ fun ResidencesScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth(0.7f)
|
.fillMaxWidth(0.7f)
|
||||||
.height(56.dp),
|
.height(56.dp),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(OrganicSpacing.compact),
|
horizontalArrangement = Arrangement.spacedBy(OrganicSpacing.compact),
|
||||||
@@ -319,7 +319,7 @@ fun ResidencesScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth(0.7f)
|
.fillMaxWidth(0.7f)
|
||||||
.height(56.dp),
|
.height(56.dp),
|
||||||
shape = RoundedCornerShape(12.dp)
|
shape = RoundedCornerShape(AppRadius.md)
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(OrganicSpacing.compact),
|
horizontalArrangement = Arrangement.spacedBy(OrganicSpacing.compact),
|
||||||
@@ -587,13 +587,13 @@ fun ResidencesScreen(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(AppSpacing.xs))
|
||||||
|
|
||||||
// Street address (if available)
|
// Street address (if available)
|
||||||
if (residence.streetAddress.isNotBlank()) {
|
if (residence.streetAddress.isNotBlank()) {
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.xs)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.Place,
|
Icons.Default.Place,
|
||||||
@@ -614,7 +614,7 @@ fun ResidencesScreen(
|
|||||||
// City, State
|
// City, State
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(4.dp)
|
horizontalArrangement = Arrangement.spacedBy(AppSpacing.xs)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.Default.LocationOn,
|
Icons.Default.LocationOn,
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ private fun ForYouTabContent(
|
|||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(OrganicSpacing.sm))
|
Spacer(modifier = Modifier.height(OrganicSpacing.sm))
|
||||||
}
|
}
|
||||||
item { Spacer(modifier = Modifier.height(24.dp)) }
|
item { Spacer(modifier = Modifier.height(AppSpacing.xl)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -583,7 +583,7 @@ private fun BrowseTabContent(
|
|||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(OrganicSpacing.md))
|
Spacer(modifier = Modifier.height(OrganicSpacing.md))
|
||||||
}
|
}
|
||||||
item { Spacer(modifier = Modifier.height(24.dp)) }
|
item { Spacer(modifier = Modifier.height(AppSpacing.xl)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user