mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-23 21:01:03 +08:00
feat: mobile draw in pdf
This commit is contained in:
@ -27,7 +27,7 @@ export const DrawController = inject('storeAppOptions')(observer(({ storeAppOpti
|
||||
const [enableErasing, setEnableErasing] = useState(true);
|
||||
|
||||
const onApiFocusObject = () => {
|
||||
if (storeAppOptions.isDrawMode) {
|
||||
if (storeAppOptions.isDrawMode && currentTool !== 'scroll') {
|
||||
const api = Common.EditorApi.get();
|
||||
setEnableErasing(api.asc_HaveInks());
|
||||
}
|
||||
|
||||
@ -808,7 +808,8 @@
|
||||
"txtDownloadTxt": "Download TXT",
|
||||
"txtIncorrectPwd": "Password is incorrect",
|
||||
"txtOk": "Ok",
|
||||
"txtProtected": "Once you enter the password and open the file, the current password will be reset"
|
||||
"txtProtected": "Once you enter the password and open the file, the current password will be reset",
|
||||
"textDrawing": "Drawing"
|
||||
},
|
||||
"Toolbar": {
|
||||
"btnRestartNow": "Restart now",
|
||||
|
||||
@ -26,6 +26,7 @@ import IconHelp from '@common-icons/icon-help.svg';
|
||||
import IconAbout from '@common-icons/icon-about.svg';
|
||||
import IconFeedbackForIos from '@common-ios-icons/icon-feedback.svg?ios';
|
||||
import IconFeedbackForAndroid from '@common-android-icons/icon-feedback.svg';
|
||||
import IconDraw from '../../../../../common/mobile/resources/icons/draw.svg'
|
||||
|
||||
const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo")(observer(props => {
|
||||
const { t } = useTranslation();
|
||||
@ -58,6 +59,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo
|
||||
const isFavorite = appOptions.isFavorite;
|
||||
const canFillForms = appOptions.canFillForms;
|
||||
const isEditableForms = isForm && canFillForms;
|
||||
const canDrawInPDF = !appOptions.isDisconnected && docExt === 'pdf';
|
||||
const canSubmitForms = appOptions.canSubmitForms;
|
||||
const canCloseEditor = appOptions.canCloseEditor;
|
||||
const closeButtonText = canCloseEditor && appOptions.customization.close.text;
|
||||
@ -130,7 +132,12 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo
|
||||
<SvgIcon slot="media" symbolId={IconVersionHistory.id} className={'icon icon-svg'} />
|
||||
</ListItem>
|
||||
}
|
||||
{!isEditableForms ?
|
||||
{(canDrawInPDF) && (
|
||||
<ListItem key='drawing' title={_t.textDrawing} onClick={() => { settingsContext.closeModal(); Common.Notifications.trigger('draw:start');}}>
|
||||
<SvgIcon slot='media' symbolId={IconDraw.id} className='icon icon-svg'/>
|
||||
</ListItem>
|
||||
)}
|
||||
{!isEditableForms ?
|
||||
<ListItem title={t('Settings.textNavigation')} link={!Device.phone ? '/navigation' : '#'} onClick={() => {
|
||||
if(Device.phone) {
|
||||
onOpenOptions('navigation');
|
||||
|
||||
Reference in New Issue
Block a user