Skip to content

Commit

Permalink
fix(common): fix colorpicker bug, change some text
Browse files Browse the repository at this point in the history
  • Loading branch information
ganzorig committed Jul 3, 2020
1 parent d2916c8 commit a4fd856
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ui/src/modules/knowledgeBase/components/KnowledgeBase.tsx
Expand Up @@ -76,7 +76,7 @@ class KnowledgeBase extends React.Component<Props> {
<Title>
{currentCategory.title}
<span>
({articlesCount} {articlesCount > 1 ? __('articles') : __('artcile')})
({articlesCount} {articlesCount > 1 ? __('articles') : __('article')})
</span>
</Title>
);
Expand Down
Expand Up @@ -27,7 +27,7 @@ import {
import React from 'react';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import ChromePicker from 'react-color/lib/Chrome';
import TwitterPicker from 'react-color/lib/Twitter';
import CopyToClipboard from 'react-copy-to-clipboard';
import ReactMarkdown from 'react-markdown';
import { ITopic } from '../../types';
Expand Down Expand Up @@ -219,8 +219,13 @@ class KnowledgeForm extends React.Component<Props, State> {
const brandId = brand != null ? brand._id : '';

const popoverTop = (
<Popover id="color-picker">
<ChromePicker color={color} onChange={this.onColorChange} />
<Popover id="kb-color-picker">
<TwitterPicker
width="205px"
triangle="hide"
color={color}
onChange={this.onColorChange}
/>
</Popover>
);

Expand Down
10 changes: 8 additions & 2 deletions ui/src/modules/leads/components/step/OptionStep.tsx
Expand Up @@ -12,7 +12,7 @@ import { ColorPick, ColorPicker } from 'modules/settings/styles';
import React from 'react';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import ChromePicker from 'react-color/lib/Chrome';
import TwitterPicker from 'react-color/lib/Twitter';
import { IBrand } from '../../../settings/brands/types';
import { FormPreview } from './preview';
import { BackgroundSelector, ColorList, FlexItem } from './style';
Expand Down Expand Up @@ -64,7 +64,13 @@ class OptionStep extends React.Component<Props, {}> {

const popoverTop = (
<Popover id="color-picker">
<ChromePicker color={color} onChange={this.onColorChange} />
<TwitterPicker
width="266px"
triangle="hide"
colors={COLORS}
color={color}
onChange={this.onColorChange}
/>
</Popover>
);

Expand Down
4 changes: 2 additions & 2 deletions ui/src/modules/segments/components/common/Form.tsx
Expand Up @@ -21,7 +21,7 @@ import { ColorPick, ColorPicker, ExpandWrapper } from 'modules/settings/styles';
import React from 'react';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import ChromePicker from 'react-color/lib/Chrome';
import TwitterPicker from 'react-color/lib/Twitter';
import { Link } from 'react-router-dom';
import { FilterBox, SegmentTitle, SegmentWrapper } from '../styles';
import AddConditionButton from './AddConditionButton';
Expand Down Expand Up @@ -299,7 +299,7 @@ class Form extends React.Component<Props, State> {

const popoverTop = (
<Popover id="color-picker">
<ChromePicker color={color} onChange={colorOnChange} />
<TwitterPicker triangle="hide" color={color} onChange={colorOnChange} />
</Popover>
);

Expand Down
9 changes: 6 additions & 3 deletions ui/src/modules/settings/boards/components/PipelineForm.tsx
Expand Up @@ -15,7 +15,7 @@ import React from 'react';
import Modal from 'react-bootstrap/Modal';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import BlockPicker from 'react-color/lib/Block';
import TwitterPicker from 'react-color/lib/Twitter';
import { SelectMemberStyled } from '../styles';
import { IOption } from '../types';
import Stages from './Stages';
Expand Down Expand Up @@ -155,7 +155,9 @@ class PipelineForm extends React.Component<Props, State> {
return (
<FormGroup>
<SelectMemberStyled>
<ControlLabel>Users eligible to see all {this.props.type}s</ControlLabel>
<ControlLabel>
Users eligible to see all {this.props.type}s
</ControlLabel>

<SelectTeamMembers
label="Choose members"
Expand Down Expand Up @@ -185,8 +187,9 @@ class PipelineForm extends React.Component<Props, State> {

const popoverBottom = (
<Popover id="color-picker">
<BlockPicker
<TwitterPicker
width="266px"
triangle="hide"
color={this.state.backgroundColor}
onChange={this.onColorChange}
colors={COLORS}
Expand Down
Expand Up @@ -19,7 +19,7 @@ import React from 'react';
import Modal from 'react-bootstrap/Modal';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import BlockPicker from 'react-color/lib/Block';
import TwitterPicker from 'react-color/lib/Twitter';
import Select from 'react-select-plus';
import { metricOptions } from '../constants';
import { queries } from '../graphql';
Expand Down Expand Up @@ -251,8 +251,9 @@ class PipelineForm extends React.Component<Props, State> {

const popoverBottom = (
<Popover id="color-picker">
<BlockPicker
<TwitterPicker
width="266px"
triangle="hide"
color={this.state.backgroundColor}
onChange={this.onColorChange}
colors={COLORS}
Expand Down
8 changes: 8 additions & 0 deletions ui/src/modules/settings/integrations/components/mail/Form.tsx
Expand Up @@ -95,6 +95,14 @@ class Form extends React.Component<Props, State> {
<strong>{__('Email add account description question')}</strong>
<br />
{__('Email add account description')}
<br />
<a
target="_blank"
href="https://www.erxes.org/administrator/system-config/#gmail-imap"
rel="noopener noreferrer"
>
{__('Learn how to connect a Gmail using IMAP')}
</a>
</Info>
</FormGroup>

Expand Down
Expand Up @@ -12,7 +12,7 @@ import {
import React from 'react';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import ChromePicker from 'react-color/lib/Chrome';
import TwitterPicker from 'react-color/lib/Twitter';

type Props = {
onChange: (
Expand Down Expand Up @@ -107,7 +107,7 @@ class Appearance extends React.Component<Props, State> {

const popoverContent = (
<Popover id="color-picker">
<ChromePicker color={this.state.color} onChange={onChange} />
<TwitterPicker color={this.state.color} onChange={onChange} />
</Popover>
);

Expand Down
4 changes: 2 additions & 2 deletions ui/src/modules/tags/components/Form.tsx
Expand Up @@ -12,7 +12,7 @@ import { ITag } from 'modules/tags/types';
import React from 'react';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import BlockPicker from 'react-color/lib/Block';
import TwitterPicker from 'react-color/lib/Twitter';
import styled from 'styled-components';

const ColorPick = styled.div`
Expand Down Expand Up @@ -80,7 +80,7 @@ class FormComponent extends React.Component<Props, State> {

const popoverContent = (
<Popover id="color-picker">
<BlockPicker
<TwitterPicker
width="266px"
color={colorCode}
onChange={this.onColorChange}
Expand Down

0 comments on commit a4fd856

Please sign in to comment.