From de71c6a1c6af3db78cb2f78e190b14f0fc980ba0 Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Mon, 14 Mar 2022 15:41:35 +0300 Subject: [PATCH] Web: Doceditor: fixed initialtab title --- web/ASC.Web.Editor/src/Editor.js | 6 +----- web/ASC.Web.Editor/src/index.js | 3 --- web/ASC.Web.Editor/src/server/template.js | 3 ++- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/web/ASC.Web.Editor/src/Editor.js b/web/ASC.Web.Editor/src/Editor.js index e43a4e3734..f07d1c2f7b 100644 --- a/web/ASC.Web.Editor/src/Editor.js +++ b/web/ASC.Web.Editor/src/Editor.js @@ -419,7 +419,6 @@ export default function Editor({ } else { title = organizationName; } - console.log("setDocumentTitle", title); document.title = title; setNewDocumentTitle(title); }; //+++ @@ -613,10 +612,7 @@ export default function Editor({ }; const SharingDialog = renderSharing(); - /* - {documentTitle} - - */ + return ( {needLoader ? ( diff --git a/web/ASC.Web.Editor/src/index.js b/web/ASC.Web.Editor/src/index.js index 7a1f0ec1a0..cb9233e394 100644 --- a/web/ASC.Web.Editor/src/index.js +++ b/web/ASC.Web.Editor/src/index.js @@ -5,9 +5,7 @@ import render from "./server/render"; import i18nextMiddleware from "i18next-express-middleware"; import i18next from "i18next"; import Backend from "i18next-node-fs-backend"; -import pkg from "../package.json"; -const { title } = pkg; const app = express(); const port = process.env.PORT || 5013; @@ -60,7 +58,6 @@ app.get("/products/files/doceditor", async (req, res) => { }); const response = template( - title, props, content, styleTags, diff --git a/web/ASC.Web.Editor/src/server/template.js b/web/ASC.Web.Editor/src/server/template.js index 7235f6ab23..162fbf2955 100644 --- a/web/ASC.Web.Editor/src/server/template.js +++ b/web/ASC.Web.Editor/src/server/template.js @@ -1,7 +1,7 @@ import { getFavicon } from "../helpers/utils"; +import pkg from "../../package.json"; export default function template( - title, initialState = {}, content = "", styleTags, @@ -9,6 +9,7 @@ export default function template( initialI18nStore, initialLanguage ) { + const { title } = pkg; const { docApiUrl } = initialState; const faviconHref = getFavicon(initialState?.config?.documentType);