mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 10:03:28 +00:00
[ENG-1277] Windows open context menu key correction (#1576)
Update SharedItems.tsx
This commit is contained in:
parent
8f944ddf98
commit
b21d928479
|
@ -38,6 +38,7 @@ export const OpenOrDownload = new ConditionalItem({
|
||||||
const keybind = useKeybindFactory();
|
const keybind = useKeybindFactory();
|
||||||
const { platform } = usePlatform();
|
const { platform } = usePlatform();
|
||||||
const { doubleClick } = useViewItemDoubleClick();
|
const { doubleClick } = useViewItemDoubleClick();
|
||||||
|
const os = useOperatingSystem(true);
|
||||||
|
|
||||||
if (platform === 'web') return <Menu.Item label="Download" />;
|
if (platform === 'web') return <Menu.Item label="Download" />;
|
||||||
else
|
else
|
||||||
|
@ -45,7 +46,9 @@ export const OpenOrDownload = new ConditionalItem({
|
||||||
<>
|
<>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
label="Open"
|
label="Open"
|
||||||
keybind={keybind([ModifierKeys.Control], ['O'])}
|
keybind={keybind(os === 'windows' ? [] : [ModifierKeys.Control], [
|
||||||
|
os === 'windows' ? 'Enter' : 'O'
|
||||||
|
])}
|
||||||
onClick={() => doubleClick()}
|
onClick={() => doubleClick()}
|
||||||
/>
|
/>
|
||||||
<Conditional items={[OpenWith]} />
|
<Conditional items={[OpenWith]} />
|
||||||
|
|
Loading…
Reference in a new issue