Web: Files: fixed AltKey for macOS

This commit is contained in:
Nikita Gopienko 2022-03-10 18:31:14 +03:00
parent 8a8451bf7b
commit 80e7064dcf
3 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import React from "react";
import Row from "@appserver/components/row";
import Text from "@appserver/components/text";
const CreationBlock = ({ t, textStyles, keyTextStyles }) => {
const CreationBlock = ({ t, textStyles, keyTextStyles, AltKey }) => {
return (
<>
<Row className="hotkeys_row">
@ -32,7 +32,7 @@ const CreationBlock = ({ t, textStyles, keyTextStyles }) => {
<Row className="hotkeys_row">
<>
<Text {...textStyles}>{t("HotkeysCreateFormFromFile")}</Text>
<Text {...keyTextStyles}>Alt + Shift + o</Text>
<Text {...keyTextStyles}>{AltKey} + Shift + o</Text>
</>
</Row>
<Row className="hotkeys_row">

View File

@ -2,7 +2,7 @@ import React from "react";
import Row from "@appserver/components/row";
import Text from "@appserver/components/text";
const NavigationBlock = ({ t, textStyles, keyTextStyles }) => {
const NavigationBlock = ({ t, textStyles, keyTextStyles, AltKey }) => {
return (
<>
<Row className="hotkeys_row">
@ -20,7 +20,7 @@ const NavigationBlock = ({ t, textStyles, keyTextStyles }) => {
<Row className="hotkeys_row">
<>
<Text {...textStyles}>{t("HotkeysGoToTheTopOfTheList")}</Text>
<Text {...keyTextStyles}>Alt + </Text>
<Text {...keyTextStyles}>{AltKey} + </Text>
</>
</Row>
</>

View File

@ -28,6 +28,7 @@ const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
};
const CtrlKey = isMacOs ? "⌘" : "Ctrl";
const AltKey = isMacOs ? "⌥" : "Alt";
const onKeyPress = (e) =>
(e.key === "Esc" || e.key === "Escape") && onClose();
@ -53,6 +54,7 @@ const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
t={t}
textStyles={textStyles}
keyTextStyles={keyTextStyles}
AltKey={AltKey}
/>
<Heading className="hotkeys_sub-header">
{t("HotkeysCreatingObjects")}
@ -61,6 +63,7 @@ const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
t={t}
textStyles={textStyles}
keyTextStyles={keyTextStyles}
AltKey={AltKey}
/>
<Heading className="hotkeys_sub-header">
{t("HotkeysUploadingObjects")}