[SSE mobile] Bug 50044
This commit is contained in:
parent
705a4f08ae
commit
cc66831f6c
|
@ -143,6 +143,12 @@ const PageFontsCell = props => {
|
|||
});
|
||||
};
|
||||
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
if ((storeFocusObjects.focusOn !== 'cell') && Device.phone) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<Navbar title={_t.textFonts} backLink={_t.textBack} />
|
||||
|
@ -207,6 +213,12 @@ const PageTextColorCell = props => {
|
|||
props.f7router.navigate('/edit-cell-text-custom-color/', {props: {onTextColor: props.onTextColor}});
|
||||
}
|
||||
};
|
||||
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
if ((storeFocusObjects.focusOn !== 'cell') && Device.phone) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
|
@ -248,6 +260,12 @@ const PageFillColorCell = props => {
|
|||
props.f7router.navigate('/edit-cell-fill-custom-color/', {props: {onFillColor: props.onFillColor}});
|
||||
}
|
||||
};
|
||||
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
if ((storeFocusObjects.focusOn !== 'cell') && Device.phone) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
|
@ -325,6 +343,12 @@ const PageTextFormatCell = props => {
|
|||
const vAlignStr = storeCellSettings.vAlignStr;
|
||||
const isWrapText = storeCellSettings.isWrapText;
|
||||
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
if ((storeFocusObjects.focusOn !== 'cell') && Device.phone) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<Navbar title={_t.textTextFormat} backLink={_t.textBack} />
|
||||
|
@ -391,6 +415,12 @@ const PageTextOrientationCell = props => {
|
|||
const isAndroid = Device.android;
|
||||
const storeCellSettings = props.storeCellSettings;
|
||||
const orientationStr = storeCellSettings.orientationStr;
|
||||
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
if ((storeFocusObjects.focusOn !== 'cell') && Device.phone) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
|
@ -461,6 +491,12 @@ const PageBorderStyleCell = props => {
|
|||
13: `${_t.textThick}`
|
||||
};
|
||||
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
if ((storeFocusObjects.focusOn !== 'cell') && Device.phone) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<Navbar title={_t.textBorderStyle} backLink={_t.textBack} />
|
||||
|
@ -826,10 +862,10 @@ const TextColorCell = inject("storeCellSettings", "storePalette", "storeFocusObj
|
|||
const FillColorCell = inject("storeCellSettings", "storePalette", "storeFocusObjects")(observer(PageFillColorCell));
|
||||
const CustomTextColorCell = inject("storeCellSettings", "storePalette", "storeFocusObjects")(observer(PageCustomTextColorCell));
|
||||
const CustomFillColorCell = inject("storeCellSettings", "storePalette", "storeFocusObjects")(observer(PageCustomFillColorCell));
|
||||
const FontsCell = inject("storeCellSettings")(observer(PageFontsCell));
|
||||
const TextFormatCell = inject("storeCellSettings")(observer(PageTextFormatCell));
|
||||
const TextOrientationCell = inject("storeCellSettings")(observer(PageTextOrientationCell));
|
||||
const BorderStyleCell = inject("storeCellSettings")(observer(PageBorderStyleCell));
|
||||
const FontsCell = inject("storeCellSettings", "storeFocusObjects")(observer(PageFontsCell));
|
||||
const TextFormatCell = inject("storeCellSettings", "storeFocusObjects")(observer(PageTextFormatCell));
|
||||
const TextOrientationCell = inject("storeCellSettings", "storeFocusObjects")(observer(PageTextOrientationCell));
|
||||
const BorderStyleCell = inject("storeCellSettings", "storeFocusObjects")(observer(PageBorderStyleCell));
|
||||
const BorderColorCell = inject("storeCellSettings", "storePalette")(observer(PageBorderColorCell));
|
||||
const CustomBorderColorCell = inject("storeCellSettings", "storePalette")(observer(PageCustomBorderColorCell));
|
||||
const BorderSizeCell = inject("storeCellSettings")(observer(PageBorderSizeCell));
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
import React, {useState, useEffect, Fragment} from 'react';
|
||||
import {observer, inject} from "mobx-react";
|
||||
import {List, ListItem, Page, Navbar, Icon, ListButton, ListInput, Segmented, Button} from 'framework7-react';
|
||||
import {f7, List, ListItem, Page, Navbar, Icon, ListButton, ListInput, Segmented, Button} from 'framework7-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {Device} from "../../../../../common/mobile/utils/device";
|
||||
|
||||
const PageTypeLink = ({curType, changeType}) => {
|
||||
const PageTypeLink = ({curType, changeType, storeFocusObjects}) => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('View.Edit', {returnObjects: true});
|
||||
const [typeLink, setTypeLink] = useState(curType);
|
||||
|
||||
const settings = !storeFocusObjects.focusOn ? [] : (storeFocusObjects.focusOn === 'obj' ? storeFocusObjects.objects : storeFocusObjects.selections);
|
||||
if (storeFocusObjects.focusOn === 'obj' || settings.indexOf('hyperlink') === -1) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<Navbar title={_t.textLinkType} backLink={_t.textBack}/>
|
||||
|
@ -20,11 +26,17 @@ const PageTypeLink = ({curType, changeType}) => {
|
|||
)
|
||||
};
|
||||
|
||||
const PageSheet = ({curSheet, sheets, changeSheet}) => {
|
||||
const PageSheet = ({curSheet, sheets, changeSheet, storeFocusObjects}) => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('View.Edit', {returnObjects: true});
|
||||
const [stateSheet, setSheet] = useState(curSheet.value);
|
||||
|
||||
const settings = !storeFocusObjects.focusOn ? [] : (storeFocusObjects.focusOn === 'obj' ? storeFocusObjects.objects : storeFocusObjects.selections);
|
||||
if (storeFocusObjects.focusOn === 'obj' || settings.indexOf('hyperlink') === -1) {
|
||||
$$('.sheet-modal.modal-in').length > 0 && f7.sheet.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<Navbar title={_t.textSheet} backLink={_t.textBack}/>
|
||||
|
@ -146,8 +158,11 @@ const EditLink = props => {
|
|||
)
|
||||
};
|
||||
|
||||
const _PageTypeLink = inject("storeFocusObjects")(observer(PageTypeLink));
|
||||
const _PageSheet = inject("storeFocusObjects")(observer(PageSheet));
|
||||
|
||||
export {
|
||||
EditLink,
|
||||
PageTypeLink,
|
||||
PageSheet
|
||||
_PageTypeLink as PageTypeLink,
|
||||
_PageSheet as PageSheet
|
||||
};
|
Loading…
Reference in a new issue