190 display ctrl instead of for windows users (#9617)
Closes https://github.com/twentyhq/core-team-issues/issues/190 <img width="226" alt="Capture d’écran 2025-01-15 à 12 07 12" src="https://github.com/user-attachments/assets/b9a13746-2629-477a-9795-cda03c63f8f6" /> To test, update the user agent in your browser dev tools: <img width="459" alt="Capture d’écran 2025-01-15 à 12 14 29" src="https://github.com/user-attachments/assets/4371d5fc-fd3c-403d-beaa-7ba58019d3c9" />
This commit is contained in:
@ -1,4 +1,10 @@
|
||||
import { Button, IconButton, IconDotsVertical, useIsMobile } from 'twenty-ui';
|
||||
import {
|
||||
Button,
|
||||
IconButton,
|
||||
IconDotsVertical,
|
||||
getOsControlSymbol,
|
||||
useIsMobile,
|
||||
} from 'twenty-ui';
|
||||
|
||||
import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
@ -22,7 +28,7 @@ export const PageHeaderOpenCommandMenuButton = () => {
|
||||
size={isMobile ? 'medium' : 'small'}
|
||||
variant="secondary"
|
||||
accent="default"
|
||||
shortcut={isMobile ? '' : '⌘K'}
|
||||
hotkeys={[getOsControlSymbol(), 'K']}
|
||||
ariaLabel="Open command menu"
|
||||
onClick={openCommandMenu}
|
||||
/>
|
||||
|
||||
@ -19,6 +19,7 @@ import {
|
||||
IconUser,
|
||||
IconUserCircle,
|
||||
IconUsers,
|
||||
getOsControlSymbol,
|
||||
} from 'twenty-ui';
|
||||
|
||||
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
||||
@ -88,7 +89,7 @@ export const Default: Story = {
|
||||
<NavigationDrawerItem
|
||||
label="Search"
|
||||
Icon={IconSearch}
|
||||
keyboard={['⌘', 'K']}
|
||||
keyboard={[`${getOsControlSymbol()}`, 'K']}
|
||||
/>
|
||||
<NavigationDrawerItem
|
||||
label="Settings"
|
||||
|
||||
@ -5,6 +5,7 @@ import { CatalogDecorator, CatalogStory, IconSearch } from 'twenty-ui';
|
||||
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
|
||||
import { getOsControlSymbol } from '@ui/utilities/device/getOsControlSymbol';
|
||||
import { NavigationDrawerItem } from '../NavigationDrawerItem';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
@ -188,7 +189,7 @@ export const Catalog: CatalogStory<Story, typeof NavigationDrawerItem> = {
|
||||
: adornmentName === 'Count'
|
||||
? { count: 3 }
|
||||
: adornmentName === 'Keyboard Keys'
|
||||
? { keyboard: ['⌘', 'K'] }
|
||||
? { keyboard: [getOsControlSymbol(), 'K'] }
|
||||
: {},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user