| ... |
... |
@@ -76,6 +76,7 @@ import mozilla.components.support.base.log.logger.Logger |
|
76
|
76
|
import mozilla.components.support.ktx.kotlin.applyRegistrableDomainSpan
|
|
77
|
77
|
import mozilla.components.support.ktx.kotlin.getOrigin
|
|
78
|
78
|
import mozilla.components.support.ktx.kotlin.isContentUrl
|
|
|
79
|
+import mozilla.components.support.ktx.kotlin.isOnionUrl
|
|
79
|
80
|
import mozilla.components.support.ktx.kotlin.isUrl
|
|
80
|
81
|
import mozilla.components.support.ktx.util.URLStringUtils
|
|
81
|
82
|
import mozilla.components.support.utils.ClipboardHandler
|
| ... |
... |
@@ -1273,19 +1274,26 @@ class BrowserToolbarMiddleware( |
|
1273
|
1274
|
onClick = object : BrowserToolbarEvent {},
|
|
1274
|
1275
|
)
|
|
1275
|
1276
|
} else if (
|
|
1276
|
|
- selectedTab.content.securityInfo.isSecure &&
|
|
1277
|
|
- selectedTab.trackingProtection.enabled &&
|
|
1278
|
|
- !selectedTab.trackingProtection.ignoredOnTrackingProtection
|
|
|
1277
|
+ selectedTab.content.securityInfo.isSecure
|
|
1279
|
1278
|
) {
|
|
1280
|
|
- buildSiteInfoAction(
|
|
1281
|
|
- drawableResId = iconsR.drawable.mozac_ic_shield_checkmark_24,
|
|
1282
|
|
- contentDescription = toolbarR.string.mozac_browser_toolbar_content_description_site_info,
|
|
1283
|
|
- highlighted = highlight,
|
|
1284
|
|
- onClick = StartPageActions.SiteInfoClicked,
|
|
1285
|
|
- )
|
|
|
1279
|
+ if (selectedTab.content.url.isOnionUrl()) {
|
|
|
1280
|
+ buildSiteInfoAction(
|
|
|
1281
|
+ drawableResId = iconsR.drawable.mozac_ic_onion,
|
|
|
1282
|
+ contentDescription = toolbarR.string.mozac_browser_toolbar_content_description_site_info,
|
|
|
1283
|
+ highlighted = highlight,
|
|
|
1284
|
+ onClick = StartPageActions.SiteInfoClicked,
|
|
|
1285
|
+ )
|
|
|
1286
|
+ } else {
|
|
|
1287
|
+ buildSiteInfoAction(
|
|
|
1288
|
+ drawableResId = iconsR.drawable.mozac_ic_lock_24,
|
|
|
1289
|
+ contentDescription = toolbarR.string.mozac_browser_toolbar_content_description_site_info,
|
|
|
1290
|
+ highlighted = highlight,
|
|
|
1291
|
+ onClick = StartPageActions.SiteInfoClicked,
|
|
|
1292
|
+ )
|
|
|
1293
|
+ }
|
|
1286
|
1294
|
} else {
|
|
1287
|
1295
|
buildSiteInfoAction(
|
|
1288
|
|
- drawableResId = iconsR.drawable.mozac_ic_shield_slash_24,
|
|
|
1296
|
+ drawableResId = iconsR.drawable.mozac_ic_lock_slash_critical_24,
|
|
1289
|
1297
|
contentDescription = toolbarR.string.mozac_browser_toolbar_content_description_site_info,
|
|
1290
|
1298
|
highlighted = highlight,
|
|
1291
|
1299
|
onClick = StartPageActions.SiteInfoClicked,
|