Merge branch 'release/v1.2' of https://github.com/ONLYOFFICE/AppServer into release/v1.2

This commit is contained in:
Alexey Safronov 2022-05-13 19:33:23 +03:00
commit d12c6f89e4
18 changed files with 193 additions and 13 deletions

View File

@ -347,3 +347,17 @@ export function getFolderOptions(folderId, filter) {
export function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
export function isElementInViewport(el) {
if (!el) return;
const rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <=
(window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}

View File

@ -5,7 +5,7 @@
"WhoHasAccess": "Who has access",
"Members": "members",
"OpenSharingSettings": "Open sharing settings",
"OFORMsDescription": "Fill out the form online and get a simple Design Project Proposal ready, or just download the fillable template in the desirable format: DOCXF, OFORM, or PDF. <1> Propose a project or a series of projects to an freelance designer team. Outline project and task structure, payments, and terms.</1>",
"OFORMsDescription": "Fill out the form online and get a simple Design Project Proposal ready, or just download the fillable template in the desirable format: DOCXF, OFORM, or PDF. <1>Propose a project or a series of projects to an freelance designer team. Outline project and task structure, payments, and terms.</1>",
"FileExtension": "File extension",
"LastModifiedBy": "Last modified by",
"Versions": "Versions"

View File

@ -0,0 +1,7 @@
{
"GalleryEmptyScreenHeader": "Failed to load form templates",
"GalleryEmptyScreenDescription": "Select any form template to see the details",
"EmptyScreenDescription": "Please check your Internet connection and refresh the page or try later",
"TemplateInfo": "Template info",
"FormTemplateInfo": "Form template info"
}

View File

@ -0,0 +1,45 @@
{
"Hotkeys": "Atajos de teclado",
"HotkeysOr": "o",
"HotkeysSelection": "Seleccionando elementos",
"HotkeysSelectItem": "Seleccionar o deseleccionar elemento",
"HotkeysSelectDown": "Seleccionar el siguiente elemento hacia abajo",
"HotkeysSelectUp": "Seleccionar el siguiente elemento hacia arriba",
"HotkeysSelectRight": "Seleccionar el siguiente elemento hacia la derecha",
"HotkeysSelectLeft": "Seleccionar el siguiente elemento hacia la izquierda",
"HotkeysExtendSelectionDown": "Ampliar la selección hacia abajo",
"HotkeysExtendSelectionUp": "Ampliar la selección hacia arriba",
"HotkeysExtendSelectionRight": "Ampliar la selección hacia la derecha",
"HotkeysExtendSelectionLeft": "Ampliar la selección hacia la izquierda",
"HotkeysSelectAll": "Seleccionar todas las carpetas y archivos visibles",
"HotkeysClearAll": "Borrar todas las selecciones",
"HotkeysMove": "Mover entre elementos",
"HotkeysMoveDown": "Mover hacia abajo sin cambiar la selección",
"HotkeysMoveUp": "Mover hacia arriba sin cambiar la selección",
"HotkeysMoveRight": "Mover hacia la derecha sin cambiar la selección",
"HotkeysMoveLeft": "Mover hacia la izquierda sin cambiar la selección",
"HotkeysActions": "Tomando medidas sobre los elementos seleccionados",
"HotkeysOpen": "Abrir el elemento seleccionado/Confirmar la acción",
"HotkeysRemove": "Eliminar los elementos seleccionados",
"HotkeysUndoLastAction": "Deshacer la última acción",
"HotkeysRedoLastUndoneAction": "Rehacer la acción previamente deshecha",
"HotkeysEnterKey": "Introducir",
"HotkeysApplicationActions": "Acciones de aplicación",
"HotkeysShortcuts": "Mostrar la lista de atajos de teclado",
"HotkeysActionsInPreview": "Otras acciones",
"HotkeysSpaceKey": "Espacio",
"HotkeysClose": "Cerrar/deshacer la acción",
"HotkeysPlayPause": "Reproducir/Pausar",
"HotkeysNavigation": "Navegación",
"HotkeysGoToParentFolder": "Saltar a la carpeta un nivel arriba",
"HotkeysChangeView": "Cambiar entre la vista de cuadrícula y la de lista",
"HotkeysCreatingObjects": "Creando elementos",
"HotkeysCreateDocument": "Crear documento",
"HotkeysCreateSpreadsheet": "Crear hoja de cálculo",
"HotkeysCreatePresentation": "Crear presentación",
"HotkeysCreateForm": "Crear plantilla de formulario en blanco",
"HotkeysCreateFormFromFile": "Crear plantilla de formulario desde archivo",
"HotkeysCreateFolder": "Crear carpeta",
"HotkeysUploadingObjects": "Cargando elementos",
"HotkeysUploadFile": "Cargar archivo"
}

View File

@ -0,0 +1,12 @@
{
"ViewDetails": "Ver detalles",
"ItemsSelected": "Elementos seleccionados",
"SystemProperties": "Propiedades del sistema",
"WhoHasAccess": "Quién tiene acceso",
"Members": "miembros",
"OpenSharingSettings": "Abrir los ajustes de uso compartido",
"OFORMsDescription": "Rellene el formulario en línea y obtenga una sencilla propuesta de proyecto de diseño, o descárguese la plantilla rellenable en el formato deseado: DOCXF, OFORM o PDF. <1>Proponga un proyecto o una serie de proyectos a un equipo de diseñadores autónomos. Describa la estructura del proyecto y de las tareas, los pagos y las condiciones.</1>",
"FileExtension": "Extensión de archivo",
"LastModifiedBy": "Ultima modificación por",
"Versions": "Versiones"
}

View File

@ -5,6 +5,7 @@
"WhoHasAccess": "У кого есть доступ",
"Members": "участников",
"OpenSharingSettings": "Открыть настройки общего доступа",
"OFORMsDescription": "Заполните форму онлайн и получите простое проектное предложение или скачайте заполняемый шаблон в нужном формате: DOCXF, OFORM или PDF. <1>Предложите проект или серию проектов команде внештатных разработчиков. Опишите проект и структуру задачи, способы оплаты и условия.</1>",
"FileExtension": "Расширение файла",
"LastModifiedBy": "Автор последнего корректива",
"Versions": "Версии"

View File

@ -16,6 +16,8 @@
"EncryptedFileSaving": "Сохранение зашифрованного файла",
"Files": "Файлы",
"FileProtected": "Файл защищен с помощью пароля",
"FileLocked": "Заблокирован файл",
"FileUnlocked": "Разблокирован файл",
"Folders": "Папки",
"FolderSelection": "Выбор папки",
"FolderTitleBoxNet": "Каталог Box",

View File

@ -197,6 +197,7 @@ export default function withContent(WrappedContent) {
fileCopyAs,
fromTemplate,
gallerySelected,
setCreatedFolderId,
} = this.props;
const { itemTitle } = this.state;
const { parentId, fileExst } = item;
@ -239,6 +240,7 @@ export default function withContent(WrappedContent) {
.then((folder) => {
createdFolderId = folder.id;
addActiveItems(null, [folder.id]);
setCreatedFolderId(createdFolderId);
})
.then(() => this.completeAction(itemId))
.catch((e) => toastr.error(e))
@ -499,6 +501,7 @@ export default function withContent(WrappedContent) {
passwordEntryProcess,
addActiveItems,
gallerySelected,
setCreatedFolderId,
} = filesStore;
const { clearActiveOperations, fileCopyAs } = uploadDataStore;
const { isRecycleBinFolder, isPrivacyFolder } = treeFoldersStore;
@ -563,6 +566,7 @@ export default function withContent(WrappedContent) {
titleWithoutExt,
fromTemplate,
gallerySelected,
setCreatedFolderId,
};
}
)(observer(WithContent));

View File

@ -1,7 +1,7 @@
import React, { useEffect } from "react";
import { withRouter } from "react-router";
import { withTranslation } from "react-i18next";
import { isMobile } from "react-device-detect";
import { isMobile, isMobileOnly } from "react-device-detect";
import { observer, inject } from "mobx-react";
import FilesRowContainer from "./RowsView/FilesRowContainer";
@ -11,6 +11,7 @@ import withLoader from "../../../../HOCs/withLoader";
import TableView from "./TableView/TableContainer";
import withHotkeys from "../../../../HOCs/withHotkeys";
import { Consumer } from "@appserver/components/utils/context";
import { isElementInViewport } from "@appserver/common/utils";
let currentDroppable = null;
let isDragActive = false;
@ -36,6 +37,9 @@ const SectionBodyContent = (props) => {
tooltipPageY,
setHotkeyCaretStart,
setHotkeyCaret,
scrollToFolderId,
setScrollToFolderId,
filesList,
} = props;
useEffect(() => {
@ -66,6 +70,32 @@ const SectionBodyContent = (props) => {
};
}, [onMouseUp, onMouseMove, startDrag, folderId, viewAs]);
useEffect(() => {
if (scrollToFolderId) {
const newFolder = document.querySelector(
`div[value='folder_${scrollToFolderId}_draggable']`
);
let isInViewport = isElementInViewport(newFolder);
if (!isInViewport || viewAs === "table") {
const bodyScroll = isMobileOnly
? document.querySelector("#customScrollBar > div")
: document.querySelector(".section-scroll");
const rectNewFolder = newFolder.getBoundingClientRect();
const count =
viewAs === "table"
? filesList.findIndex((elem) => elem.id === scrollToFolderId) * 40
: rectNewFolder.bottom - window.innerHeight + 300;
bodyScroll.scrollTo(0, count);
} else {
setScrollToFolderId(null);
}
}
}, [scrollToFolderId]);
const onMouseDown = (e) => {
if (
(e.target.closest(".scroll-body") &&
@ -247,6 +277,9 @@ export default inject(
setBufferSelection,
setHotkeyCaretStart,
setHotkeyCaret,
scrollToFolderId,
setScrollToFolderId,
filesList,
} = filesStore;
return {
@ -267,6 +300,9 @@ export default inject(
tooltipPageY,
setHotkeyCaretStart,
setHotkeyCaret,
scrollToFolderId,
setScrollToFolderId,
filesList,
};
}
)(

View File

@ -67,6 +67,9 @@ class FilesStore {
oformFiles = null;
gallerySelected = null;
createdFolderId = null;
scrollToFolderId = null;
constructor(
authStore,
settingsStore,
@ -613,7 +616,21 @@ class FilesStore {
const selectedFolder = {
selectedFolder: { ...this.selectedFolderStore },
};
this.viewAs === "tile" && this.createThumbnails();
if (this.createdFolderId) {
const newFolder = this.filesList.find(
(item) => item.id === this.createdFolderId
);
if (newFolder) {
this.setSelection([newFolder]);
this.setScrollToFolderId(newFolder.id);
}
this.setCreatedFolderId(null);
}
return Promise.resolve(selectedFolder);
})
.catch((err) => {
@ -2003,6 +2020,14 @@ class FilesStore {
setEnabledHotkeys = (enabledHotkeys) => {
this.enabledHotkeys = enabledHotkeys;
};
setCreatedFolderId = (createdFolderId) => {
this.createdFolderId = createdFolderId;
};
setScrollToFolderId = (folderId) => {
this.scrollToFolderId = folderId;
};
}
export default FilesStore;

View File

@ -1,5 +1,5 @@
{
"ChangeEmailSuccess": "Email has been changed successfully ",
"ChangeEmailSuccess": "Email has been changed successfully",
"ChangesApplied": "Changes are applied",
"ContactInformation": "Contact Information",
"CountCodesRemaining": "codes remaining",

View File

@ -18,6 +18,8 @@
"ProviderSuccessfullyDisconnected": "Провайдер успешно отключен",
"ShowBackupCodes": "Показать резервные коды",
"Subscriptions": "Подписки",
"SubscriptionEmailTipsToggleLbl": "Оповещения по электронной почте с полезными советами",
"SubscriptionTurnOffToast": "Вы успешно отписались от почтовой рассылки. <1>Подписаться снова</1>",
"SystemTheme": "Использовать тему системы",
"TfaLoginSettings": "Настройки входа",
"TwoFactorDescription": "Двухфакторная аутентификация с помощью приложения для генерации кодов включена администратором для всех пользователей."

View File

@ -37,6 +37,11 @@ class ContactField extends React.Component {
removeButtonOnChange,
} = this.props;
const setDropDownMaxHeight =
comboBoxOptions && comboBoxOptions.length > 6
? { dropDownMaxHeight: 200 }
: {};
return (
<Container>
<ComboBox
@ -48,7 +53,8 @@ class ContactField extends React.Component {
scaled={true}
directionY="both"
className="field-select"
scaledOptions={true}
scaledOptions={comboBoxOptions.length < 7}
{...setDropDownMaxHeight}
/>
<TextInput
name={inputName}

View File

@ -88,6 +88,8 @@ class ContactsField extends React.Component {
const prefix = "null_";
const options = getOptions(pattern, prefix);
const setDropDownMaxHeight =
options && options.length > 6 ? { dropDownMaxHeight: 200 } : {};
return (
<Container>
@ -95,7 +97,7 @@ class ContactsField extends React.Component {
<ComboBox
options={options}
onSelect={onItemAdd}
scaledOptions={true}
scaledOptions={options.length < 6}
selectedOption={{
key: prefix,
label: addItemText,
@ -106,6 +108,7 @@ class ContactsField extends React.Component {
scaled={true}
className="field-select"
directionY="both"
{...setDropDownMaxHeight}
/>
</Container>
);

View File

@ -83,7 +83,7 @@
"ManagementCategoryDataManagement": "Data Management",
"ManualBackup": "Manual backup",
"ManualBackupDescription": "Use this option if you want to get all data contained on the portal as a file.",
"ManualBackupHelp": "<strong>Data Backup</strong> option is used to back up the portal data to be able to restore it later to your local server. ",
"ManualBackupHelp": "<strong>Data Backup</strong> option is used to back up the portal data to be able to restore it later to your local server.",
"ManualBackupHelpNote": "Select the storage for the data (do not forget to enter your third-party storage details to be able to access it).<br/><strong>Note:</strong> you need to connect your third-party account (DropBox, Box.com, OneDrive or Google Drive) to {{organizationName}} Common folder before you will be able to save your backup there.",
"MaxCopies": "{{copiesCount}} - maximum number of backup copies",
"Migration": "Migration",
@ -94,7 +94,7 @@
"PasswordMinLenght": "Minimal password length",
"Path": "Path",
"PleaseNote": "Please note",
"PleaseNoteDescription": " <0>{{pleaseNote}}</0>: your old portal address will become available to new ©linney users once you click the <2>{{save}}</2> button.",
"PleaseNoteDescription": "<0>{{pleaseNote}}</0>: your old portal address will become available to new ©linney users once you click the <2>{{save}}</2> button.",
"PeopleAdministratorsCan": "People module admins can create profiles and groups, import people, and invite users.",
"PortalAccess": "Portal access",
"PortalAccessSubTitle": "This section allows you to provide users with safe and convenient ways to access the portal.",
@ -115,7 +115,7 @@
"RestoreBackupDescription": "Use this option to restore your portal from the previously saved backup file.",
"RestoreBackupWarningText": "The portal will become unavailable during the restore process. After the restore is complete all the changes made after the date of the selected restore point will be lost.",
"RestoreBackupResetInfoWarningText": "All current passwords will be reset. Portal users will get an email with the access restoration link.",
"RestoreBackupHelp": "<strong>Data Restore</strong> option is used to restore your previously saved portal data (from a local server or SaaS portal). ",
"RestoreBackupHelp": "<strong>Data Restore</strong> option is used to restore your previously saved portal data (from a local server or SaaS portal).",
"RestoreBackupHelpNote": "Select the storage where the data is saved, enter necessary details and check the <strong>Send notification to portal users</strong> to alert your portal users about the backup/restore operations.",
"RestoreDefaultButton": "Restore to Default",
"RecoveryFileNotSelected": "Recovery error. Recovery file not selected",
@ -151,8 +151,8 @@
"TrustedMailDescription": "Trusted Mail Domain Settings is a way to specify the mail servers used for user self-registration.",
"TrustedMailHelper": "You can either check the Custom domains option and enter the trusted mail server in the field below so that a person who has an account at it will be able to register him(her)self by clicking the Join link on the Sign In page or disable this option.",
"TwoFactorAuth": "Two-factor authentication",
"TwoFactorAuthDescription": "Two-factor authentication provides a more secure way to log in. After entering the credentials, the user will have to enter a code from an SMS or the authentication app. ",
"TwoFactorAuthHelper": "Note: SMS messages can be sent if you have a positive balance only. You can always check your current balance in your SMS provider account. Do not forget to replenish your balance in good time. ",
"TwoFactorAuthDescription": "Two-factor authentication provides a more secure way to log in. After entering the credentials, the user will have to enter a code from an SMS or the authentication app.",
"TwoFactorAuthHelper": "Note: SMS messages can be sent if you have a positive balance only. You can always check your current balance in your SMS provider account. Do not forget to replenish your balance in good time.",
"UseAsLogoButton": "Use as logo",
"UseDigits": "Use digits",
"Users": "Users",

View File

@ -0,0 +1,4 @@
{
"ErrorInvalidHeader": "Correo electrónico incorrecto o enlace expirado",
"ErrorInvalidText": "Dentro de 10 segundos se le redirigirá a la página de <1>inicio de sesión</1>"
}

View File

@ -0,0 +1,5 @@
{
"PreparationPortalTitle": "Restauración de portal está en progreso",
"PreparationPortalDescription": "Una vez terminado el proceso de restauración, usted será redirigido a su portal.",
"PortalRestoring": "Restauración de portal"
}

View File

@ -56,6 +56,8 @@
"EmptyBackupList": "Еще не было создано ни одной резервной копии. Создайте хотя бы одну резервную копию, чтобы она появилась в этом списке.",
"EnableAutomaticBackup": "Давать возможность автоматически копировать данные",
"EnableAutomaticBackupDescription": "Используйте эту опцию для выполнения резервного копирования данных портала.",
"EnterName": "Введите имя",
"EnterTitle": "Укажите название",
"EveryDay": "Каждый день",
"EveryMonth": "Каждый месяц",
"EveryWeek": "Каждую неделю",
@ -70,7 +72,7 @@
"LanguageTimeSettingsTooltip": "<0>{{text}}</0> позволяют изменить язык всего портала для всех пользователей и настроить часовой пояс, чтобы все события на портале ONLYOFFICE отображались с корректной датой и временем.",
"LanguageTimeSettingsTooltipDescription": "Чтобы применить их, используйте кнопку <1>{{save}}</1> внизу раздела.<3>{{learnMore}}</3>",
"LocalFile": "Локальный файл",
"LogoDark": "Логотип для страницы \"О программе\" и страницы входа ",
"LogoDark": "Логотип для страницы \"О программе\" и страницы входа",
"LogoDocsEditor": "Логотип для шапки редакторов",
"LogoFavicon": "Иконка сайта",
"LogoLightSmall": "Логотип для шапки портала",
@ -91,19 +93,30 @@
"NotFoundTitle": "Ничего не найдено",
"PasswordMinLenght": "Минимальная длина пароля",
"Path": "Путь",
"PleaseNote": "Пожалуйста, обратите внимание",
"PleaseNoteDescription": "<0>{{pleaseNote}}</0>: ваш старый адрес портала станет доступен для новых пользователей ©linney, как только вы нажмете кнопку <2>{{Сохранить}}</2>.",
"PeopleAdministratorsCan": "Администраторы модуля Люди могут создавать профили и группы, импортировать людей и приглашать пользователей.",
"PortalAccess": "Доступ к порталу",
"PortalAccessSubTitle": "Данный раздел позволяет предоставить пользователям безопасные и удобные способы доступа к порталу.",
"PortalAdmins": "Администраторы портала",
"PortalAdminsDescription": "Имеет те же права доступа, что и владелец портала, за исключением права: менять владельца портала; деактивировать или удалить портал.",
"PortalNameEmpty": "Поле имя аккаунта не заполнено",
"PortalNameIncorrect": "Неверное имя портала",
"PortalNameLength": "Имя учетной записи должно быть от 6 до 50 символов",
"PortalOwner": "Владелец портала",
"PortalRenaming": "Изменение имени портала",
"PortalRenamingDescription": "Здесь вы можете изменить адрес портала.",
"PortalRenamingDescriptionTooltip": "Введите часть адреса портала, которая идет перед onlyoffice.com/onlyoffice.eu.",
"PortalRenamingLabelText": "Новое имя портала",
"PortalRenamingMobile": "Введите часть адреса портала, которая идет перед onlyoffice.com/onlyoffice.eu. Обратите внимание: ваш старый адрес портала станет доступен для новых пользователей ©linney, как только вы нажмете кнопку Сохранить",
"PortalRenamingSettingsTooltip": "<0>{{text}}</0> Введите часть адреса портала, которая идет перед onlyoffice.com/onlyoffice.eu.",
"ProductUserOpportunities": "Просматривать профили и группы",
"RegistrationDate": "Дата регистрации",
"RestoreBackup": "Восстановление данных",
"RestoreBackupDescription": "Используйте эту опцию, чтобы восстановить портал из ранее сохраненного резервного файла.",
"RestoreBackupWarningText": "Во время восстановления портал будет недоступен. После восстановления будут утеряны все изменения, совершенные после даты выбранной точки восстановления.",
"RestoreBackupResetInfoWarningText": "Все текущие пароли будут сброшены. Пользователи портала получат письмо со ссылкой для восстановления доступа.",
"RestoreBackupHelp": "Опция <strong>Восстановление данных</strong> используется для восстановления предварительно сохраненных данных портала (с локального сервера или SaaS-портала). ",
"RestoreBackupHelp": "Опция <strong>Восстановление данных</strong> используется для восстановления предварительно сохраненных данных портала (с локального сервера или SaaS-портала).",
"RestoreBackupHelpNote": "Выберите хранилище, в котором находятся данные, укажите нужные сведения и отметьте опцию. <br/><strong>Оповестить пользователей портала</strong>, чтобы предупредить пользователей о проведении резервного копирования/восстановления.",
"RestoreDefaultButton": "Настройки по умолчанию",
"RecoveryFileNotSelected": "Ошибка восстановления. Файл восстановления не выбран",
@ -116,6 +129,7 @@
"SelectFileInGZFormat": "Выбрать файл в формате .GZ",
"StudioTimeLanguageSettings": "Настройки языка и часового пояса",
"SuccessfullySaveGreetingSettingsMessage": "Настройки страницы приветствия успешно сохранены",
"SuccessfullySavePortalNameMessage": "Портал успешно переименован",
"SuccessfullySaveSettingsMessage": "Настройки успешно обновлены",
"TeamTemplate": "Шаблон команды",
"TeamTemplateSettingsDescription": "Шаблон команды - это настраиваемый способ задать названия для организации (или группы), ее участников и их действий. Разверните список 'Шаблон', чтобы выбрать одну из доступных предустановок или введите собственные наименования, выбрав из списка опцию 'Пользовательский'.",
@ -139,7 +153,7 @@
"TrustedMailHelper": "Можно отметить опцию Пользовательские домены и ввести доверенный почтовый сервер в поле ниже, чтобы любой сотрудник вашей компании, имеющий учетную запись на указанном почтовом сервере, смог зарегистрироваться самостоятельно, нажав ссылку Присоединиться на странице входа и введя адрес электронной почты с именем доверенного домена, который Вы добавили.",
"TwoFactorAuth": "Двухфакторная аутентификация",
"TwoFactorAuthDescription": "Двухфакторная аутентификация обеспечивает более безопасный способ входа на портал. После ввода учетных данных пользователь должен будет ввести код из SMS или приложения для аутентификации.",
"TwoFactorAuthHelper": "Обратите внимание: отправка SMS-сообщений осуществляется только при положительном балансе. Вы всегда можете проверить текущий баланс в учетной записи вашего SMS-провайдера. Не забывайте своевременно пополнять баланс. ",
"TwoFactorAuthHelper": "Обратите внимание: отправка SMS-сообщений осуществляется только при положительном балансе. Вы всегда можете проверить текущий баланс в учетной записи вашего SMS-провайдера. Не забывайте своевременно пополнять баланс.",
"UseAsLogoButton": "Использовать как логотип",
"UseDigits": "Использовать цифры",
"Users": "Пользователи",