Web: Client: Mobile. fix style invitation language

This commit is contained in:
Elyor Djalilov 2023-10-20 13:49:21 +05:00
parent 6963668b08
commit 9105e848c6
4 changed files with 69 additions and 17 deletions

View File

@ -376,6 +376,17 @@ const StyledLink = styled(Link)`
theme.interfaceDirection === "rtl" ? `left` : `right`}; theme.interfaceDirection === "rtl" ? `left` : `right`};
`; `;
const ResetLink = styled(Link)`
float: ${({ theme }) =>
theme.interfaceDirection === "rtl" ? `right` : `left`};
padding: 0 16px;
margin-bottom: 16px;
font-size: 13px;
color: ${(props) => props.theme.createEditRoomDialog.commonParam.textColor};
font-style: normal;
line-height: 15px;
`;
StyledButtons.defaultProps = { theme: Base }; StyledButtons.defaultProps = { theme: Base };
const StyledToggleButton = styled(ToggleButton)` const StyledToggleButton = styled(ToggleButton)`
@ -416,27 +427,46 @@ const StyledInviteLanguage = styled.div`
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: start; justify-content: start;
gap: 4px;
height: 28px; height: 28px;
color: ${(props) => color: ${(props) =>
props.theme.createEditRoomDialog.commonParam.descriptionColor}; props.theme.createEditRoomDialog.commonParam.descriptionColor};
margin-bottom: 16px; margin-bottom: 4px;
font-size: 13px; font-size: 13px;
font-style: normal; font-style: normal;
font-weight: 600; font-weight: 600;
line-height: 20px; line-height: 20px;
.link-list { .list-link {
font-size: 13px; margin-left: 4px;
color: var(--light-gray-dark); color: ${(props) => props.theme.createEditRoomDialog.commonParam.textColor};
font-style: normal; }
font-weight: 600; @media ${mobile} {
line-height: 15px; justify-content: space-between;
}
.invitation-language {
margin-right: 4px;
color: ${(props) =>
props.theme.createEditRoomDialog.commonParam.descriptionColor};
@media ${mobile} {
margin-right: 0;
}
} }
.language-combo-box { .language-combo-box {
.combo-button { .combo-button {
padding-left: 6px; padding-left: 6px;
padding-right: 0px; padding-right: 0px;
} }
.combo-button-label {
color: ${(props) =>
props.theme.createEditRoomDialog.commonParam.descriptionColor};
}
.combo-buttons_arrow-icon {
svg {
path {
fill: ${(props) =>
props.theme.createEditRoomDialog.commonParam.descriptionColor};
}
}
}
} }
`; `;
const StyledCrossIconMobile = styled(CrossIconMobile)` const StyledCrossIconMobile = styled(CrossIconMobile)`
@ -468,6 +498,7 @@ export {
StyledDeleteIcon, StyledDeleteIcon,
StyledButtons, StyledButtons,
StyledLink, StyledLink,
ResetLink,
ScrollList, ScrollList,
StyledAccessSelector, StyledAccessSelector,
StyledToggleButton, StyledToggleButton,

View File

@ -2,6 +2,7 @@ import { useState, useCallback, useEffect, useRef } from "react";
import debounce from "lodash.debounce"; import debounce from "lodash.debounce";
import { inject, observer } from "mobx-react"; import { inject, observer } from "mobx-react";
import Avatar from "@docspace/components/avatar"; import Avatar from "@docspace/components/avatar";
import Text from "@docspace/components/text";
import TextInput from "@docspace/components/text-input"; import TextInput from "@docspace/components/text-input";
import DropDownItem from "@docspace/components/drop-down-item"; import DropDownItem from "@docspace/components/drop-down-item";
import toastr from "@docspace/components/toast/toastr"; import toastr from "@docspace/components/toast/toastr";
@ -27,6 +28,7 @@ import {
SearchItemText, SearchItemText,
StyledDescription, StyledDescription,
StyledInviteLanguage, StyledInviteLanguage,
ResetLink,
} from "../StyledInvitePanel"; } from "../StyledInvitePanel";
import Filter from "@docspace/common/api/people/filter"; import Filter from "@docspace/common/api/people/filter";
@ -188,7 +190,8 @@ const InviteInput = ({
onClick={addUser} onClick={addUser}
disabled={shared} disabled={shared}
height={48} height={48}
className="list-item"> className="list-item"
>
<Avatar size="min" role="user" source={avatar} /> <Avatar size="min" role="user" source={avatar} />
<div> <div>
<SearchItemText primary disabled={shared}> <SearchItemText primary disabled={shared}>
@ -257,7 +260,8 @@ const InviteInput = ({
style={{ width: "inherit" }} style={{ width: "inherit" }}
textOverflow textOverflow
onClick={addEmail} onClick={addEmail}
height={48}> height={48}
>
{t("Common:AddButton")} «{inputValue}» {t("Common:AddButton")} «{inputValue}»
</DropDownItem> </DropDownItem>
); );
@ -318,7 +322,8 @@ const InviteInput = ({
fontWeight="600" fontWeight="600"
type="action" type="action"
isHovered isHovered
onClick={openUsersPanel}> onClick={openUsersPanel}
>
{t("Translations:ChooseFromList")} {t("Translations:ChooseFromList")}
</StyledLink> </StyledLink>
)} )}
@ -329,7 +334,7 @@ const InviteInput = ({
: t("AddManuallyDescriptionRoom")} : t("AddManuallyDescriptionRoom")}
</StyledDescription> </StyledDescription>
<StyledInviteLanguage> <StyledInviteLanguage>
{t("InvitationLanguage")}: <Text className="invitation-language">{t("InvitationLanguage")}:</Text>
<div className="language-combo-box-wrapper"> <div className="language-combo-box-wrapper">
<ComboBox <ComboBox
className="language-combo-box" className="language-combo-box"
@ -346,20 +351,33 @@ const InviteInput = ({
withBlur={isMobileView} withBlur={isMobileView}
isDefaultMode={!isMobileView} isDefaultMode={!isMobileView}
fillIcon={false} fillIcon={false}
modernView={!isMobileView} modernView
/> />
</div> </div>
{isChangeLangMail && ( {isChangeLangMail && !isMobileView && (
<StyledLink <StyledLink
className="link-list" className="list-link"
fontWeight="600" fontWeight="600"
type="action" type="action"
isHovered isHovered
onClick={onResetLangMail}> onClick={onResetLangMail}
>
{t("ResetChange")} {t("ResetChange")}
</StyledLink> </StyledLink>
)} )}
</StyledInviteLanguage> </StyledInviteLanguage>
{isChangeLangMail && isMobileView && (
<ResetLink
className="reset-link"
fontWeight="600"
type="action"
isHovered
onClick={onResetLangMail}
>
{t("ResetChange")}
</ResetLink>
)}
<StyledInviteInputContainer ref={inputsRef}> <StyledInviteInputContainer ref={inputsRef}>
<StyledInviteInput ref={searchRef}> <StyledInviteInput ref={searchRef}>
<TextInput <TextInput
@ -386,7 +404,8 @@ const InviteInput = ({
showDisabledItems showDisabledItems
clickOutsideAction={closeInviteInputPanel} clickOutsideAction={closeInviteInputPanel}
eventTypes="click" eventTypes="click"
{...dropDownMaxHeight}> {...dropDownMaxHeight}
>
{!!usersList.length ? foundUsers : addEmailPanel} {!!usersList.length ? foundUsers : addEmailPanel}
</StyledDropDown> </StyledDropDown>
)} )}

View File

@ -2363,6 +2363,7 @@ const Base = {
createEditRoomDialog: { createEditRoomDialog: {
commonParam: { commonParam: {
descriptionColor: "#a3a9ae", descriptionColor: "#a3a9ae",
textColor: "#657077",
}, },
roomType: { roomType: {

View File

@ -2366,6 +2366,7 @@ const Dark = {
createEditRoomDialog: { createEditRoomDialog: {
commonParam: { commonParam: {
descriptionColor: "#a3a9ae", descriptionColor: "#a3a9ae",
textColor: "#858585",
}, },
roomType: { roomType: {