[PE SSE mobile] Fix Bug 57113

This commit is contained in:
SergeyEzhin 2022-05-11 19:23:19 +04:00
parent 284e697090
commit d460ee980c
4 changed files with 41 additions and 2 deletions

View file

@ -115,12 +115,12 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textYes": "Yes",
"titleLicenseExp": "License expired",
"warnLicenseExp": "Your license has expired. Please, update your license and refresh the page.",
"titleServerVersion": "Editor updated",
"titleUpdateVersion": "Version changed",
"txtIncorrectPwd": "Password is incorrect",
"txtProtected": "Once you enter the password and open the file, the current password to the file will be reset",
"warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"warnLicenseExp": "Your license has expired. Please, update it and refresh the page.",
"warnLicenseLimitedNoAccess": "License expired. You have no access to document editing functionality. Please, contact your administrator.",
"warnLicenseLimitedRenewed": "License needs to be renewed. You have limited access to document editing functionality.<br>Please contact your administrator to get full access",
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",

View file

@ -152,8 +152,26 @@ class MainController extends Component {
const onEditorPermissions = params => {
const licType = params.asc_getLicenseType();
const { t } = this.props;
// const _t = t('Controller.Main', { returnObjects:true });
if (Asc.c_oLicenseResult.Expired === licType ||
Asc.c_oLicenseResult.Error === licType ||
Asc.c_oLicenseResult.ExpiredTrial === licType) {
this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
f7.dialog.create({
title: t('Controller.Main.titleLicenseExp'),
text: t('Controller.Main.warnLicenseExp')
}).open();
return;
}
if (Asc.c_oLicenseResult.ExpiredLimited === licType) {
this._state.licenseType = licType;
}
this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
const storeAppOptions = this.props.storeAppOptions;
storeAppOptions.setPermissionOptions(this.document, licType, params, this.permissions, EditorUIController.isSupportEditFeature());

View file

@ -74,6 +74,8 @@
"errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
"leavePageText": "You have unsaved changes in this document. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.",
"notcriticalErrorTitle": "Warning",
"titleLicenseExp": "License expired",
"warnLicenseExp": "Your license has expired. Please, update your license and refresh the page.",
"SDK": {
"txtAccent": "Accent",
"txtAll": "(All)",

View file

@ -197,6 +197,25 @@ class MainController extends Component {
const onEditorPermissions = params => {
const licType = params.asc_getLicenseType();
const { t } = this.props;
// const _t = t('Controller.Main', { returnObjects:true });
if (Asc.c_oLicenseResult.Expired === licType ||
Asc.c_oLicenseResult.Error === licType ||
Asc.c_oLicenseResult.ExpiredTrial === licType) {
f7.dialog.create({
title: t('Controller.Main.titleLicenseExp'),
text: t('Controller.Main.warnLicenseExp')
}).open();
return;
}
if (Asc.c_oLicenseResult.ExpiredLimited === licType) {
this._state.licenseType = licType;
}
this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
const appOptions = this.props.storeAppOptions;