Fix Bug 57771 - The text color of the hotkeys on the Hotkeys page is not adapted to the dark theme

This commit is contained in:
Alexey Safronov 2022-06-24 18:39:33 +03:00
parent 84ff84faa2
commit f0f4e13633
3 changed files with 23 additions and 3 deletions

View File

@ -2706,6 +2706,12 @@ const Base = {
textColor: "#316DAA",
bottomLineColor: "#316DAA",
},
hotkeys: {
key: {
color: grayMain,
},
},
};
export default Base;

View File

@ -2716,6 +2716,12 @@ const Dark = {
textColor: "#E06A1B",
bottomLineColor: "#E06A1B",
},
hotkeys: {
key: {
color: "#C4C4C4",
},
},
};
export default Dark;

View File

@ -14,8 +14,9 @@ import NavigationBlock from "./NavigationBlock";
import CreationBlock from "./CreationBlock";
import UploadBlock from "./UploadBlock";
import { isMacOs } from "react-device-detect";
import Base from "@appserver/components/themes/base";
const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, theme, tReady }) => {
const scrollRef = useRef(null);
const onClose = () => setHotkeyPanelVisible(false);
@ -27,7 +28,7 @@ const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
};
const keyTextStyles = {
...textStyles,
...{ color: "#657077", className: "hotkeys-key" },
...{ color: theme.hotkeys.key.color, className: "hotkeys-key" },
};
const CtrlKey = isMacOs ? "⌘" : "Ctrl";
@ -131,12 +132,19 @@ const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
);
};
HotkeyPanel.defaultProps = { theme: Base };
export default inject(({ auth }) => {
const { hotkeyPanelVisible, setHotkeyPanelVisible } = auth.settingsStore;
const {
hotkeyPanelVisible,
setHotkeyPanelVisible,
theme,
} = auth.settingsStore;
return {
visible: hotkeyPanelVisible,
setHotkeyPanelVisible,
theme,
};
})(
withTranslation(["HotkeysPanel", "Article", "Common"])(observer(HotkeyPanel))