Web: People: added tooltip icon with translations to profile

This commit is contained in:
Nikita Gopienko 2019-10-11 11:57:22 +03:00
parent 48cf8430b1
commit a9c1b5411b
4 changed files with 30 additions and 2 deletions

View File

@ -13,7 +13,8 @@ import {
Link,
toastr,
ModalDialog,
ComboBox
ComboBox,
Tooltip
} from "asc-web-components";
import { connect } from "react-redux";
import styled from 'styled-components';
@ -79,6 +80,8 @@ const InfoItemLabel = styled.div`
const InfoItemValue = styled.div`
width: 240px;
display: flex;
box-sizing: border-box;
.language-combo {
padding-top: 4px;
@ -89,6 +92,10 @@ const InfoItemValue = styled.div`
}
`;
const TooltipIcon = styled.div`
padding-top: 6px;
`;
const IconButtonWrapper = styled.div`
${props => props.isBefore
? `margin-right: 8px;`
@ -402,7 +409,25 @@ class ProfileInfo extends React.PureComponent {
size='content'
className='language-combo'
/>
<TooltipIcon
data-for="tooltipLanguageId"
data-tip={t("NotFoundLanguage", {userMail: "documentation@onlyoffice.com"})}
data-event="click"
//data-offset="{'right': 90}"
>
<IconButton isClickable={true} size={13} iconName="QuestionIcon" />
</TooltipIcon>
</InfoItemValue>
<Tooltip
id="tooltipLanguageId"
getContent={(dataTip) => <Text.Body fontSize={13}>{dataTip}</Text.Body>}
effect="solid"
offsetRight={100}
place="top"
maxWidth={340}
/>
</InfoItem>
}
<ModalDialog

View File

@ -22,6 +22,7 @@
"EditButton": "Edit",
"Actions": "Actions",
"ChangeEmailSuccess": "Mail has been successfully changed",
"NotFoundLanguage": "In case you cannot find your language in the list of the available ones, feel free to write to us at {{userMail}} to take part in the translation and get up to 1 year free of charge.",
"PhoneChange": "Change phone",
"PhoneLbl": "Phone",

View File

@ -22,6 +22,7 @@
"EditButton": "Редактировать",
"Actions": "Actions",
"ChangeEmailSuccess": "Mail has been successfully changed",
"NotFoundLanguage": "Если Вы не можете найти свой язык в списке доступных, Вы всегда можете написать нам по адресу {{userMail}}, чтобы принять участие в переводе и получить до 1 года бесплатного использования. Подробнее...",
"PhoneChange": "Измененить номер телефона",
"PhoneLbl": "Основной телефон",

View File

@ -51,7 +51,8 @@
"DeleteSelfProfile",
"EditButton",
"ChangeEmailSuccess",
"Actions"
"Actions",
"NotFoundLanguage"
]
},
"ProfileAction": {