diff --git a/feature/home/src/main/assets/guides/twitter.json b/feature/home/src/main/assets/guides/twitter.json index d20d1d95..4cd9ddab 100644 --- a/feature/home/src/main/assets/guides/twitter.json +++ b/feature/home/src/main/assets/guides/twitter.json @@ -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" + } + } + ] + } + ] } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/feature/home/src/main/java/com/twofasapp/feature/home/ui/guideinit/GuideInitScreen.kt b/feature/home/src/main/java/com/twofasapp/feature/home/ui/guideinit/GuideInitScreen.kt index 86d97423..e5b63641 100644 --- a/feature/home/src/main/java/com/twofasapp/feature/home/ui/guideinit/GuideInitScreen.kt +++ b/feature/home/src/main/java/com/twofasapp/feature/home/ui/guideinit/GuideInitScreen.kt @@ -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)) } } diff --git a/feature/home/src/main/java/com/twofasapp/feature/home/ui/guides/GuidesScreen.kt b/feature/home/src/main/java/com/twofasapp/feature/home/ui/guides/GuidesScreen.kt index e50c7c83..2f594aa4 100644 --- a/feature/home/src/main/java/com/twofasapp/feature/home/ui/guides/GuidesScreen.kt +++ b/feature/home/src/main/java/com/twofasapp/feature/home/ui/guides/GuidesScreen.kt @@ -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" diff --git a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/ServicesScreen.kt b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/ServicesScreen.kt index 8d0705e2..671025ec 100644 --- a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/ServicesScreen.kt +++ b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/ServicesScreen.kt @@ -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) diff --git a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/add/manual/AddServiceManualScreen.kt b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/add/manual/AddServiceManualScreen.kt index f2945d7a..0751fa27 100644 --- a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/add/manual/AddServiceManualScreen.kt +++ b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/add/manual/AddServiceManualScreen.kt @@ -87,7 +87,7 @@ internal fun AddServiceManualScreen( LaunchedEffect(Unit) { awaitFrame() -// focusRequester.requestFocus() + focusRequester.requestFocus() } Column(