diff --git a/products/ASC.Files/Client/src/components/Article/MainButton/index.js b/products/ASC.Files/Client/src/components/Article/MainButton/index.js index 9fe0110fe4..09d9ed5388 100644 --- a/products/ASC.Files/Client/src/components/Article/MainButton/index.js +++ b/products/ASC.Files/Client/src/components/Article/MainButton/index.js @@ -124,71 +124,40 @@ const ArticleMainButtonContent = (props) => { ] : []; - const formActions = - !isMobile && !isTablet - ? [ - { - className: "main-button_drop-down", - icon: "images/form.react.svg", - label: t("Translations:NewForm"), - key: "new-form", - items: [ - { - className: "main-button_drop-down_sub", - icon: "images/form.react.svg", - label: t("Translations:SubNewForm"), - onClick: onCreate, - action: "docxf", - key: "docxf", - }, - { - className: "main-button_drop-down_sub", - icon: "images/form.file.react.svg", - label: t("Translations:SubNewFormFile"), - onClick: onShowSelectFileDialog, - disabled: isPrivacy, - key: "form-file", - }, - { - className: "main-button_drop-down_sub", - icon: "images/form.react.svg", - label: t("Common:OFORMsGallery"), - onClick: onShowGallery, - disabled: isPrivacy, - key: "form-gallery", - }, - ], - }, - ] - : [ - { - className: "main-button_drop-down_sub", - icon: "images/form.react.svg", - label: t("Translations:NewForm"), - onClick: onCreate, - action: "docxf", - key: "docxf", - }, - { - className: "main-button_drop-down_sub", - icon: "images/form.file.react.svg", - label: t("Translations:NewFormFile"), - onClick: onShowSelectFileDialog, - disabled: isPrivacy, - key: "form-file", - }, - ]; - - if (isMobile || isTablet) { - formActions.push({ - className: "main-button_drop-down_sub", + const formActions = [ + { + className: "main-button_drop-down", icon: "images/form.react.svg", - label: t("Common:OFORMsGallery"), - onClick: onShowGallery, - disabled: isPrivacy, - key: "form-gallery", - }); - } + label: t("Translations:NewForm"), + key: "new-form", + items: [ + { + className: "main-button_drop-down_sub", + icon: !isMobile && "images/form.react.svg", + label: t("Translations:SubNewForm"), + onClick: onCreate, + action: "docxf", + key: "docxf", + }, + { + className: "main-button_drop-down_sub", + icon: !isMobile && "images/form.file.react.svg", + label: t("Translations:SubNewFormFile"), + onClick: onShowSelectFileDialog, + disabled: isPrivacy, + key: "form-file", + }, + { + className: "main-button_drop-down_sub", + icon: !isMobile && "images/form.react.svg", + label: t("Common:OFORMsGallery"), + onClick: onShowGallery, + disabled: isPrivacy, + key: "form-gallery", + }, + ], + }, + ]; const actions = [ {