clairehurst pushed to branch tor-browser-158.0a1-17.0-2 at The Tor Project / Applications / Tor Browser
Commits:
-
355dec7c
by clairehurst at 2026-11-24T12:34:05-07:00
6 changed files:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/compose/IPProtectionMenuItem.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/trustpanel/TrustPanelFragment.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/trustpanel/ui/ProtectionPanel.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/trustpanel/ui/ProtectionPanelBanner.kt
- mobile/android/fenix/app/src/main/res/navigation/nav_graph.xml
- mobile/android/fenix/app/src/main/res/values/torbrowser_strings.xml
Changes:
| ... | ... | @@ -60,6 +60,7 @@ internal fun IPProtectionMenuItem( |
| 60 | 60 | onToggle: () -> Unit,
|
| 61 | 61 | onNavigate: () -> Unit,
|
| 62 | 62 | ) {
|
| 63 | + return
|
|
| 63 | 64 | val statusDescription = badgeText(state.status)
|
| 64 | 65 | val role =
|
| 65 | 66 | if (state.status == IPProtectionMenuStatus.AuthRequired) {
|
| ... | ... | @@ -380,6 +380,13 @@ class TrustPanelFragment : BottomSheetDialogFragment() { |
| 380 | 380 | )
|
| 381 | 381 | store.dispatch(TrustPanelAction.Navigate.IPProtectionSettings)
|
| 382 | 382 | },
|
| 383 | + onConnectionSettingsClick = {
|
|
| 384 | + findNavController().navigate(
|
|
| 385 | + TrustPanelFragmentDirections.actionTrustPanelToSettings(
|
|
| 386 | + requireContext().getString(R.string.pref_key_connection)
|
|
| 387 | + ),
|
|
| 388 | + )
|
|
| 389 | + }
|
|
| 383 | 390 | )
|
| 384 | 391 | }
|
| 385 | 392 |
| ... | ... | @@ -84,6 +84,7 @@ internal fun ProtectionPanel( |
| 84 | 84 | onViewQWACClick: () -> Unit,
|
| 85 | 85 | onIPProtectionToggle: () -> Unit,
|
| 86 | 86 | onIPProtectionNavigate: () -> Unit,
|
| 87 | + onConnectionSettingsClick: () -> Unit,
|
|
| 87 | 88 | ) {
|
| 88 | 89 | val isSiteProtectionEnabled = isTrackingProtectionEnabled && isGlobalTrackingProtectionEnabled
|
| 89 | 90 | MenuScaffold(
|
| ... | ... | @@ -103,13 +104,6 @@ internal fun ProtectionPanel( |
| 103 | 104 | onTrackerBlockedMenuClick = onTrackerBlockedMenuClick,
|
| 104 | 105 | )
|
| 105 | 106 | |
| 106 | - TrackingProtectionMenuGroup(
|
|
| 107 | - isLocalPdf = isLocalPdf,
|
|
| 108 | - isGlobalTrackingProtectionEnabled = isGlobalTrackingProtectionEnabled,
|
|
| 109 | - isSiteProtectionEnabled = isSiteProtectionEnabled,
|
|
| 110 | - onTrackingProtectionToggleClick = onTrackingProtectionToggleClick,
|
|
| 111 | - )
|
|
| 112 | - |
|
| 113 | 107 | IPProtectionMenuGroup(
|
| 114 | 108 | visible = showIPProtection,
|
| 115 | 109 | ipProtectionMenuState = ipProtectionMenuState,
|
| ... | ... | @@ -124,7 +118,15 @@ internal fun ProtectionPanel( |
| 124 | 118 | onViewQWACClick = onViewQWACClick,
|
| 125 | 119 | )
|
| 126 | 120 | |
| 127 | - if (!isLocalPdf && !isPrivate) {
|
|
| 121 | + MenuGroup {
|
|
| 122 | + MenuItem(
|
|
| 123 | + label = stringResource(R.string.protection_panel_tor_connection_settings_title),
|
|
| 124 | + onClick = onConnectionSettingsClick,
|
|
| 125 | + beforeIconPainter = painterResource(mozilla.components.ui.icons.R.drawable.mozac_ic_settings_24)
|
|
| 126 | + )
|
|
| 127 | + }
|
|
| 128 | + |
|
| 129 | + if (!isLocalPdf) {
|
|
| 128 | 130 | MenuGroup {
|
| 129 | 131 | MenuItem(
|
| 130 | 132 | label = stringResource(id = R.string.clear_site_data),
|
| ... | ... | @@ -141,20 +143,6 @@ internal fun ProtectionPanel( |
| 141 | 143 | onToggleablePermissionClick = onToggleablePermissionClick,
|
| 142 | 144 | )
|
| 143 | 145 | }
|
| 144 | - |
|
| 145 | - LinkText(
|
|
| 146 | - text = stringResource(id = R.string.protection_panel_privacy_and_security_settings_2),
|
|
| 147 | - linkTextStates =
|
|
| 148 | - listOf(
|
|
| 149 | - LinkTextState(
|
|
| 150 | - text = stringResource(id = R.string.protection_panel_privacy_and_security_settings_2),
|
|
| 151 | - url = "",
|
|
| 152 | - onClick = { onPrivacySecuritySettingsClick() },
|
|
| 153 | - )
|
|
| 154 | - ),
|
|
| 155 | - linkTextColor = MaterialTheme.colorScheme.tertiary,
|
|
| 156 | - linkTextDecoration = TextDecoration.Underline,
|
|
| 157 | - )
|
|
| 158 | 146 | }
|
| 159 | 147 | }
|
| 160 | 148 | |
| ... | ... | @@ -484,6 +472,7 @@ private fun ProtectionPanelPreview( |
| 484 | 472 | onViewQWACClick = {},
|
| 485 | 473 | onIPProtectionToggle = {},
|
| 486 | 474 | onIPProtectionNavigate = {},
|
| 475 | + onConnectionSettingsClick = {},
|
|
| 487 | 476 | )
|
| 488 | 477 | }
|
| 489 | 478 | }
|
| ... | ... | @@ -142,23 +142,6 @@ internal fun ProtectionPanelBanner( |
| 142 | 142 | }
|
| 143 | 143 | }
|
| 144 | 144 | }
|
| 145 | - |
|
| 146 | - if (content.isGradient) {
|
|
| 147 | - ProtectionPanelGradientBanner(
|
|
| 148 | - title = content.title,
|
|
| 149 | - description = content.description,
|
|
| 150 | - imageId = content.imageId,
|
|
| 151 | - modifier = bannerModifier,
|
|
| 152 | - )
|
|
| 153 | - } else {
|
|
| 154 | - Card(
|
|
| 155 | - modifier = bannerModifier,
|
|
| 156 | - colors = CardDefaults.cardColors(containerColor = content.backgroundColor),
|
|
| 157 | - shape = MaterialTheme.shapes.extraLarge,
|
|
| 158 | - ) {
|
|
| 159 | - ProtectionPanelBannerRow(content = content, showChevron = onClick != null)
|
|
| 160 | - }
|
|
| 161 | - }
|
|
| 162 | 145 | }
|
| 163 | 146 | |
| 164 | 147 | @Composable
|
| ... | ... | @@ -1954,6 +1954,13 @@ |
| 1954 | 1954 | <navigation
|
| 1955 | 1955 | android:id="@+id/trust_panel_graph"
|
| 1956 | 1956 | app:startDestination="@id/trustPanelFragment">
|
| 1957 | + <action
|
|
| 1958 | + android:id="@+id/action_TrustPanel_to_Settings"
|
|
| 1959 | + app:destination="@id/settingsFragment"
|
|
| 1960 | + app:enterAnim="@anim/slide_in_right"
|
|
| 1961 | + app:exitAnim="@anim/slide_out_left"
|
|
| 1962 | + app:popEnterAnim="@anim/slide_in_left"
|
|
| 1963 | + app:popExitAnim="@anim/slide_out_right" />
|
|
| 1957 | 1964 | <argument
|
| 1958 | 1965 | android:name="sessionId"
|
| 1959 | 1966 | app:argType="string" />
|
| ... | ... | @@ -162,6 +162,9 @@ |
| 162 | 162 | <!-- Connection assist. Here "process" is a noun, referring to the execution of a computer program. "Tor process" specifically refers to the execution of the tor program, which is the program that handles the connection to the "Tor network". -->
|
| 163 | 163 | <string name="connection_assist_restarting_connection_button">Restarting Tor process…</string>
|
| 164 | 164 | |
| 165 | + <!-- ProtectionPanel strings -->
|
|
| 166 | + <string name="protection_panel_tor_connection_settings_title">Connection Settings</string>
|
|
| 167 | + |
|
| 165 | 168 | <!-- Notification title for closing browser tabs. "%s" will be replaced with the localised application name, such as "Tor Browser". -->
|
| 166 | 169 | <string name="notification_close_tor_browser_tabs">Close %s’s tabs?</string>
|
| 167 | 170 | <!-- Notification body for closing browser tabs. "%s" will be replaced with the localised application name, such as "Tor Browser". -->
|