minor changes to labels and logo

This commit is contained in:
2026-06-18 11:26:41 +02:00
parent 006944e333
commit fa20348455
8 changed files with 255 additions and 219 deletions

View File

@ -0,0 +1,136 @@
package com.tomhempel.coordinatorapp.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.tomhempel.coordinatorapp.R
@Composable
fun CoordinatorMarkIcon(
modifier: Modifier = Modifier,
size: Dp = 24.dp,
contentDescription: String? = null,
) {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_coordinator_mark),
contentDescription = contentDescription,
tint = MaterialTheme.colorScheme.primary,
modifier = modifier.size(size),
)
}
@Composable
fun CoordinatorBrandBadge(
modifier: Modifier = Modifier,
size: Dp = 72.dp,
iconSize: Dp = 40.dp,
) {
val scheme = MaterialTheme.colorScheme
Box(
modifier = modifier
.size(size)
.clip(RoundedCornerShape(22.dp))
.background(
Brush.linearGradient(
colors = listOf(
scheme.primary,
scheme.primary.copy(alpha = 0.82f),
scheme.primaryContainer,
),
),
),
contentAlignment = Alignment.Center,
) {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_coordinator_mark),
contentDescription = null,
tint = scheme.onPrimary,
modifier = Modifier.size(iconSize),
)
}
}
@Composable
fun CoordinatorBrandHeader(
modifier: Modifier = Modifier,
subtitle: String = "Coordinator tools",
badgeSize: Dp = 72.dp,
) {
val scheme = MaterialTheme.colorScheme
Column(
modifier = modifier,
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(14.dp),
) {
CoordinatorBrandBadge(size = badgeSize)
Column(
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(6.dp),
) {
Text(
text = "NAT-AS Coordinator",
style = MaterialTheme.typography.headlineMedium,
fontWeight = FontWeight.Bold,
color = scheme.onBackground,
)
Text(
text = subtitle,
style = MaterialTheme.typography.bodyLarge,
color = scheme.onSurfaceVariant,
)
}
}
}
@Composable
fun CoordinatorAppBarTitle(
title: String,
subtitle: String,
modifier: Modifier = Modifier,
) {
val scheme = MaterialTheme.colorScheme
Row(
modifier = modifier,
horizontalArrangement = Arrangement.spacedBy(12.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Box(
modifier = Modifier
.size(36.dp)
.clip(CircleShape)
.background(scheme.primaryContainer),
contentAlignment = Alignment.Center,
) {
CoordinatorMarkIcon(size = 20.dp)
}
Column {
Text(
text = title,
fontWeight = FontWeight.SemiBold,
)
Text(
text = subtitle,
style = MaterialTheme.typography.bodySmall,
color = scheme.onSurfaceVariant,
)
}
}
}

View File

@ -49,6 +49,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.tomhempel.coordinatorapp.data.CounselorUser import com.tomhempel.coordinatorapp.data.CounselorUser
import com.tomhempel.coordinatorapp.ui.components.CoordinatorAppBarTitle
import com.tomhempel.coordinatorapp.ui.components.CoordinatorBackground import com.tomhempel.coordinatorapp.ui.components.CoordinatorBackground
import com.tomhempel.coordinatorapp.ui.components.gridColumnCount import com.tomhempel.coordinatorapp.ui.components.gridColumnCount
import com.tomhempel.coordinatorapp.ui.components.gridContentPadding import com.tomhempel.coordinatorapp.ui.components.gridContentPadding
@ -99,14 +100,10 @@ fun SessionManagementScreen(
} }
}, },
title = { title = {
Column { CoordinatorAppBarTitle(
Text("Session management", fontWeight = FontWeight.SemiBold) title = "Session management",
Text( subtitle = "$username · ${formatRole(role)}",
text = "$username · ${formatRole(role)}", )
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
}, },
actions = { actions = {
IconButton(onClick = onRefresh, enabled = !isRefreshing) { IconButton(onClick = onRefresh, enabled = !isRefreshing) {
@ -293,7 +290,7 @@ private fun ResetPasswordDialog(
text = { text = {
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
Text( Text(
text = "Set a new temporary password for ${counselor.username}. They must change it when signing in to the field app.", text = "Set a new temporary password for ${counselor.username}. They must change it when signing in to the NAT-AS App.",
style = MaterialTheme.typography.bodyMedium, style = MaterialTheme.typography.bodyMedium,
) )

View File

@ -26,6 +26,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier 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.tomhempel.coordinatorapp.ui.components.CoordinatorAppBarTitle
import com.tomhempel.coordinatorapp.ui.components.CoordinatorBackground import com.tomhempel.coordinatorapp.ui.components.CoordinatorBackground
import com.tomhempel.coordinatorapp.ui.components.FeatureTile import com.tomhempel.coordinatorapp.ui.components.FeatureTile
import com.tomhempel.coordinatorapp.ui.components.gridColumnCount import com.tomhempel.coordinatorapp.ui.components.gridColumnCount
@ -67,17 +68,10 @@ fun HomeScreen(
topBar = { topBar = {
TopAppBar( TopAppBar(
title = { title = {
Column { CoordinatorAppBarTitle(
Text( title = "NAT-AS Coordinator",
text = "NAT-AS Coordinator", subtitle = "$username · ${formatRole(role)}",
fontWeight = FontWeight.SemiBold, )
)
Text(
text = "$username · ${formatRole(role)}",
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
}, },
actions = { actions = {
IconButton(onClick = onLogout) { IconButton(onClick = onLogout) {

View File

@ -33,6 +33,8 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.tomhempel.coordinatorapp.ui.components.AuthCard import com.tomhempel.coordinatorapp.ui.components.AuthCard
import com.tomhempel.coordinatorapp.ui.components.CoordinatorBackground import com.tomhempel.coordinatorapp.ui.components.CoordinatorBackground
import com.tomhempel.coordinatorapp.ui.components.CoordinatorBrandBadge
import com.tomhempel.coordinatorapp.ui.components.CoordinatorBrandHeader
import com.tomhempel.coordinatorapp.ui.components.ResponsiveContent import com.tomhempel.coordinatorapp.ui.components.ResponsiveContent
@Composable @Composable
@ -62,17 +64,8 @@ fun LoginScreen(
.verticalScroll(rememberScrollState()), .verticalScroll(rememberScrollState()),
horizontalAlignment = Alignment.CenterHorizontally, horizontalAlignment = Alignment.CenterHorizontally,
) { ) {
Text( CoordinatorBrandHeader(
text = "NAT-AS Coordinator", modifier = Modifier.padding(bottom = 28.dp),
style = MaterialTheme.typography.headlineMedium,
fontWeight = FontWeight.Bold,
color = MaterialTheme.colorScheme.onBackground,
)
Text(
text = "Supervisor and admin tools",
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(top = 8.dp, bottom = 28.dp),
) )
AuthCard { AuthCard {
@ -149,7 +142,7 @@ fun LoginScreen(
Spacer(modifier = Modifier.height(20.dp)) Spacer(modifier = Modifier.height(20.dp))
Text( Text(
text = "Counselors sign in through the field app.", text = "Counselors sign in through the NAT-AS App.",
style = MaterialTheme.typography.bodySmall, style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant, color = MaterialTheme.colorScheme.onSurfaceVariant,
) )
@ -185,7 +178,13 @@ fun ChangePasswordScreen(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.verticalScroll(rememberScrollState()), .verticalScroll(rememberScrollState()),
horizontalAlignment = Alignment.CenterHorizontally,
) { ) {
CoordinatorBrandBadge(
size = 56.dp,
iconSize = 30.dp,
modifier = Modifier.padding(bottom = 20.dp),
)
AuthCard { AuthCard {
Text( Text(
text = "Choose a new password", text = "Choose a new password",

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M12,3.5c2.21,0 4,1.79 4,4s-1.79,4 -4,4 -4,-1.79 -4,-4 1.79,-4 4,-4z" />
<path
android:fillColor="#FF000000"
android:pathData="M6,17.5m-2.5,0a2.5,2.5 0,1,1 5,0a2.5,2.5 0,1,1 -5,0" />
<path
android:fillColor="#FF000000"
android:pathData="M12,19m-2.5,0a2.5,2.5 0,1,1 5,0a2.5,2.5 0,1,1 -5,0" />
<path
android:fillColor="#FF000000"
android:pathData="M18,17.5m-2.5,0a2.5,2.5 0,1,1 5,0a2.5,2.5 0,1,1 -5,0" />
<path
android:fillColor="#00000000"
android:pathData="M12,11.25 L7.35,15.35"
android:strokeWidth="1.6"
android:strokeColor="#FF000000"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M12,11.25 L12,16.25"
android:strokeWidth="1.6"
android:strokeColor="#FF000000"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M12,11.25 L16.65,15.35"
android:strokeWidth="1.6"
android:strokeColor="#FF000000"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M6.8,20.1 Q12,22.4 17.2,20.1"
android:strokeWidth="1.4"
android:strokeColor="#FF000000"
android:strokeLineCap="round" />
</vector>

View File

@ -1,170 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp" android:width="108dp"
android:height="108dp" android:height="108dp"
android:viewportWidth="108" android:viewportWidth="108"
android:viewportHeight="108"> android:viewportHeight="108">
<path <path android:pathData="M0,0h108v108h-108z">
android:fillColor="#3DDC84" <aapt:attr name="android:fillColor">
android:pathData="M0,0h108v108h-108z" /> <gradient
<path android:startX="18"
android:fillColor="#00000000" android:startY="12"
android:pathData="M9,0L9,108" android:endX="92"
android:strokeWidth="0.8" android:endY="98"
android:strokeColor="#33FFFFFF" /> android:type="linear">
<path <item
android:fillColor="#00000000" android:color="#6E56CF"
android:pathData="M19,0L19,108" android:offset="0.0" />
android:strokeWidth="0.8" <item
android:strokeColor="#33FFFFFF" /> android:color="#3D8B7A"
<path android:offset="1.0" />
android:fillColor="#00000000" </gradient>
android:pathData="M29,0L29,108" </aapt:attr>
android:strokeWidth="0.8" </path>
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector> </vector>

View File

@ -1,30 +1,42 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp" android:width="108dp"
android:height="108dp" android:height="108dp"
android:viewportWidth="108" android:viewportWidth="108"
android:viewportHeight="108"> android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path <path
android:fillColor="#FFFFFF" android:fillColor="#FFFFFF"
android:fillType="nonZero" android:pathData="M54,30c8.84,0 16,7.16 16,16s-7.16,16 -16,16 -16,-7.16 -16,-16 7.16,-16 16,-16z" />
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" <path
android:strokeWidth="1" android:fillColor="#FFFFFF"
android:strokeColor="#00000000" /> android:pathData="M30,78m-10,0a10,10 0,1,1 20,0a10,10 0,1,1 -20,0" />
</vector> <path
android:fillColor="#FFFFFF"
android:pathData="M54,84m-10,0a10,10 0,1,1 20,0a10,10 0,1,1 -20,0" />
<path
android:fillColor="#FFFFFF"
android:pathData="M78,78m-10,0a10,10 0,1,1 20,0a10,10 0,1,1 -20,0" />
<path
android:fillColor="#00000000"
android:pathData="M54,62 L35.5,69.5"
android:strokeWidth="4.5"
android:strokeColor="#FFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M54,62 L54,74"
android:strokeWidth="4.5"
android:strokeColor="#FFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M54,62 L72.5,69.5"
android:strokeWidth="4.5"
android:strokeColor="#FFFFFF"
android:strokeLineCap="round" />
<path
android:fillColor="#00000000"
android:pathData="M33.6,88.2 Q54,94.8 74.4,88.2"
android:strokeWidth="4"
android:strokeColor="#FFFFFF"
android:strokeLineCap="round" />
</vector>

View File

@ -1,3 +1,3 @@
<resources> <resources>
<string name="app_name">CoordinatorApp</string> <string name="app_name">NAT-AS Coordinator</string>
</resources> </resources>