@titaui/pc 1.9.28 → 1.9.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/create-okr-modal/fields/index.css +1 -0
- package/lib/components/create-okr-modal/fields/input-with-err-popup.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +1 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +3 -1
- package/lib/components/help-card/image/liaojie.svg +9 -0
- package/lib/components/help-card/index.css +7 -6
- package/lib/components/help-card/index.js +1 -1
- package/lib/components/menus/components/flip-menu-card/index.css +1 -0
- package/lib/components/menus/components/flip-menu-card/index.js +8 -0
- package/lib/components/menus/export-modules/appraisal-menus/index.js +2 -2
- package/lib/components/menus/export-modules/okr-menus/okr-front-menus.js +2 -2
- package/lib/components/menus/export-modules/okr-menus/subordinate-menus/index.js +2 -2
- package/lib/components/nav-top/components/user-message/components/reply/reply-item.js +1 -1
- package/lib/components/okr-detail/base-info/o-desc/index.js +3 -1
- package/lib/components/okr-detail/components/editable-input/index.js +4 -2
- package/lib/components/okr-detail/components/header/edit-name.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress-modal/index.js +3 -1
- package/lib/components-v1/textarea/index.js +3 -1
- package/lib/pages/aha2021/index.css +13 -3
- package/lib/pages/aha2021/index.js +19 -19
- package/lib/pages/aha2021/kefu.svg +50 -0
- package/lib/pages/group-management/tree/group-form/index.js +4 -2
- package/lib/utils/i18n-front-translate.js +12 -2
- package/package.json +1 -1
- package/src/components/create-okr-modal/fields/index.scss +1 -0
- package/src/components/create-okr-modal/fields/input-with-err-popup.tsx +2 -1
- package/src/components/dynamic/dynamic-item/dynamic-create-o/index.scss +1 -0
- package/src/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.tsx +2 -1
- package/src/components/help-card/image/liaojie.svg +9 -0
- package/src/components/help-card/index.scss +7 -6
- package/src/components/help-card/index.tsx +1 -1
- package/src/components/menus/components/flip-menu-card/index.scss +1 -0
- package/src/components/menus/components/flip-menu-card/index.tsx +7 -0
- package/src/components/menus/export-modules/appraisal-menus/index.tsx +2 -2
- package/src/components/menus/export-modules/okr-menus/okr-front-menus.tsx +2 -2
- package/src/components/menus/export-modules/okr-menus/subordinate-menus/index.tsx +2 -2
- package/src/components/nav-top/components/user-message/components/reply/reply-item.tsx +1 -1
- package/src/components/okr-detail/base-info/o-desc/index.tsx +2 -1
- package/src/components/okr-detail/components/editable-input/index.tsx +3 -2
- package/src/components/okr-detail/components/header/edit-name.tsx +2 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.tsx +2 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.tsx +2 -1
- package/src/components/okr-detail/schedule/components/o-progress/index.tsx +2 -1
- package/src/components/okr-progress/components/o-progress/index.tsx +2 -1
- package/src/components/okr-progress-modal/index.tsx +2 -1
- package/src/components-v1/textarea/index.tsx +2 -1
- package/src/pages/aha2021/index.scss +13 -3
- package/src/pages/aha2021/index.tsx +34 -16
- package/src/pages/aha2021/kefu.svg +50 -0
- package/src/pages/group-management/tree/group-form/index.js +3 -2
- package/src/utils/i18n-front-translate.ts +8 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC, Fragment } from "react";
|
|
2
|
+
import { inputWordTrans } from "../../../utils/i18n-front-translate";
|
|
2
3
|
import Popup from "../../popup";
|
|
3
4
|
import "./index.scss";
|
|
4
5
|
|
|
@@ -21,7 +22,7 @@ const StrLengthOverflowError: FC<IErrorPopContentProps> = ({
|
|
|
21
22
|
<Fragment>
|
|
22
23
|
{strLength > maxLength ? (
|
|
23
24
|
<span className={"error-popup-text-wrapper"}>
|
|
24
|
-
{
|
|
25
|
+
{inputWordTrans(strLength, maxLength)}
|
|
25
26
|
</span>
|
|
26
27
|
) : null}
|
|
27
28
|
</Fragment>
|
|
@@ -9,6 +9,7 @@ import { getFeedTypeAndTypeColor } from '../../util';
|
|
|
9
9
|
import { highLightWord } from '../../../../utils/tools';
|
|
10
10
|
import { getUserInfo } from '../../../../utils/bs-global';
|
|
11
11
|
import Guanlian from './img/guanlian.png';
|
|
12
|
+
import { getLocale } from '../../../../utils/getLocale';
|
|
12
13
|
import './index.scss';
|
|
13
14
|
|
|
14
15
|
const prefix = 'titaui-dynamic-share-to-dynamic';
|
|
@@ -27,7 +28,7 @@ const DynamicShare: FC<IDynamicItemContentProps> = ({ data, hasDynamicOpereateAu
|
|
|
27
28
|
const renderDesc = useMemo(() => {
|
|
28
29
|
return (
|
|
29
30
|
<Fragment>
|
|
30
|
-
<span className={prefix + '__operate-desc'}
|
|
31
|
+
<span className={prefix + '__operate-desc'}>{getLocale('Feed_sharedexcelle')}</span>
|
|
31
32
|
<span className={prefix + '-desc-operate-type'} style={{ background: feedTypeColor }} />
|
|
32
33
|
</Fragment>
|
|
33
34
|
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="240px" height="240px" viewBox="0 0 240 240" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>liaojie</title>
|
|
4
|
+
<g id="liaojie" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<path d="M120,20 C64.771525,20 20,64.771525 20,120 C20,175.228475 64.771525,220 120,220 C175.228475,220 220,175.228475 220,120 C220,64.771525 175.228475,20 120,20 Z M120,36 C166.391919,36 204,73.608081 204,120 C204,166.391919 166.391919,204 120,204 C73.608081,204 36,166.391919 36,120 C36,73.608081 73.608081,36 120,36 Z" id="椭圆形" fill="#141C28" fill-rule="nonzero"></path>
|
|
6
|
+
<path d="M120.008756,67 C111.978786,67 104.365434,69.5751522 98.5581514,74.2740154 C92.5462972,79.1476855 89.1380286,85.7464547 89.0041026,92.8525998 L89,93.4421688 C89,98.0147412 92.7048728,101.721543 97.275065,101.721543 C101.845257,101.721543 105.55013,98.0147412 105.55013,93.4421688 L105.55013,93.2882935 C105.55013,87.633082 111.918127,82.717229 120.008756,82.717229 C128.099386,82.717229 134.467382,87.633082 134.467382,93.2882935 C134.467382,97.3618411 131.236598,101.705432 126.529119,103.512236 L126.226653,103.624092 C121.998705,105.120732 118.37505,107.759616 115.76761,111.242806 C113.200769,114.69201 111.71593,119.721641 111.71593,124.292547 L111.71593,134.720625 C111.71593,139.293198 115.420803,143 119.990995,143 C124.561188,143 128.26606,139.293198 128.26606,134.720625 L128.26606,124.095087 C128.26606,121.733292 129.969128,119.083428 132.030331,118.350524 C143.332617,114.321686 151.000085,104.106804 151.000085,93.2882935 C151.0197,86.0248852 147.599248,79.251479 141.461239,74.2755365 C135.666971,69.5693086 128.057111,67 120.008756,67 Z" id="路径" fill="#2879FF" fill-rule="nonzero"></path>
|
|
7
|
+
<path d="M109,162 C109,168.075132 113.924868,173 120,173 C126.075132,173 131,168.075132 131,162 C131,155.924868 126.075132,151 120,151 C113.924868,151 109,155.924868 109,162 Z" id="路径" fill="#000000" fill-rule="nonzero"></path>
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
&-image {
|
|
15
15
|
width: 24px;
|
|
16
16
|
height: 24px;
|
|
17
|
-
background: url("./image/
|
|
17
|
+
background: url("./image/liaojie.svg") 50% 50% no-repeat;
|
|
18
|
+
background-size: 24px 24px;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
&-canceled {
|
|
@@ -206,20 +207,20 @@
|
|
|
206
207
|
}
|
|
207
208
|
|
|
208
209
|
100% {
|
|
209
|
-
transform: rotate(90deg);
|
|
210
|
+
transform: rotate(-90deg);
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
@keyframes titaZoomInLB {
|
|
214
215
|
0% {
|
|
215
216
|
opacity: 0;
|
|
216
|
-
transform-origin:
|
|
217
|
+
transform-origin: 100% 100%;
|
|
217
218
|
transform: scale(0, 0);
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
100% {
|
|
221
222
|
opacity: 1;
|
|
222
|
-
transform-origin:
|
|
223
|
+
transform-origin: 100% 100%;
|
|
223
224
|
transform: scale(1, 1);
|
|
224
225
|
}
|
|
225
226
|
}
|
|
@@ -227,13 +228,13 @@
|
|
|
227
228
|
@keyframes titaZoomOutLB {
|
|
228
229
|
0% {
|
|
229
230
|
opacity: 1;
|
|
230
|
-
transform-origin:
|
|
231
|
+
transform-origin: 100% 100%;
|
|
231
232
|
transform: scale(1, 1);
|
|
232
233
|
}
|
|
233
234
|
|
|
234
235
|
100% {
|
|
235
236
|
opacity: 0;
|
|
236
|
-
transform-origin:
|
|
237
|
+
transform-origin: 100% 100%;
|
|
237
238
|
transform: scale(0, 0);
|
|
238
239
|
}
|
|
239
240
|
}
|
|
@@ -209,7 +209,7 @@ const HelpCard: FC<HelpCardProps> = ({ ...restProps }) => {
|
|
|
209
209
|
<div {...restProps}>
|
|
210
210
|
<Popup
|
|
211
211
|
popupTransitionName="tita-popup-zoom-left-bottom"
|
|
212
|
-
placement="
|
|
212
|
+
placement="topLeft"
|
|
213
213
|
popupAlign={{
|
|
214
214
|
offset: [-32, -10],
|
|
215
215
|
overflow: {
|
|
@@ -159,6 +159,13 @@ export default forwardRef((props: Props, ref) => {
|
|
|
159
159
|
} else {
|
|
160
160
|
setShowMore(false);
|
|
161
161
|
}
|
|
162
|
+
scrollArea.addEventListener('scroll', () => {
|
|
163
|
+
if(scrollArea.scrollHeight - scrollArea.offsetHeight == scrollArea.scrollTop) {
|
|
164
|
+
setShowMore(false)
|
|
165
|
+
} else {
|
|
166
|
+
setShowMore(true);
|
|
167
|
+
}
|
|
168
|
+
})
|
|
162
169
|
};
|
|
163
170
|
const observer = new MutationObserver(callback);
|
|
164
171
|
|
|
@@ -22,7 +22,7 @@ const AppraisalMenus = (props: Props) => {
|
|
|
22
22
|
const { onSelect = () => { }, history } = props;
|
|
23
23
|
|
|
24
24
|
const [maxHeight, setMaxHeight] = useState<number>(() => {
|
|
25
|
-
return document.body.offsetHeight -
|
|
25
|
+
return document.body.offsetHeight - 220;
|
|
26
26
|
});
|
|
27
27
|
const [selectedMenuKeys, setSelectedMenuKeys] = useState<string[]>([]);
|
|
28
28
|
|
|
@@ -74,7 +74,7 @@ const AppraisalMenus = (props: Props) => {
|
|
|
74
74
|
const obs = new ResizeObserver(entries => {
|
|
75
75
|
for (let entry of entries) {
|
|
76
76
|
const cr = entry.contentRect;
|
|
77
|
-
setMaxHeight(cr.height -
|
|
77
|
+
setMaxHeight(cr.height - 220);
|
|
78
78
|
}
|
|
79
79
|
})
|
|
80
80
|
obs.observe(document.body);
|
|
@@ -31,7 +31,7 @@ export default forwardRef((props: Props, ref) => {
|
|
|
31
31
|
} = props;
|
|
32
32
|
|
|
33
33
|
const [maxHeight, setMaxHeight] = useState<number>(() => {
|
|
34
|
-
return document.body.offsetHeight -
|
|
34
|
+
return document.body.offsetHeight - 220;
|
|
35
35
|
});
|
|
36
36
|
const [expandedKeys, setExpandedKeys] = useState(['myokr']);
|
|
37
37
|
const [selectedMenuKeys, setSelectedMenuKeys] = useState<string[]>([]);
|
|
@@ -158,7 +158,7 @@ export default forwardRef((props: Props, ref) => {
|
|
|
158
158
|
const obs = new ResizeObserver(entries => {
|
|
159
159
|
for (let entry of entries) {
|
|
160
160
|
const cr = entry.contentRect;
|
|
161
|
-
setMaxHeight(cr.height -
|
|
161
|
+
setMaxHeight(cr.height - 220);
|
|
162
162
|
}
|
|
163
163
|
})
|
|
164
164
|
obs.observe(document.body);
|
|
@@ -24,7 +24,7 @@ export default (props) => {
|
|
|
24
24
|
const [selectedMenuKeys, setSelectedMenuKeys] = useState<string[]>([]);
|
|
25
25
|
const [loginUserId] = useState(window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0);
|
|
26
26
|
const [maxHeight, setMaxHeight] = useState<number>(() => {
|
|
27
|
-
return document.body.offsetHeight -
|
|
27
|
+
return document.body.offsetHeight - 220;
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
useEffect(() => {
|
|
@@ -76,7 +76,7 @@ export default (props) => {
|
|
|
76
76
|
const obs = new ResizeObserver(entries => {
|
|
77
77
|
for (let entry of entries) {
|
|
78
78
|
const cr = entry.contentRect;
|
|
79
|
-
setMaxHeight(cr.height -
|
|
79
|
+
setMaxHeight(cr.height - 200);
|
|
80
80
|
}
|
|
81
81
|
})
|
|
82
82
|
obs.observe(document.body);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC, useState, useEffect, useRef, useCallback } from "react";
|
|
2
|
+
import { inputWordTrans } from "../../../../utils/i18n-front-translate";
|
|
2
3
|
import { getLocale } from "../../../../utils/getLocale";
|
|
3
4
|
import "./index.scss";
|
|
4
5
|
|
|
@@ -93,7 +94,7 @@ const ODesc: FC<IODescProps> = ({
|
|
|
93
94
|
if (!hasError) return <span></span>;
|
|
94
95
|
return (
|
|
95
96
|
<span className="o-desc__errror-tips">
|
|
96
|
-
|
|
97
|
+
{inputWordTrans(desc.trim().length, maxLength)}
|
|
97
98
|
</span>
|
|
98
99
|
);
|
|
99
100
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect } from "react";
|
|
2
|
-
import ErrorTip from "../../../tooltip/error-tip";
|
|
3
2
|
import classNames from "classnames";
|
|
3
|
+
import ErrorTip from "../../../tooltip/error-tip";
|
|
4
|
+
import { inputWordTrans } from "../../../../utils/i18n-front-translate";
|
|
4
5
|
|
|
5
6
|
import './index.scss';
|
|
6
7
|
|
|
@@ -45,7 +46,7 @@ export default (props: IProps) => {
|
|
|
45
46
|
return setErrorTip(emptyMessage || '');
|
|
46
47
|
}
|
|
47
48
|
if (val.length > maxLength) {
|
|
48
|
-
return setErrorTip(
|
|
49
|
+
return setErrorTip(inputWordTrans(val.length, maxLength));
|
|
49
50
|
}
|
|
50
51
|
setText(val);
|
|
51
52
|
setErrorTip('');
|
|
@@ -3,6 +3,7 @@ import classNames from "classnames";
|
|
|
3
3
|
import Toast from "../../../toast";
|
|
4
4
|
import { updateOkrName } from "../../request-apis";
|
|
5
5
|
import { getLocale } from "../../../../utils/getLocale";
|
|
6
|
+
import { inputWordTrans } from "../../../../utils/i18n-front-translate";
|
|
6
7
|
|
|
7
8
|
interface IEditNameProps {
|
|
8
9
|
okrName: string;
|
|
@@ -27,7 +28,7 @@ const EditNameCmp = (props: IEditNameProps) => {
|
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
if (val.length > 500) {
|
|
30
|
-
setErrorTip(
|
|
31
|
+
setErrorTip(inputWordTrans(val.length, 500));
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
34
|
setErrorTip("");
|
package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'
|
|
|
2
2
|
import Popup from '../../../../../../popup';
|
|
3
3
|
import styled from 'styled-components'
|
|
4
4
|
import { getLocale, isEn } from "../../../../../../../utils/getLocale";
|
|
5
|
+
import { inputWordTrans } from '../../../../../../../utils/i18n-front-translate';
|
|
5
6
|
|
|
6
7
|
const Wrapper = styled.div`
|
|
7
8
|
min-width: 343px;
|
|
@@ -172,7 +173,7 @@ export default class EditPop extends PureComponent<Props> {
|
|
|
172
173
|
this.setState({
|
|
173
174
|
value: value,
|
|
174
175
|
showError: maxLength && value.length > maxLength,
|
|
175
|
-
errMsg:
|
|
176
|
+
errMsg: inputWordTrans(value.length, maxLength),
|
|
176
177
|
disable: maxLength && value.length > maxLength && disable ? true : false
|
|
177
178
|
})
|
|
178
179
|
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
IconEdit
|
|
19
19
|
} from './style';
|
|
20
20
|
import { getLocale, isEn } from "../../../../../../../utils/getLocale";
|
|
21
|
+
import { inputWordTrans } from '../../../../../../../utils/i18n-front-translate';
|
|
21
22
|
|
|
22
23
|
interface Props {
|
|
23
24
|
setRefInParent: Function
|
|
@@ -218,7 +219,7 @@ export default class Score extends PureComponent<Props, State> {
|
|
|
218
219
|
*/
|
|
219
220
|
information: (this.state.showScoreInfoError ?
|
|
220
221
|
|
|
221
|
-
<ScoreInfoWrapperError data-length={
|
|
222
|
+
<ScoreInfoWrapperError data-length={inputWordTrans(this.state.areaLength, 1000)}>
|
|
222
223
|
<ScoreInfoSpanText style={{minWidth: isEn ? '75px' : '30px'}}>{getLocale('OKR_MyO_Description')}</ScoreInfoSpanText>
|
|
223
224
|
<ScoreInfoSpanTextareaError
|
|
224
225
|
ref={this.state.scoreInfoErrorRef}
|
|
@@ -16,6 +16,7 @@ import { OAuth, hasSuperior } from '../../../../../utils/auth';
|
|
|
16
16
|
import { GeneralDataContext, CommonContext } from '../../../context';
|
|
17
17
|
import { remindAction } from '../../../request-apis';
|
|
18
18
|
import { getLocale } from "../../../../../utils/getLocale";
|
|
19
|
+
import { inputWordTrans } from '../../../../../utils/i18n-front-translate';
|
|
19
20
|
import './index.scss';
|
|
20
21
|
|
|
21
22
|
interface IOProgressProps {
|
|
@@ -267,7 +268,7 @@ const OProgress: FC<IOProgressProps> = ({listData, okrInfo, setUpdateProgress, h
|
|
|
267
268
|
</div>
|
|
268
269
|
{hasError ? (
|
|
269
270
|
<div className={'o-progress__error-text'}>
|
|
270
|
-
|
|
271
|
+
{inputWordTrans(editOProgressContent.trim().length, 500)}
|
|
271
272
|
</div>
|
|
272
273
|
) : null}
|
|
273
274
|
</Modal>
|
|
@@ -15,6 +15,7 @@ import EmptyPng from '../../img/schedule-empty.png';
|
|
|
15
15
|
import { OAuth, hasSuperior } from '../../../../utils/auth';
|
|
16
16
|
import { IOProgressProps } from '../../interface';
|
|
17
17
|
import { getLocale } from '../../../../utils/getLocale';
|
|
18
|
+
import { inputWordTrans } from '../../../../utils/i18n-front-translate';
|
|
18
19
|
import './index.scss';
|
|
19
20
|
|
|
20
21
|
const OProgress: FC<IOProgressProps> = ({listData, okrInfo, setUpdateProgress, hasOtherProgress, getOProgressData}) => {
|
|
@@ -244,7 +245,7 @@ const OProgress: FC<IOProgressProps> = ({listData, okrInfo, setUpdateProgress, h
|
|
|
244
245
|
</div>
|
|
245
246
|
{hasError ? (
|
|
246
247
|
<div className={'o-progress__error-text'}>
|
|
247
|
-
|
|
248
|
+
{inputWordTrans(editOProgressContent.trim().length, 500)}
|
|
248
249
|
</div>
|
|
249
250
|
) : null}
|
|
250
251
|
</Modal>
|
|
@@ -8,6 +8,7 @@ import { getO_SETTING, getKR_SETTING, transProgress, getKrOptions, getOptions }
|
|
|
8
8
|
import { ErrorTip, List, Item, Icon, Options, OptionsWrapper } from './style';
|
|
9
9
|
import { IRecommandProgressObj, OptionsObj, IProgressModalProps } from './interface';
|
|
10
10
|
import { getLocale } from '../../utils/getLocale';
|
|
11
|
+
import { inputWordTrans } from '../../utils/i18n-front-translate';
|
|
11
12
|
import './index.scss';
|
|
12
13
|
|
|
13
14
|
const ProgressModal: React.FC<IProgressModalProps> = props => {
|
|
@@ -85,7 +86,7 @@ const ProgressModal: React.FC<IProgressModalProps> = props => {
|
|
|
85
86
|
}}
|
|
86
87
|
/>
|
|
87
88
|
<ErrorTip className={errorRemark ? 'slideIn' : ''}>
|
|
88
|
-
|
|
89
|
+
{inputWordTrans(progressDescription.trim().length, maxLength)}
|
|
89
90
|
</ErrorTip>
|
|
90
91
|
</Item>
|
|
91
92
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react'
|
|
2
|
+
import { inputWordTrans } from '../../utils/i18n-front-translate'
|
|
2
3
|
import { TextareaWrapper, Textarea, TextareaPlaceholder, TextareaWarning } from './style'
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
@@ -115,7 +116,7 @@ export default class TextareaView extends PureComponent<Props, State> {
|
|
|
115
116
|
</Textarea>
|
|
116
117
|
{valueLen > (maxLength as number) && (
|
|
117
118
|
<TextareaWarning>
|
|
118
|
-
<p
|
|
119
|
+
<p>{inputWordTrans(valueLen, maxLength)}</p>
|
|
119
120
|
</TextareaWarning>
|
|
120
121
|
)}
|
|
121
122
|
</TextareaWrapper>
|
|
@@ -17,17 +17,27 @@
|
|
|
17
17
|
z-index: 3;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
&__invite {
|
|
20
|
+
&__invite,&__kefu {
|
|
21
21
|
position: absolute;
|
|
22
22
|
bottom: 74px;
|
|
23
|
-
|
|
23
|
+
right: 24px;
|
|
24
24
|
z-index: 2;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
&__kefu {
|
|
28
|
+
width: 42px;
|
|
29
|
+
height: 42px;
|
|
30
|
+
background: url('./kefu.svg') no-repeat;
|
|
31
|
+
background-size: 42px;
|
|
32
|
+
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
&__help {
|
|
28
38
|
position: absolute;
|
|
29
39
|
bottom: 20px;
|
|
30
|
-
|
|
40
|
+
right: 24px;
|
|
31
41
|
z-index: 2;
|
|
32
42
|
}
|
|
33
43
|
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import React, { Children,
|
|
2
|
-
import classNames from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import React, { Children, useEffect } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import Tooltip from "../../components/tooltip";
|
|
4
|
+
import NavTop from "../../components/nav-top";
|
|
5
|
+
import FollowerVisitor from "../../components/follower-visitor";
|
|
6
|
+
import InvitePeople from "../../components/invite-people";
|
|
7
|
+
import HelpCard from "../../components/help-card";
|
|
8
|
+
import PointDemo from "../../components/point-demo/point-demo";
|
|
9
|
+
import { isOfficialSite, isPlatform } from "../../utils/platform";
|
|
10
|
+
import "./index.scss";
|
|
11
|
+
import { getTenantInfo } from "../../utils/helpers";
|
|
12
|
+
import HrHeader from "../../components/hr-header";
|
|
12
13
|
|
|
13
14
|
const preCls = `titaui-aha-2021`;
|
|
14
15
|
|
|
15
16
|
const ContentTemplate = (props) => {
|
|
16
17
|
const { children, title } = props;
|
|
17
18
|
|
|
18
|
-
const [isTrial] = useState(window.BSGlobal.tenantAuthentication.Version == 1);
|
|
19
|
-
|
|
20
19
|
useEffect(() => {
|
|
21
20
|
if (title) document.title = title;
|
|
22
21
|
}, []);
|
|
@@ -42,20 +41,39 @@ const PageLayout = (props) => {
|
|
|
42
41
|
const { children } = props;
|
|
43
42
|
|
|
44
43
|
const isTrial =
|
|
45
|
-
window.BSGlobal.tenantAuthentication.Version
|
|
44
|
+
window.BSGlobal.tenantAuthentication.Version !== 1 && isOfficialSite();
|
|
45
|
+
|
|
46
|
+
const onClickKefu = () => {
|
|
47
|
+
const kefuUrl = isTrial
|
|
48
|
+
? "https://wpa1.qq.com/vZYKN3kT?_type=wpa&qidian=true"
|
|
49
|
+
: "https://wpa1.qq.com/o6X4XD1n?_type=wpa&qidian=true";
|
|
50
|
+
window.open(kefuUrl);
|
|
51
|
+
};
|
|
46
52
|
|
|
47
53
|
return (
|
|
48
54
|
<div className={classNames(preCls)}>
|
|
49
55
|
<div className={classNames(`${preCls}__header`)}>
|
|
50
|
-
{getTenantInfo().Source == 964 ? <HrHeader/> : <NavTop />}
|
|
56
|
+
{getTenantInfo().Source == 964 ? <HrHeader /> : <NavTop />}
|
|
51
57
|
</div>
|
|
52
58
|
<div className={classNames(`${preCls}__message`)}>
|
|
53
59
|
<FollowerVisitor />
|
|
54
|
-
</div>
|
|
60
|
+
</div>
|
|
55
61
|
<div className={classNames(`${preCls}__body`)}>{children}</div>
|
|
56
62
|
<div className={classNames(`${preCls}__help`)}>
|
|
57
63
|
<HelpCard />
|
|
58
64
|
</div>
|
|
65
|
+
{!isTrial && (
|
|
66
|
+
<Tooltip
|
|
67
|
+
overlay={"联系客服"}
|
|
68
|
+
placement="left"
|
|
69
|
+
align={{ offset: [0, 0] }}
|
|
70
|
+
>
|
|
71
|
+
<div
|
|
72
|
+
className={classNames(`${preCls}__kefu`)}
|
|
73
|
+
onClick={onClickKefu}
|
|
74
|
+
/>
|
|
75
|
+
</Tooltip>
|
|
76
|
+
)}
|
|
59
77
|
{isTrial && (
|
|
60
78
|
<div className={classNames(`${preCls}__invite`)}>
|
|
61
79
|
<InvitePeople />
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="42px" height="42px" viewBox="0 0 42 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>联系客服</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="50%" y1="3.061617e-15%" x2="50%" y2="100%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#4E90FF" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#2879FF" offset="100%"></stop>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<circle id="path-2" cx="21" cy="21" r="21"></circle>
|
|
10
|
+
<filter x="-9.5%" y="-9.5%" width="119.0%" height="119.0%" filterUnits="objectBoundingBox" id="filter-3">
|
|
11
|
+
<feMorphology radius="2" operator="erode" in="SourceAlpha" result="shadowSpreadInner1"></feMorphology>
|
|
12
|
+
<feGaussianBlur stdDeviation="3" in="shadowSpreadInner1" result="shadowBlurInner1"></feGaussianBlur>
|
|
13
|
+
<feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
|
|
14
|
+
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
|
|
15
|
+
<feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
|
|
16
|
+
</filter>
|
|
17
|
+
<path d="M16.0326322,22.3870375 C17.2658552,23.6988927 19.0348583,24.52 21,24.52 C22.9651417,24.52 24.7341448,23.6988927 25.9677254,22.3884226 C28.2561116,22.7713626 30,24.7620278 30,27.16 L30,28.48 C30,30.4240423 28.4240423,32 26.48,32 L15.52,32 C13.5759577,32 12,30.4240423 12,28.48 L12,27.16 C12,24.7620278 13.7438884,22.7713626 16.0326322,22.3870375 Z M21,12.75 C23.7338095,12.75 25.95,15.0646878 25.95,17.92 C25.95,20.7753122 23.7338095,23.09 21,23.09 C18.2661905,23.09 16.05,20.7753122 16.05,17.92 C16.05,15.0646878 18.2661905,12.75 21,12.75 Z" id="path-4"></path>
|
|
18
|
+
<filter x="-8.3%" y="-7.8%" width="116.7%" height="115.6%" filterUnits="objectBoundingBox" id="filter-5">
|
|
19
|
+
<feGaussianBlur stdDeviation="1.5" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
|
|
20
|
+
<feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
|
|
21
|
+
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
|
|
22
|
+
<feColorMatrix values="0 0 0 0 0.156862745 0 0 0 0 0.474509804 0 0 0 0 1 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
|
|
23
|
+
</filter>
|
|
24
|
+
<path d="M21,10 C24.9277825,10 28.2259218,12.625855 29.1450821,16.1736317 C29.6496186,16.4041954 30,16.914055 30,17.5057506 L30,19.053028 C30,19.8630456 29.343351,20.5196947 28.5333333,20.5196947 L28.3666667,20.5196947 C27.556649,20.5196947 26.9,19.8630456 26.9,19.053028 L26.9,17.5057506 C26.9,17.0104727 27.1454948,16.5725332 27.5214379,16.3069786 C26.6936147,13.562158 24.0870351,11.5584733 21,11.5584733 C17.9129808,11.5584733 15.3064121,13.5621374 14.4762481,16.3071469 C14.8545052,16.5725332 15.1,17.0104727 15.1,17.5057506 L15.1,19.053028 C15.1,19.8630456 14.443351,20.5196947 13.6333333,20.5196947 L13.4666667,20.5196947 C12.656649,20.5196947 12,19.8630456 12,19.053028 L12,17.5057506 C12,16.9136645 12.3508441,16.4035223 12.8559786,16.171878 C13.7744369,12.6255694 17.0724311,10 21,10 Z" id="path-6"></path>
|
|
25
|
+
<filter x="-2.8%" y="-4.8%" width="105.6%" height="109.5%" filterUnits="objectBoundingBox" id="filter-7">
|
|
26
|
+
<feGaussianBlur stdDeviation="0.5" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
|
|
27
|
+
<feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
|
|
28
|
+
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
|
|
29
|
+
<feColorMatrix values="0 0 0 0 0.156862745 0 0 0 0 0.474509804 0 0 0 0 1 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
|
|
30
|
+
</filter>
|
|
31
|
+
</defs>
|
|
32
|
+
<g id="整体框架" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
33
|
+
<g transform="translate(-1142.000000, -684.000000)" id="联系客服">
|
|
34
|
+
<g transform="translate(1142.000000, 684.000000)">
|
|
35
|
+
<g id="椭圆形">
|
|
36
|
+
<use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"></use>
|
|
37
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"></use>
|
|
38
|
+
</g>
|
|
39
|
+
<g id="形状结合">
|
|
40
|
+
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-4"></use>
|
|
41
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-5)" xlink:href="#path-4"></use>
|
|
42
|
+
</g>
|
|
43
|
+
<g id="形状结合" fill-rule="nonzero">
|
|
44
|
+
<use fill="#FFFFFF" xlink:href="#path-6"></use>
|
|
45
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-7)" xlink:href="#path-6"></use>
|
|
46
|
+
</g>
|
|
47
|
+
</g>
|
|
48
|
+
</g>
|
|
49
|
+
</g>
|
|
50
|
+
</svg>
|
|
@@ -4,6 +4,7 @@ import UserSelector from '../../../../components/user-selector';
|
|
|
4
4
|
import { Textarea, Radio } from 'tita-ui';
|
|
5
5
|
import { getVisible } from '../../groupInterface';
|
|
6
6
|
import { getLocale } from '../../../../utils/getLocale';
|
|
7
|
+
import { inputWordTrans } from '../../../../utils/i18n-front-translate';
|
|
7
8
|
import './index.scss'
|
|
8
9
|
|
|
9
10
|
const preCls = 'user-group-page'
|
|
@@ -58,7 +59,7 @@ export default forwardRef((props, ref) => {
|
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
if (value.length > 50) {
|
|
61
|
-
setGroupNameErrMsg(
|
|
62
|
+
setGroupNameErrMsg(inputWordTrans(value.length, 50))
|
|
62
63
|
} else {
|
|
63
64
|
setGroupNameErrMsg('')
|
|
64
65
|
}
|
|
@@ -66,7 +67,7 @@ export default forwardRef((props, ref) => {
|
|
|
66
67
|
|
|
67
68
|
const onGroupNameBlur = () => {
|
|
68
69
|
if (groupName.length > 50) {
|
|
69
|
-
setGroupNameErrMsg(
|
|
70
|
+
setGroupNameErrMsg(inputWordTrans(groupName.length, 50))
|
|
70
71
|
} else {
|
|
71
72
|
setGroupNameErrMsg('')
|
|
72
73
|
}
|
|
@@ -6,3 +6,11 @@ export const i18nLimitCharacters = (length) => {
|
|
|
6
6
|
return `最多可输入${length}个字`;
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
|
+
|
|
10
|
+
export const inputWordTrans = (inputValueLength, maxLength) => {
|
|
11
|
+
if (isEn) {
|
|
12
|
+
return `Already entered ${inputValueLength} characters,max ${maxLength} characters`;
|
|
13
|
+
} else {
|
|
14
|
+
return `已输入${inputValueLength}个字,最多可输入${maxLength}字`;
|
|
15
|
+
}
|
|
16
|
+
}
|