Merge pull request #1715 from ONLYOFFICE/bugfix/public-room-link

Bugfix/public room link
This commit is contained in:
Ilya Oleshko 2023-09-07 15:24:08 +03:00 committed by GitHub
commit e2160181de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 14 deletions

View File

@ -5,7 +5,7 @@ import Scrollbar from "@docspace/components/scrollbar";
const StyledEditLinkPanel = styled.div`
.edit-link-panel {
.scroll-body {
${props =>
${(props) =>
props.theme.interfaceDirection === "rtl"
? css`
padding-left: 0 !important;
@ -33,7 +33,7 @@ const StyledEditLinkPanel = styled.div`
.edit-link_required-icon {
display: inline-flex;
${props =>
${(props) =>
props.theme.interfaceDirection === "rtl"
? css`
margin-right: 2px;
@ -50,16 +50,16 @@ const StyledEditLinkPanel = styled.div`
}
.edit-link-toggle-block {
${props =>
${(props) =>
props.theme.interfaceDirection === "rtl"
? css`
padding: 0 0 20px 16px;
padding: 0 20px 16px;
`
: css`
padding: 0 16px 20px 0;
padding: 0 16px 20px;
`}
border-top: ${props => props.theme.filesPanels.sharing.borderBottom};
border-top: ${(props) => props.theme.filesPanels.sharing.borderBottom};
.edit-link-toggle-header {
display: flex;
@ -67,7 +67,7 @@ const StyledEditLinkPanel = styled.div`
padding-bottom: 8px;
.edit-link-toggle {
${props =>
${(props) =>
props.theme.interfaceDirection === "rtl"
? css`
margin-right: auto;
@ -105,7 +105,7 @@ const StyledEditLinkPanel = styled.div`
}
.edit-link_generate-icon {
${props =>
${(props) =>
props.theme.interfaceDirection === "rtl"
? css`
margin: 16px 8px 0px 0px;
@ -125,7 +125,7 @@ const StyledEditLinkPanel = styled.div`
.edit-link_header {
padding: 0 16px;
border-bottom: ${props => props.theme.filesPanels.sharing.borderBottom};
border-bottom: ${(props) => props.theme.filesPanels.sharing.borderBottom};
.edit-link_heading {
font-weight: 700;
@ -158,8 +158,8 @@ const StyledButtons = styled(Box)`
position: absolute;
bottom: 0px;
width: 100%;
background: ${props => props.theme.filesPanels.sharing.backgroundButtons};
border-top: ${props => props.theme.filesPanels.sharing.borderTop};
background: ${(props) => props.theme.filesPanels.sharing.backgroundButtons};
border-top: ${(props) => props.theme.filesPanels.sharing.borderTop};
`;
export { StyledEditLinkPanel, StyledScrollbar, StyledButtons };

View File

@ -12,7 +12,7 @@ import Scrollbar from "../../scrollbar";
import ToggleButton from "../../toggle-button";
import { SubMenuItem } from "../styled-context-menu";
import Loaders from "@docspace/common/components/Loaders";
import { isMobile } from "react-device-detect";
import { isMobile, isMobileOnly } from "react-device-detect";
const SubMenu = (props) => {
const {
@ -33,7 +33,7 @@ const SubMenu = (props) => {
const theme = useTheme();
const onItemMouseEnter = (e, item) => {
if (item.disabled) {
if (item.disabled || isMobileOnly) {
e.preventDefault();
return;
}
@ -44,8 +44,9 @@ const SubMenu = (props) => {
const onItemClick = (e, item) => {
if (item.onLoad) {
e.preventDefault();
if (!isMobileOnly) return;
if (isMobile) onMobileItemClick(e, item.onLoad);
if (isMobileOnly) onMobileItemClick(e, item.onLoad);
else onLeafClick(e);
return;
}