mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-23 14:47:05 +08:00
refactor
This commit is contained in:
@ -211,8 +211,7 @@ const PageCustomFontSize = (props) => {
|
||||
|
||||
const apply = useCallback(() => {
|
||||
const size = valueRef.current;
|
||||
if (size === '') return;
|
||||
if (String(size) === String(displaySize)) return;
|
||||
if (size === '' || Number(size) === displaySize) return;
|
||||
props.applyFontSize(size);
|
||||
}, [displaySize, props.applyFontSize]);
|
||||
|
||||
@ -238,7 +237,7 @@ const PageCustomFontSize = (props) => {
|
||||
<Navbar title={t('Edit.txtCustom')} backLink="Back">
|
||||
{Device.phone &&
|
||||
<NavRight>
|
||||
<Link sheetClose="#edit-sheet" onClick={apply}>
|
||||
<Link sheetClose="#edit-sheet">
|
||||
{Device.ios ?
|
||||
<SvgIcon symbolId={IconExpandDownIos.id} className={'icon icon-svg'} /> :
|
||||
<SvgIcon symbolId={IconExpandDownAndroid.id} className={'icon icon-svg white'} />
|
||||
|
||||
@ -586,8 +586,7 @@ const PageCustomFontSize = (props) => {
|
||||
|
||||
const apply = useCallback(() => {
|
||||
const size = valueRef.current;
|
||||
if (size === '') return;
|
||||
if (String(size) === String(displaySize)) return;
|
||||
if (size === '' || Number(size) === displaySize) return;
|
||||
props.applyFontSize(size);
|
||||
}, [displaySize, props.applyFontSize]);
|
||||
|
||||
@ -613,7 +612,7 @@ const PageCustomFontSize = (props) => {
|
||||
<Navbar title={_t.txtCustom} backLink="Back">
|
||||
{Device.phone &&
|
||||
<NavRight>
|
||||
<Link sheetClose="#edit-sheet" onClick={apply}>
|
||||
<Link sheetClose="#edit-sheet">
|
||||
{Device.ios ?
|
||||
<SvgIcon symbolId={IconExpandDownIos.id} className={'icon icon-svg'} /> :
|
||||
<SvgIcon symbolId={IconExpandDownAndroid.id} className={'icon icon-svg white'} />
|
||||
|
||||
@ -427,8 +427,7 @@ const PageCustomFontSize = (props) => {
|
||||
|
||||
const apply = useCallback(() => {
|
||||
const size = valueRef.current;
|
||||
if (size === '') return;
|
||||
if (String(size) === String(displaySize)) return;
|
||||
if (size === '' || Number(size) === displaySize) return;
|
||||
props.applyFontSize(size);
|
||||
}, [displaySize, props.applyFontSize]);
|
||||
|
||||
@ -454,7 +453,7 @@ const PageCustomFontSize = (props) => {
|
||||
<Navbar title={_t.txtCustom} backLink="Back">
|
||||
{Device.phone &&
|
||||
<NavRight>
|
||||
<Link sheetClose="#edit-sheet" onClick={apply}>
|
||||
<Link sheetClose="#edit-sheet">
|
||||
{Device.ios ?
|
||||
<SvgIcon symbolId={IconExpandDownIos.id} className={'icon icon-svg'} /> :
|
||||
<SvgIcon symbolId={IconExpandDownAndroid.id} className={'icon icon-svg white'} />
|
||||
|
||||
@ -383,8 +383,7 @@ const PageCustomFontSize = (props) => {
|
||||
|
||||
const apply = useCallback(() => {
|
||||
const size = valueRef.current;
|
||||
if (size === '') return;
|
||||
if (String(size) === String(displaySize)) return;
|
||||
if (size === '' || Number(size) === displaySize) return;
|
||||
props.applyFontSize(size);
|
||||
}, [displaySize, props.applyFontSize]);
|
||||
|
||||
@ -410,7 +409,7 @@ const PageCustomFontSize = (props) => {
|
||||
<Navbar title={_t.txtCustom} backLink="Back">
|
||||
{Device.phone &&
|
||||
<NavRight>
|
||||
<Link sheetClose="#edit-sheet" onClick={apply}>
|
||||
<Link sheetClose="#edit-sheet">
|
||||
{Device.ios ?
|
||||
<SvgIcon symbolId={IconExpandDownIos.id} className={'icon icon-svg'} /> :
|
||||
<SvgIcon symbolId={IconExpandDownAndroid.id} className={'icon icon-svg white'} />
|
||||
|
||||
Reference in New Issue
Block a user