[PE] Fix Bug 53069
This commit is contained in:
parent
3668ec5305
commit
2ef4689acf
|
@ -34,7 +34,7 @@ const ToolbarView = props => {
|
||||||
onEditClick: () => props.openOptions('edit'),
|
onEditClick: () => props.openOptions('edit'),
|
||||||
onAddClick: () => props.openOptions('add')
|
onAddClick: () => props.openOptions('add')
|
||||||
})}
|
})}
|
||||||
{ Device.phone ? null : <Link className={props.disabledControls && 'disabled'} icon='icon-search' searchbarEnable='.searchbar' href={false}></Link> }
|
{ Device.phone ? null : <Link className={(props.disabledControls || props.disabledPreview) && 'disabled'} icon='icon-search' searchbarEnable='.searchbar' href={false}></Link> }
|
||||||
{props.displayCollaboration && window.matchMedia("(min-width: 375px)").matches ? <Link className={props.disabledControls && 'disabled'} id='btn-coauth' href={false} icon='icon-collaboration' onClick={() => props.openOptions('coauth')}></Link> : null}
|
{props.displayCollaboration && window.matchMedia("(min-width: 375px)").matches ? <Link className={props.disabledControls && 'disabled'} id='btn-coauth' href={false} icon='icon-collaboration' onClick={() => props.openOptions('coauth')}></Link> : null}
|
||||||
<Link className={(props.disabledSettings || props.disabledControls || isDisconnected) && 'disabled'} id='btn-settings' icon='icon-settings' href={false} onClick={() => props.openOptions('settings')}></Link>
|
<Link className={(props.disabledSettings || props.disabledControls || isDisconnected) && 'disabled'} id='btn-settings' icon='icon-settings' href={false} onClick={() => props.openOptions('settings')}></Link>
|
||||||
</NavRight>
|
</NavRight>
|
||||||
|
|
|
@ -57,9 +57,12 @@ const routes = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
const SettingsList = inject("storeAppOptions")(observer(props => {
|
const SettingsList = inject("storeAppOptions", "storeToolbarSettings")(observer(props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const _t = t('View.Settings', {returnObjects: true});
|
const _t = t('View.Settings', {returnObjects: true});
|
||||||
|
const storeToolbarSettings = props.storeToolbarSettings;
|
||||||
|
const disabledPreview = storeToolbarSettings.countPages <= 0;
|
||||||
|
|
||||||
const navbar = <Navbar title={_t.textSettings}>
|
const navbar = <Navbar title={_t.textSettings}>
|
||||||
{!props.inPopover && <NavRight><Link popupClose=".settings-popup">{_t.textDone}</Link></NavRight>}
|
{!props.inPopover && <NavRight><Link popupClose=".settings-popup">{_t.textDone}</Link></NavRight>}
|
||||||
</Navbar>;
|
</Navbar>;
|
||||||
|
@ -121,7 +124,7 @@ const SettingsList = inject("storeAppOptions")(observer(props => {
|
||||||
{navbar}
|
{navbar}
|
||||||
<List>
|
<List>
|
||||||
{!props.inPopover &&
|
{!props.inPopover &&
|
||||||
<ListItem disabled={appOptions.readerMode ? true : false} title={!_isEdit ? _t.textFind : _t.textFindAndReplace} link="#" searchbarEnable='.searchbar' onClick={closeModal} className='no-indicator'>
|
<ListItem disabled={appOptions.readerMode || disabledPreview ? true : false} title={!_isEdit ? _t.textFind : _t.textFindAndReplace} link="#" searchbarEnable='.searchbar' onClick={closeModal} className='no-indicator'>
|
||||||
<Icon slot="media" icon="icon-search"></Icon>
|
<Icon slot="media" icon="icon-search"></Icon>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
}
|
}
|
||||||
|
@ -141,7 +144,7 @@ const SettingsList = inject("storeAppOptions")(observer(props => {
|
||||||
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, '/download/')}>
|
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, '/download/')}>
|
||||||
<Icon slot="media" icon="icon-download"></Icon>
|
<Icon slot="media" icon="icon-download"></Icon>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem title={_t.textPrint} onClick={onPrint}>
|
<ListItem className={disabledPreview && 'disabled'} title={_t.textPrint} onClick={onPrint}>
|
||||||
<Icon slot="media" icon="icon-print"></Icon>
|
<Icon slot="media" icon="icon-print"></Icon>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem title={_t.textPresentationInfo} link="#" onClick={onoptionclick.bind(this, "/presentation-info/")}>
|
<ListItem title={_t.textPresentationInfo} link="#" onClick={onoptionclick.bind(this, "/presentation-info/")}>
|
||||||
|
|
Loading…
Reference in a new issue