[mobile] Add handler for try undo in fast collaborative

This commit is contained in:
JuliaSvinareva 2021-04-01 23:27:58 +03:00
parent de241c88a6
commit babe1233a9
4 changed files with 17 additions and 1 deletions

View file

@ -1,6 +1,8 @@
import React, { Component } from 'react'
import { f7 } from 'framework7-react';
import {observer, inject} from "mobx-react"
import { LocalStorage } from '../../../utils/LocalStorage';
import { withTranslation } from 'react-i18next';
class CollaborationController extends Component {
constructor(props){
@ -11,6 +13,8 @@ class CollaborationController extends Component {
api.asc_registerCallback('asc_onParticipantsChanged', this.onChangeEditUsers.bind(this));
api.asc_registerCallback('asc_onConnectionStateChanged', this.onUserConnection.bind(this));
api.asc_registerCallback('asc_onCoAuthoringDisconnect', this.onCoAuthoringDisconnect.bind(this));
api.asc_registerCallback('asc_OnTryUndoInFastCollaborative', this.onTryUndoInFastCollaborative.bind(this));
});
Common.Notifications.on('document:ready', this.onDocumentReady.bind(this));
@ -74,9 +78,15 @@ class CollaborationController extends Component {
this.props.users.resetDisconnected(true);
}
onTryUndoInFastCollaborative() {
const { t } = this.props;
const _t = t("Common.Collaboration", { returnObjects: true });
f7.dialog.alert(_t.textTryUndoRedo, _t.notcriticalErrorTitle);
}
render() {
return null
}
}
export default inject('users', 'storeAppOptions')(observer(CollaborationController));
export default inject('users', 'storeAppOptions')(observer(withTranslation()(CollaborationController)));

View file

@ -40,6 +40,8 @@
"textCustomColors": "Custom Colors"
},
"Collaboration": {
"textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.",
"notcriticalErrorTitle": "Warning",
"textCollaboration": "Collaboration",
"textBack": "Back",
"textUsers": "Users",

View file

@ -283,6 +283,8 @@
"textCustomColors": "Custom Colors"
},
"Collaboration": {
"textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.",
"notcriticalErrorTitle": "Warning",
"textCollaboration": "Collaboration",
"textBack": "Back",
"textUsers": "Users",

View file

@ -360,6 +360,8 @@
"textCustomColors": "Custom Colors"
},
"Collaboration": {
"textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.",
"notcriticalErrorTitle": "Warning",
"textCollaboration": "Collaboration",
"textBack": "Back",
"textUsers": "Users",