Update guides

This commit is contained in:
Rafał Kobyłko 2023-11-11 13:52:10 +01:00
parent 2ec65afbf4
commit 0d5b902ba8
5 changed files with 90 additions and 82 deletions

View File

@ -1,74 +1,74 @@
{
"serviceName": "Twitter",
"serviceId": "a2987ab4-ac5c-48ce-863c-d3d3d1220fdb",
"flow": {
"header": "Follow our guide to pair your Twitter account with the 2FAS app.",
"menu": {
"title": "Please select the method you use to open Twitter now",
"items": [
{
"name": "Desktop computer or laptop",
"steps": [
{
"image": "web_url",
"content": "Go to **www.twitter.com** and log into your account."
},
{
"image": "web_menu",
"content": "Click **More** in the left-hand menu, then click **Settings and Support** and select **Settings and privacy**."
},
{
"image": "gears",
"content": "Select **Security and account access**, then select **Security** and then click **Two-factor authenticator**."
},
{
"image": "web_phone",
"content": "Select **Authentication app**."
},
{
"image": "2fas_type",
"content": "You may be asked to enter your password for security reasons. Enter the password and click Confirm."
},
{
"image": "phone_qr",
"content": "Click **Get started**, scan the QR code and click **Next**. Scanning the QR code will generate a token in the the 2FAS app. Retype it again and click **Confirm**.\n\nRemeber to save your single-use backup code to recover your account if necessary.",
"cta": {
"name": "Scan QR code",
"action": "open_scanner"
}
"serviceName": "X",
"serviceId": "a2987ab4-ac5c-48ce-863c-d3d3d1220fdb",
"flow": {
"header": "Follow our guide to pair your X account with the 2FAS app.",
"menu": {
"title": "Please select the method you use to open X now",
"items": [
{
"name": "Desktop computer or laptop",
"steps": [
{
"image": "web_url",
"content": "Go to **www.x.com** and log into your account."
},
{
"image": "web_menu",
"content": "Click **More** in the left-hand menu, then click **Settings and Support** and select **Settings and privacy**."
},
{
"image": "gears",
"content": "Select **Security and account access**, then select **Security** and then click **Two-factor authenticator**."
},
{
"image": "web_phone",
"content": "Select **Authentication app**."
},
{
"image": "2fas_type",
"content": "You may be asked to enter your password for security reasons. Enter the password and click Confirm."
},
{
"image": "phone_qr",
"content": "Click **Get started**, scan the QR code and click **Next**. Scanning the QR code will generate a token in the the 2FAS app. Retype it again and click **Confirm**.\n\nRemeber to save your single-use backup code to recover your account if necessary.",
"cta": {
"name": "Scan QR code",
"action": "open_scanner"
}
]
},
{
"name": "Mobile (app or browser)",
"steps": [
{
"image": "web_menu",
"content": "Open Twitter, tap on your account icon in the top left corner to expand the side menu."
},
{
"image": "gears",
"content": "Expand **Settings and Support**, then tap **Settings and privacy**."
},
{
"image": "web_phone",
"content": "Select **Security and account access**, tap **Security**, and then select **Two-factor authentication** option.\n\nSelect **Authentication app** as the way to receive verification codes."
},
{
"image": "2fas_type",
"content": "You may be asked to enter your password for security reasons. Enter your password and tap **Confirm**.\n\nTap **Get started** and then select **Link on another device**."
},
{
"image": "phone_qr",
"content": "Scan the QR code **(take a screenshot and upload it during scanning)**, tap **Enter code** and retype generated token, tap **Confirm** and **Done**.\n\n Remeber to get your backup codes from Twitter!",
"cta": {
"name": "Scan QR code",
"action": "open_scanner"
}
}
]
}
]
}
}
]
},
{
"name": "Mobile (app or browser)",
"steps": [
{
"image": "web_menu",
"content": "Open X, tap on your account icon in the top left corner to expand the side menu."
},
{
"image": "gears",
"content": "Expand **Settings and Support**, then tap **Settings and privacy**."
},
{
"image": "web_phone",
"content": "Select **Security and account access**, tap **Security**, and then select **Two-factor authentication** option.\n\nSelect **Authentication app** as the way to receive verification codes."
},
{
"image": "2fas_type",
"content": "You may be asked to enter your password for security reasons. Enter your password and tap **Confirm**.\n\nTap **Get started** and then select **Link on another device**."
},
{
"image": "phone_qr",
"content": "Scan the QR code **(take a screenshot and upload it during scanning)**, tap **Enter code** and retype generated token, tap **Confirm** and **Done**.\n\n Remeber to get your backup codes from X!",
"cta": {
"name": "Scan QR code",
"action": "open_scanner"
}
}
]
}
]
}
}
}
}

View File

@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
@ -107,41 +108,42 @@ private fun Content(
Text(
text = guideJson.flow.header,
style = TwTheme.typo.body3,
style = MaterialTheme.typography.bodyLarge,
color = TwTheme.color.onSurfacePrimary,
modifier = Modifier.padding(horizontal = 24.dp),
textAlign = TextAlign.Center,
)
Spacer(modifier = Modifier.height(48.dp))
Spacer(modifier = Modifier.weight(1f))
TwDivider(modifier = Modifier.padding(vertical = 16.dp))
Text(
text = guideJson.flow.menu.title,
style = TwTheme.typo.body2,
color = TwTheme.color.onSurfacePrimary,
style = MaterialTheme.typography.bodyMedium,
color = TwTheme.color.onSurfacePrimary.copy(alpha = 0.7f),
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp),
.padding(horizontal = 24.dp),
)
Spacer(modifier = Modifier.height(16.dp))
guideJson.flow.menu.items.forEachIndexed { index, menuItem ->
Text(
text = menuItem.name,
style = TwTheme.typo.body1,
style = MaterialTheme.typography.bodyLarge,
color = TwTheme.color.onSurfacePrimary,
modifier = Modifier
.fillMaxWidth()
.clickable {
openGuide(guide, index)
}
.padding(horizontal = 20.dp, vertical = 20.dp),
.padding(horizontal = 24.dp, vertical = 20.dp),
)
}
TwDivider(modifier = Modifier.padding(vertical = 16.dp))
Spacer(modifier = Modifier.height(16.dp))
}
}

