From c4163231a28afd278c25cb6d3ff0bd3c2f3bd188 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 28 Jul 2021 14:20:15 +0300 Subject: [PATCH] Web: Files: moved links in constant --- .../Article/Body/DownloadAppList.js | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/products/ASC.Files/Client/src/components/Article/Body/DownloadAppList.js b/products/ASC.Files/Client/src/components/Article/Body/DownloadAppList.js index 0e118d20b2..72a9bf2be0 100644 --- a/products/ASC.Files/Client/src/components/Article/Body/DownloadAppList.js +++ b/products/ASC.Files/Client/src/components/Article/Body/DownloadAppList.js @@ -26,6 +26,13 @@ const StyledRectangleLoader = styled(Loaders.Rectangle)` `; const DownloadAppListContainer = ({ t }) => { + const windowsLink = + "https://www.onlyoffice.com/download-desktop.aspx#windows"; + const macLink = "https://www.onlyoffice.com/download-desktop.aspx#mac"; + const linuxLink = "https://www.onlyoffice.com/download-desktop.aspx#linux"; + const androidLink = "https://www.onlyoffice.com/office-for-android.aspx"; + const iosLink = "https://www.onlyoffice.com/office-for-ios.aspx"; + return ( @@ -33,11 +40,7 @@ const DownloadAppListContainer = ({ t }) => {
- window.open( - "https://www.onlyoffice.com/download-desktop.aspx#windows" - ) - } + onClick={() => window.open(windowsLink)} className="icon-button" iconName="/static/images/windows.react.svg" size="25" @@ -46,9 +49,7 @@ const DownloadAppListContainer = ({ t }) => { hoverColor="#3785D3" /> - window.open("https://www.onlyoffice.com/download-desktop.aspx#mac") - } + onClick={() => window.open(macLink)} className="icon-button" iconName="/static/images/macOS.react.svg" size="25" @@ -57,11 +58,7 @@ const DownloadAppListContainer = ({ t }) => { hoverColor="#000000" /> - window.open( - "https://www.onlyoffice.com/download-desktop.aspx#linux" - ) - } + onClick={() => window.open(linuxLink)} className="icon-button" iconName="/static/images/linux.react.svg" size="25" @@ -70,9 +67,7 @@ const DownloadAppListContainer = ({ t }) => { hoverColor="#FFB800" /> - window.open("https://www.onlyoffice.com/office-for-android.aspx") - } + onClick={() => window.open(androidLink)} className="icon-button" iconName="/static/images/android.react.svg" size="25" @@ -81,9 +76,7 @@ const DownloadAppListContainer = ({ t }) => { hoverColor="#9BD71C" /> - window.open("https://www.onlyoffice.com/office-for-ios.aspx") - } + onClick={() => window.open(iosLink)} className="icon-button" iconName="/static/images/iOS.react.svg" size="25"