[DE mobile] Fix Bug 59914

This commit is contained in:
SergeyEzhin 2022-12-29 17:42:03 +04:00
parent a01db72124
commit 0d8972a1bc
4 changed files with 26 additions and 7 deletions

View file

@ -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 (
<ViewSharingSettings
sharingSettingsUrl={sharingSettingsUrl}
/>
<ViewSharingSettings sharingSettingsUrl={sharingSettingsUrl} />
);
};

View file

@ -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 (
<Page>
<Navbar title={t('Common.Collaboration.textSharingSettings')} backLink={_t.textBack} />
<div id="sharing-placeholder" className="sharing-placeholder">
<div id="sharing-placeholder" className="sharing-placeholder" ref={ref}>
<iframe width="100%" height="500" frameBorder={0} scrolling="0" align="top" src={sharingSettingsUrl}></iframe>
</div>
</Page>

View file

@ -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 (

View file

@ -94,6 +94,10 @@
}
}
.sheet-modal.coauth__sheet {
transition: all .3s;
}
.disabled, [disabled] {
opacity: .55;
pointer-events: none;