Merge branch 'release/v1.2' of github.com:ONLYOFFICE/AppServer into release/v1.2

This commit is contained in:
Nikita Gopienko 2022-06-27 09:50:00 +03:00
commit bb8e009c43
6 changed files with 27 additions and 7 deletions

View File

@ -163,7 +163,7 @@ class DropDown extends React.PureComponent {
const rects = parent.current.getBoundingClientRect();
let dropDownHeight = this.dropDownRef.current.offsetParent
let dropDownHeight = this.dropDownRef.current?.offsetParent
? this.dropDownRef.current.offsetHeight
: DomHelpers.getHiddenElementOuterHeight(this.dropDownRef.current);

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))

View File

@ -85,8 +85,8 @@ class HotkeyStore {
} else {
if (scroll) scroll.style.overflowX = "hidden"; //hack to fix react-custom-scrollbar bug with horizontal scroll
el.scrollIntoView({ block: "center" });
if (scroll) scroll.style.overflowX = null;
//console.log("element is not visible");
if (scroll) scroll.style.overflowX = "scroll";
console.log("element is not visible");
}
}
};

View File

@ -133,7 +133,7 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
var newrootfolder = new List<string>();
foreach (var r in rootIds)
foreach (var r in rootIds.Where(id => id != 0))
{
var item = new KeyValuePair<int, int>(r, await fileMarker.GetRootFoldersIdMarkedAsNewAsync(r));
newrootfolder.Add($"new_{{\"key\"? \"{item.Key}\", \"value\"? \"{item.Value}\"}}");