View File

@ -173,7 +173,7 @@ private fun GuideItem(
ResponsiveText(
text = when (guide) {
Guide.Facebook -> "Facebook"
Guide.Twitter -> "Twitter"
Guide.Twitter -> "X"
Guide.Amazon -> "Amazon"
Guide.Universal -> "Universal Guide"
Guide.LinkedIn -> "LinkedIn"

View File

@ -283,7 +283,10 @@ private fun ServicesScreen(
scrollBehavior = scrollBehavior,
onSortClick = { showSortDialog = true },
onAddGroupClick = { showAddGroupDialog = true },
onNotificationsClick = { listener.openNotifications() },
onNotificationsClick = {
onSearchFocusChange(false)
listener.openNotifications()
},
onSearchQueryChange = onSearchQueryChange,
onSearchFocusChange = onSearchFocusChange,
focusRequester = focusRequester,
@ -294,7 +297,10 @@ private fun ServicesScreen(
isVisible = uiState.isLoading.not(),
isExtendedVisible = uiState.totalServices == 0,
isNormalVisible = reorderableState.listState.isScrollingUp(),
onClick = { listener.openAddServiceModal() },
onClick = {
onSearchFocusChange(false)
listener.openAddServiceModal()
},
)
},
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection)

View File

@ -87,7 +87,7 @@ internal fun AddServiceManualScreen(
LaunchedEffect(Unit) {
awaitFrame()
// focusRequester.requestFocus()
focusRequester.requestFocus()
}
Column(