Merge pull request #1783 from ONLYOFFICE/feature/fix-bugs

Feature/fix bugs
This commit is contained in:
maxkadushkin 2022-06-07 18:32:02 +03:00 committed by GitHub
commit c61a957ec7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 8 deletions

View file

@ -52,7 +52,7 @@ const PageAbout = props => {
{addressCustomer && addressCustomer.length ? (
<p>
<label>{_t.textAddress}:</label>
<Link id="settings-about-address" className="external">{addressCustomer}</Link>
<Link id="settings-about-address" external={true}>{addressCustomer}</Link>
</p>
) : null}
{mailCustomer && mailCustomer.length ? (
@ -63,7 +63,7 @@ const PageAbout = props => {
) : null}
{urlCustomer && urlCustomer.length ? (
<p>
<Link id="settings-about-url" className="external" target="_blank"
<Link id="settings-about-url" external={true} target="_blank"
href={!/^https?:\/{2}/i.test(urlCustomer) ? "http:\/\/" : '' + urlCustomer}>
{urlCustomer}
</Link>
@ -82,7 +82,7 @@ const PageAbout = props => {
</p>
<h3 className="vendor">{publisherName}</h3>
<p>
<Link className="external" target="_blank" href={publisherUrl}>{publisherPrintUrl}</Link>
<Link external={true} target="_blank" href={publisherUrl}>{publisherPrintUrl}</Link>
</p>
</div>
</Fragment>
@ -110,7 +110,7 @@ const PageAbout = props => {
<Link id="settings-about-tel" external={true} href={`tel:${__PUBLISHER_PHONE__}`}>{__PUBLISHER_PHONE__}</Link>
</p>
<p>
<a id="settings-about-url" className="external" target="_blank" href={publisherUrl}>{publisherPrintUrl}</a>
<Link id="settings-about-url" external={true} target="_blank" href={publisherUrl}>{publisherPrintUrl}</Link>
</p>
</div>
</Fragment>

View file

@ -25,7 +25,6 @@ const PageUsers = inject("users")(observer(props => {
</NavRight>
}
</Navbar>
<BlockTitle>{_t.textEditUser}</BlockTitle>
<List className="coauth__list">
{storeUsers.editUsers.map((user, i) => (
<ListItem title={user.name + (user.count > 1 ? ` (${user.count})` : '')} key={i}>

View file

@ -616,7 +616,7 @@ const pickLink = (message) => {
arrayComment = arrayComment.sort(function(item1,item2){ return item1.start - item2.start; });
let str_res = (arrayComment.length>0) ? <label>{Common.Utils.String.htmlEncode(message.substring(0, arrayComment[0].start))}{arrayComment[0].str}</label> : <label>{message}</label>;
let str_res = (arrayComment.length>0) ? <label>{message.substring(0, arrayComment[0].start)}{arrayComment[0].str}</label> : <label>{message}</label>;
for (var i=1; i<arrayComment.length; i++) {
str_res = <label>{str_res}{Common.Utils.String.htmlEncode(message.substring(arrayComment[i-1].end, arrayComment[i].start))}{arrayComment[i].str}</label>;

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

@ -162,8 +162,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

@ -207,6 +207,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;