Web: Editor: Added goBack button to the files.

This commit is contained in:
TatianaLopaeva 2021-03-28 17:49:51 +03:00
parent 7fba6003a2
commit 40218e944e
3 changed files with 18 additions and 0 deletions

View File

@ -1,4 +1,6 @@
{ {
"FileLocation": "Open file location",
"FullAccess": "Full access", "FullAccess": "Full access",
"ReadOnly": "Read only", "ReadOnly": "Read only",
"Review": "Review", "Review": "Review",

View File

@ -1,4 +1,6 @@
{ {
"FileLocation": "Открыть расположение файла",
"FullAccess": "Полный доступ", "FullAccess": "Полный доступ",
"ReadOnly": "Только чтение", "ReadOnly": "Только чтение",
"Review": "Рецензирование", "Review": "Рецензирование",

View File

@ -22,6 +22,7 @@ import { getUser } from "@appserver/common/api/people";
import throttle from "lodash/throttle"; import throttle from "lodash/throttle";
import { isIOS, deviceType } from "react-device-detect"; import { isIOS, deviceType } from "react-device-detect";
import { homepage } from "../package.json"; import { homepage } from "../package.json";
import "./custom.scss"; import "./custom.scss";
import { AppServerConfig } from "@appserver/common/constants"; import { AppServerConfig } from "@appserver/common/constants";
import SharingPanel from "files/SharingPanel"; import SharingPanel from "files/SharingPanel";
@ -44,6 +45,9 @@ let config;
let docSaved = null; let docSaved = null;
let docEditor; let docEditor;
const url = window.location.href;
const filesUrl = url.substring(0, url.indexOf("/doceditor"));
const Editor = ({ const Editor = ({
uploadPanelVisible, uploadPanelVisible,
sharingPanelVisible, sharingPanelVisible,
@ -275,6 +279,16 @@ const Editor = ({
config.type = "mobile"; config.type = "mobile";
} }
config.editorConfig.customization = {
...config.editorConfig.customization,
goback: {
blank: true,
requestClose: false,
text: i18n.t("FileLocation"),
url: `${filesUrl}`,
},
};
const events = { const events = {
events: { events: {
onAppReady: onSDKAppReady, onAppReady: onSDKAppReady,