Files
DocumentServer-v-9.2.0/web-apps/apps/common/mobile/lib/view/SharingSettings.jsx
Yajbir Singh f1b860b25c
Some checks failed
check / markdownlint (push) Has been cancelled
check / spellchecker (push) Has been cancelled
updated
2025-12-11 19:03:17 +05:30

44 lines
1.3 KiB
JavaScript

import React, { useEffect, useRef } from 'react';
import { Navbar, Page } from 'framework7-react';
import { useTranslation } from 'react-i18next';
import { Device } from '../../utils/device';
const frameStyle = {
width: '100%',
height: '100%',
minHeight: 380
}
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" ref={ref}>
<iframe style={frameStyle} frameBorder={0} scrolling="0" align="top" src={sharingSettingsUrl}></iframe>
</div>
</Page>
)
};
export default ViewSharingSettings;