Skip to content

Commit 4535e0a

Browse files
committed
fixed global menu alignment
1 parent 7f5abcc commit 4535e0a

File tree

3 files changed

+32
-23
lines changed

3 files changed

+32
-23
lines changed

app/images/icons/popup.svg

Lines changed: 3 additions & 0 deletions
Loading

ui/components/component-library/icon/icon.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export enum IconName {
201201
Plug = 'plug',
202202
PlusAndMinus = 'plus-and-minus',
203203
PolicyAlert = 'policy-alert',
204+
Popup = 'popup',
204205
Print = 'print',
205206
PriorityHigh = 'priority-high',
206207
PrivacyTip = 'privacy-tip',

ui/components/multichain/global-menu/global-menu.tsx

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,11 @@ export const GlobalMenu = ({
338338
</MenuItem>
339339
</>
340340
)}
341+
<Box
342+
borderColor={BorderColor.borderMuted}
343+
width={BlockSize.Full}
344+
style={{ height: '1px', borderBottomWidth: 0 }}
345+
></Box>
341346
{rewardsEnabled && (
342347
<DiscoverMenuItem
343348
metricsLocation={METRICS_LOCATION}
@@ -394,35 +399,13 @@ export const GlobalMenu = ({
394399
width={BlockSize.Full}
395400
style={{ height: '1px', borderBottomWidth: 0 }}
396401
></Box>
397-
<MenuItem
398-
to={
399-
isGatorPermissionsRevocationFeatureEnabled()
400-
? GATOR_PERMISSIONS
401-
: PERMISSIONS
402-
}
403-
iconName={IconName.SecurityTick}
404-
onClick={() => {
405-
trackEvent({
406-
event: MetaMetricsEventName.NavPermissionsOpened,
407-
category: MetaMetricsEventCategory.Navigation,
408-
properties: {
409-
location: METRICS_LOCATION,
410-
},
411-
});
412-
closeMenu();
413-
}}
414-
data-testid="global-menu-connected-sites"
415-
disabled={hasUnapprovedTransactions}
416-
>
417-
{t('allPermissions')}
418-
</MenuItem>
419402
{/* Toggle between popup and sidepanel - only for Chrome when sidepanel is enabled */}
420403
{getBrowserName() !== PLATFORM_FIREFOX &&
421404
isSidePanelEnabled &&
422405
(getEnvironmentType() === ENVIRONMENT_TYPE_POPUP ||
423406
getEnvironmentType() === ENVIRONMENT_TYPE_SIDEPANEL) && (
424407
<MenuItem
425-
iconName={IconName.Sidepanel}
408+
iconName={isSidePanelDefault ? IconName.Popup : IconName.Sidepanel}
426409
onClick={async () => {
427410
await toggleDefaultView();
428411
trackEvent({
@@ -442,6 +425,28 @@ export const GlobalMenu = ({
442425
{isSidePanelDefault ? t('switchToPopup') : t('switchToSidePanel')}
443426
</MenuItem>
444427
)}
428+
<MenuItem
429+
to={
430+
isGatorPermissionsRevocationFeatureEnabled()
431+
? GATOR_PERMISSIONS
432+
: PERMISSIONS
433+
}
434+
iconName={IconName.SecurityTick}
435+
onClick={() => {
436+
trackEvent({
437+
event: MetaMetricsEventName.NavPermissionsOpened,
438+
category: MetaMetricsEventCategory.Navigation,
439+
properties: {
440+
location: METRICS_LOCATION,
441+
},
442+
});
443+
closeMenu();
444+
}}
445+
data-testid="global-menu-connected-sites"
446+
disabled={hasUnapprovedTransactions}
447+
>
448+
{t('allPermissions')}
449+
</MenuItem>
445450
<MenuItem
446451
data-testid="global-menu-networks"
447452
iconName={IconName.Hierarchy}

0 commit comments

Comments
 (0)