ui: update whats new in 6.0 (#4625)

* ui: update whats new in 6.0

* update

* export localization

* android whats new
This commit is contained in:
Evgeny
2024-08-08 13:07:55 +01:00
committed by GitHub
parent 2503a86f07
commit 41576f80e7
26 changed files with 815 additions and 482 deletions
@@ -30,7 +30,7 @@ fun WhatsNewView(viaSettings: Boolean = false, close: () -> Unit) {
val currentVersion = remember { mutableStateOf(versionDescriptions.lastIndex) }
@Composable
fun featureDescription(icon: Painter, titleId: StringResource, descrId: StringResource, link: String?) {
fun featureDescription(icon: ImageResource?, titleId: StringResource, descrId: StringResource?, link: String?, subfeatures: List<Pair<ImageResource, StringResource>>) {
@Composable
fun linkButton(link: String) {
val uriHandler = LocalUriHandler.current
@@ -47,7 +47,7 @@ fun WhatsNewView(viaSettings: Boolean = false, close: () -> Unit) {
horizontalArrangement = Arrangement.spacedBy(8.dp),
modifier = Modifier.padding(bottom = 4.dp)
) {
Icon(icon, stringResource(titleId), tint = MaterialTheme.colors.secondary)
if (icon != null) Icon(painterResource(icon), stringResource(titleId), tint = MaterialTheme.colors.secondary)
Text(
generalGetString(titleId),
maxLines = 2,
@@ -59,7 +59,17 @@ fun WhatsNewView(viaSettings: Boolean = false, close: () -> Unit) {
linkButton(link)
}
}
Text(generalGetString(descrId), fontSize = 15.sp)
if (descrId != null) Text(generalGetString(descrId), fontSize = 15.sp)
for ((si, sd) in subfeatures) {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
modifier = Modifier.padding(bottom = 4.dp)
) {
Icon(painterResource(si), stringResource(sd), tint = MaterialTheme.colors.secondary)
Text(generalGetString(sd), fontSize = 15.sp)
}
}
}
}
@@ -116,7 +126,7 @@ fun WhatsNewView(viaSettings: Boolean = false, close: () -> Unit) {
v.features.forEach { feature ->
if (feature.show) {
featureDescription(painterResource(feature.icon), feature.titleId, feature.descrId, feature.link)
featureDescription(feature.icon, feature.titleId, feature.descrId, feature.link, feature.subfeatures)
}
}
@@ -157,9 +167,10 @@ fun ReadMoreButton(url: String) {
}
private data class FeatureDescription(
val icon: ImageResource,
val icon: ImageResource?,
val titleId: StringResource,
val descrId: StringResource,
val descrId: StringResource?,
var subfeatures: List<Pair<ImageResource, StringResource>> = listOf(),
val link: String? = null,
val show: Boolean = true
)
@@ -595,14 +606,24 @@ private val versionDescriptions: List<VersionDescription> = listOf(
post = "https://simplex.chat/blog/20240814-simplex-chat-vision-funding-v6-private-routing-new-user-experience.html",
features = listOf(
FeatureDescription(
icon = MR.images.ic_settings_ethernet,
titleId = MR.strings.v5_8_private_routing,
descrId = MR.strings.v6_0_private_routing_descr
icon = null,
titleId = MR.strings.v6_0_new_chat_experience,
descrId = null,
subfeatures = listOf(
MR.images.ic_add_link to MR.strings.v6_0_connect_faster_descr,
MR.images.ic_inventory_2 to MR.strings.v6_0_your_contacts_descr,
MR.images.ic_delete to MR.strings.v6_0_delete_many_messages_descr,
MR.images.ic_match_case to MR.strings.v6_0_increase_font_size
)
),
FeatureDescription(
icon = MR.images.ic_id_card,
titleId = MR.strings.v6_0_your_contacts,
descrId = MR.strings.v6_0_your_contacts_descr
icon = null,
titleId = MR.strings.v6_0_new_media_options,
descrId = null,
subfeatures = listOf(
MR.images.ic_play_arrow_filled to MR.strings.v6_0_chat_list_media,
MR.images.ic_blur_on to MR.strings.v6_0_privacy_blur,
)
),
FeatureDescription(
icon = MR.images.ic_toast,
@@ -611,20 +632,21 @@ private val versionDescriptions: List<VersionDescription> = listOf(
show = appPlatform.isAndroid
),
FeatureDescription(
icon = MR.images.ic_link,
titleId = MR.strings.v6_0_connect_faster,
descrId = MR.strings.v6_0_connect_faster_descr
),
FeatureDescription(
icon = MR.images.ic_delete,
titleId = MR.strings.v6_0_delete_many_messages,
descrId = MR.strings.v6_0_delete_many_messages_descr
icon = MR.images.ic_settings_ethernet,
titleId = MR.strings.v5_8_private_routing,
descrId = MR.strings.v6_0_private_routing_descr
),
FeatureDescription(
icon = MR.images.ic_wifi_tethering,
titleId = MR.strings.v6_0_connection_servers_status,
descrId = MR.strings.v6_0_connection_servers_status_descr
)
),
FeatureDescription(
icon = MR.images.ic_upgrade,
titleId = MR.strings.v6_0_upgrade_app,
descrId = MR.strings.v6_0_upgrade_app_descr,
show = appPlatform.isDesktop
),
),
)
)
@@ -1977,15 +1977,19 @@
<string name="v5_8_message_delivery">Improved message delivery</string>
<string name="v5_8_message_delivery_descr">With reduced battery usage.</string>
<string name="v5_8_persian_ui">Persian UI</string>
<string name="v6_0_new_chat_experience">New chat experience 🎉</string>
<string name="v6_0_new_media_options">New media options</string>
<string name="v6_0_private_routing_descr">It protects your IP address and connections.</string>
<string name="v6_0_your_contacts">Your contacts your way</string>
<string name="v6_0_your_contacts_descr">- Search contacts when starting chat.\n- Archive contacts to chat later.</string>
<string name="v6_0_reachable_chat_toolbar">Reachable chat toolbar 👋</string>
<string name="v6_0_your_contacts_descr">Archive contacts to chat later.</string>
<string name="v6_0_reachable_chat_toolbar">Reachable chat toolbar</string>
<string name="v6_0_reachable_chat_toolbar_descr">Use the app with one hand.</string>
<string name="v6_0_connect_faster">Connect to your friends faster</string>
<string name="v6_0_connect_faster_descr">Even when they are offline.</string>
<string name="v6_0_delete_many_messages">Moderate like a pro ✋</string>
<string name="v6_0_connect_faster_descr">Connect to your friends faster.</string>
<string name="v6_0_delete_many_messages_descr">Delete up to 20 messages at once.</string>
<string name="v6_0_chat_list_media">Play from the chat list.</string>
<string name="v6_0_privacy_blur">Blur for better privacy.</string>
<string name="v6_0_increase_font_size">Increase font size.</string>
<string name="v6_0_upgrade_app">Upgrade app automatically</string>
<string name="v6_0_upgrade_app_descr">Download new versions from GitHub.</string>
<string name="v6_0_connection_servers_status">Control your network</string>
<string name="v6_0_connection_servers_status_descr">Connection and servers status.</string>
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000">
<path
d="M246-382.5 209-277q-2 6.5-8.25 10.75T187-262q-12 0-18.5-9.25t-2-20.75L308-681.5q3-7.5 8.75-11.5t13.25-4h18q7.5 0 13.25 4t8.75 11.5l142.5 389q4.5 11.5-2.5 21t-19.5 9.5q-7.5 0-13.75-3.75t-8.25-11.75l-37-105H246Zm15.5-42h155l-77-217.5H338l-76.5 217.5Zm403 172.5q-50 0-82.5-26t-32.5-69.5q0-47.5 35-75.75t93-28.25q24.5 0 47 4.5t39 13v-20q0-38-20.25-58.25T684-532.5q-17.5 0-34.5 5.25T618-511q-8 5.5-15.75 3T590-517.5q-4.5-6.5-3.25-15T597-547q20-13 42.25-18.75T685-571.5q59.5 0 90.75 30.75T807-450v166.5q0 9-6.25 15.25T786-262q-9 0-15.25-6.25T764.5-283v-21H761q-16 26.5-43.5 39.25t-53 12.75Zm-.5-36.5q36.5 0 68.5-30.25t32-77.75q-16-8-38-13t-43.5-5q-42 0-65.5 17.5T594-348q0 27 20.5 43.25T664-288.5Z" />
</svg>

After

Width:  |  Height:  |  Size: 831 B

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000">
<path
d="M310-165q-12.5 0-20.5-8.25t-8-20.75q0-12 8-20.25t20.5-8.25h340q12.5 0 20.75 8.25T679-194q0 12.5-8.25 20.75T650-165H310Zm170-165q-12.5 0-20.5-8.25t-8-20.75v-327L349-583.5q-8.5 8.5-20 8.5t-20-8.5q-9-9-9-20.25t9-20.25l151-151q4.5-4.5 9.25-6.75T480-784q6 0 10.75 2.25t9.75 6.75l151 151q8.5 9 8.5 20.25T651.5-584q-9 9-20.25 9T611-584L509-686v327q0 12.5-8.25 20.75T480-330Z" />
</svg>

After

Width:  |  Height:  |  Size: 507 B