From 0d8972a1bcec78630d6ccaf0c24497afce250d5c Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 29 Dec 2022 17:42:03 +0400 Subject: [PATCH] [DE mobile] Fix Bug 59914 --- .../mobile/lib/controller/SharingSettings.jsx | 5 +---- .../mobile/lib/view/SharingSettings.jsx | 22 +++++++++++++++++-- .../lib/view/collaboration/Collaboration.jsx | 2 +- apps/common/mobile/resources/less/common.less | 4 ++++ 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/apps/common/mobile/lib/controller/SharingSettings.jsx b/apps/common/mobile/lib/controller/SharingSettings.jsx index 17b340b96..9ae4bedac 100644 --- a/apps/common/mobile/lib/controller/SharingSettings.jsx +++ b/apps/common/mobile/lib/controller/SharingSettings.jsx @@ -1,7 +1,6 @@ import React, {useEffect} from 'react'; import ViewSharingSettings from "../view/SharingSettings"; import {observer, inject} from "mobx-react"; -import { f7 } from 'framework7-react'; const SharingSettingsController = props => { const appOptions = props.storeAppOptions; @@ -64,9 +63,7 @@ const SharingSettingsController = props => { }, []); return ( - + ); }; diff --git a/apps/common/mobile/lib/view/SharingSettings.jsx b/apps/common/mobile/lib/view/SharingSettings.jsx index 29cf97e3e..c432f3932 100644 --- a/apps/common/mobile/lib/view/SharingSettings.jsx +++ b/apps/common/mobile/lib/view/SharingSettings.jsx @@ -1,16 +1,34 @@ -import React, { useEffect } from 'react'; +import React, { useEffect, useRef } from 'react'; import { Navbar, Page } from 'framework7-react'; import { useTranslation } from 'react-i18next'; +import { Device } from '../../utils/device'; const ViewSharingSettings = props => { const { t } = useTranslation(); const sharingSettingsUrl = props.sharingSettingsUrl; const _t = t('Common.Collaboration', {returnObjects: true}); + const ref = useRef(null); + + useEffect(() => { + const coauthSheetElem = ref.current.closest('.coauth__sheet'); + + if(Device.phone) { + coauthSheetElem.style.height = '100%'; + coauthSheetElem.style.maxHeight = '100%'; + } + + return () => { + if(Device.phone) { + coauthSheetElem.style.height = null; + coauthSheetElem.style.maxHeight = '65%'; + } + } + }, []); return ( -
+
diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index 43a867c71..208e9575c 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -6,7 +6,6 @@ import {Device} from "../../../utils/device"; import {ReviewController, ReviewChangeController} from "../../controller/collaboration/Review"; import {PageDisplayMode} from "./Review"; import {ViewCommentsController, ViewCommentsSheetsController} from "../../controller/collaboration/Comments"; -// import SharingSettings from "../SharingSettings"; import SharingSettingsController from "../../controller/SharingSettings"; const PageUsers = inject("users")(observer(props => { @@ -146,6 +145,7 @@ class CollaborationView extends Component { onoptionclick(page){ f7.views.current.router.navigate(page); } + render() { const show_popover = this.props.usePopover; return ( diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index dc970e426..a8efd06fb 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -94,6 +94,10 @@ } } +.sheet-modal.coauth__sheet { + transition: all .3s; +} + .disabled, [disabled] { opacity: .55; pointer-events: none;