Skip to content

Commit

Permalink
design tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
shoyheim-dd committed Oct 22, 2024
1 parent c7b9e7e commit 444c0c8
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
Expand Down Expand Up @@ -75,6 +76,7 @@ import eu.europa.ec.resourceslogic.theme.values.textPrimaryDark
import eu.europa.ec.resourceslogic.theme.values.textSecondaryDark
import eu.europa.ec.resourceslogic.theme.values.warning
import eu.europa.ec.uilogic.component.AppIcons
import eu.europa.ec.uilogic.component.IconData
import eu.europa.ec.uilogic.component.ModalOptionUi
import eu.europa.ec.uilogic.component.ScalableText
import eu.europa.ec.uilogic.component.UserImageOrPlaceholder
Expand Down Expand Up @@ -514,51 +516,97 @@ private fun Title(
)
.padding(
PaddingValues(
top = SPACING_EXTRA_LARGE.dp,
top = SPACING_LARGE.dp,
bottom = SPACING_EXTRA_LARGE.dp,
start = paddingValues.calculateStartPadding(LayoutDirection.Ltr),
end = paddingValues.calculateEndPadding(LayoutDirection.Ltr)
)
),
contentAlignment = Alignment.Center
) {

Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Start
) {
UserImageOrPlaceholder(
userBase64Image = userBase64Image,
modifier = Modifier
.size(64.dp)
.clip(RoundedCornerShape(SIZE_SMALL.dp))
)
){
Column(
modifier = Modifier
.weight(1f)
.padding(start = SPACING_MEDIUM.dp),
horizontalAlignment = Alignment.Start
.fillMaxWidth()
) {
Text(
text = message,
style = MaterialTheme.typography.bodyMedium,
color = Color.Black
)
Text(
text = userFirstName,
style = MaterialTheme.typography.headlineSmall,
color = Color.Black
)
}
Row(
modifier = Modifier.fillMaxWidth().padding(bottom = SPACING_SMALL.dp),
verticalAlignment = Alignment.Top,
horizontalArrangement = Arrangement.Start
) {
WrapIcon(
iconData = AppIcons.Logo,
contentAlpha = ALPHA_ENABLED,
customTint = MaterialTheme.colorScheme.primary,
modifier = Modifier
.size(36.dp)
)
Column(
modifier = Modifier
.height(36.dp)
.padding(start = SPACING_EXTRA_SMALL.dp),
horizontalAlignment = Alignment.Start,
verticalArrangement = Arrangement.Center
) {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Start
) {
Text(
text = stringResource(id = R.string.dashboard_title_before_badge),
style = MaterialTheme.typography.titleLarge,
color = Color.Black
)
}
}
}
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.Bottom,
horizontalArrangement = Arrangement.Start
) {
UserImageOrPlaceholder(
userBase64Image = userBase64Image,
modifier = Modifier
.size(64.dp)
.clip(RoundedCornerShape(SIZE_SMALL.dp))
)
Column(
modifier = Modifier
.weight(1f)
.padding(start = SPACING_MEDIUM.dp)
.height(64.dp),
horizontalAlignment = Alignment.Start,
verticalArrangement = Arrangement.Center
) {
Text(
text = message,
style = MaterialTheme.typography.bodyMedium,
color = Color.Black
)
Text(
text = userFirstName,
style = MaterialTheme.typography.headlineSmall,
color = Color.Black
)
}

WrapIconButton(
iconData = AppIcons.VerticalMore,
customTint = MaterialTheme.colorScheme.primary,
enabled = allowUserInteraction,
onClick = {
onEventSend(Event.OptionsPressed)
WrapIconButton(
iconData = AppIcons.VerticalMore,
customTint = MaterialTheme.colorScheme.primary,
enabled = allowUserInteraction,
onClick = {
onEventSend(Event.OptionsPressed)
}
)
}
)
}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions resources-logic/src/main/res/drawable/ic_logo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
android:height="160dp"
android:viewportWidth="160"
android:viewportHeight="160">
<group android:scaleX="2.8"
android:scaleY="2.8"
android:translateX="48.145833"
android:translateY="48.145833">
<group android:scaleX="5.8"
android:scaleY="5.8"
android:translateX="8.145833"
android:translateY="8.145833">
<group>
<clip-path
android:pathData="M0,0h24.69v24.74h-24.69z"/>
Expand Down
1 change: 1 addition & 0 deletions resources-logic/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
<string name="welcome_faq_button_title">LES FAQ</string>

<!-- Dashboard -->
<string name="dashboard_title_before_badge">Setlaboki</string>
<string name="dashboard_title">Velkommen tilbake</string>
<string name="dashboard_document_has_not_expired">Gyldig til</string>
<string name="dashboard_document_has_expired_one">Utgått\ </string>
Expand Down
1 change: 1 addition & 0 deletions resources-logic/src/main/res/values-nn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
<string name="welcome_faq_button_title">LES FAQ</string>

<!-- Dashboard -->
<string name="dashboard_title_before_badge">Setlaboki</string>
<string name="dashboard_title">Velkommen tilbake</string>
<string name="dashboard_document_has_not_expired">Gyldig til</string>
<string name="dashboard_document_has_expired_one">Utgått\ </string>
Expand Down
1 change: 1 addition & 0 deletions resources-logic/src/main/res/values-no/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
<string name="welcome_faq_button_title">LES FAQ</string>

<!-- Dashboard -->
<string name="dashboard_title_before_badge">Setlaboki</string>
<string name="dashboard_title">Velkommen tilbake</string>
<string name="dashboard_document_has_not_expired">Gyldig til</string>
<string name="dashboard_document_has_expired_one">Utgått\ </string>
Expand Down
1 change: 1 addition & 0 deletions resources-logic/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<string name="welcome_faq_button_title">READ FAQs</string>

<!-- Dashboard -->
<string name="dashboard_title_before_badge">Setlaboki</string>
<string name="dashboard_title">Welcome back</string>
<string name="dashboard_document_has_not_expired">Valid until</string>
<string name="dashboard_document_has_expired_one">Expired\ </string>
Expand Down

0 comments on commit 444c0c8

Please sign in to comment.