mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-11 08:12:26 +01:00
usage notes switch on the Home screen
This commit is contained in:
1 parent
25b8bbb1a5
commit
1af5eae8e7
3 files changed
+24
No files matched your search
@@ -92,6 +92,7 @@ fun HomeScreen(
|
|||||||
StatusCard(status)
|
StatusCard(status)
|
||||||
Spacer(Modifier.height(16.dp))
|
Spacer(Modifier.height(16.dp))
|
||||||
UpdateCard()
|
UpdateCard()
|
||||||
|
UsageNotesHomeCard()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sits at the bottom, where a thumb reaches it.
|
// Sits at the bottom, where a thumb reaches it.
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ fun UpdateCard() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Room before whatever Home shows next; nothing when the card is hidden.
|
||||||
|
Spacer(Modifier.height(16.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The Settings row: checks on tap, and carries on to download and install once something is found. */
|
/** The Settings row: checks on tap, and carries on to download and install once something is found. */
|
||||||
|
|||||||
@@ -152,3 +152,24 @@ private fun Choice(label: String, checked: Boolean, onChange: (Boolean) -> Unit)
|
|||||||
Checkbox(checked = checked, onCheckedChange = null, modifier = Modifier.padding(vertical = 8.dp))
|
Checkbox(checked = checked, onCheckedChange = null, modifier = Modifier.padding(vertical = 8.dp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Usage notes on Home, always: the switch, and once it's on, what to share. */
|
||||||
|
@Composable
|
||||||
|
internal fun UsageNotesHomeCard(modifier: Modifier = Modifier) {
|
||||||
|
Column(modifier) {
|
||||||
|
Text(
|
||||||
|
USAGE_STATS_TITLE,
|
||||||
|
style = MaterialTheme.typography.labelLarge,
|
||||||
|
color = MaterialTheme.colorScheme.primary,
|
||||||
|
modifier = Modifier.padding(start = 16.dp, bottom = 4.dp),
|
||||||
|
)
|
||||||
|
Text(
|
||||||
|
"Share a short note after each drive, so the next driver knows whether Gearslip works " +
|
||||||
|
"in their car. No name, account, or location.",
|
||||||
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
|
modifier = Modifier.padding(start = 16.dp, end = 16.dp, bottom = 12.dp),
|
||||||
|
)
|
||||||
|
SettingsCard { UsageStatsRows() }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user