@titaui/pc 1.9.46 → 1.9.50

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.
@@ -113,7 +113,8 @@ var _default = function _default(props) {
113
113
  animation: "slide-fade",
114
114
  maskAnimation: "fade",
115
115
  maskClosable: false,
116
- footer: footer || baseFooter
116
+ footer: footer || baseFooter,
117
+ zIndex: 1299
117
118
  }, restProps));
118
119
  };
119
120
 
@@ -370,10 +370,12 @@ var BaseInfo = function BaseInfo(_ref) {
370
370
  (0, _react.useEffect)(function () {
371
371
  (0, _requestApis.getOkrUsers)(okrInfo.workId).then(function (resp) {
372
372
  if (resp.Code === 1) {
373
+ var _data$;
374
+
373
375
  var data = resp.Data;
374
376
  setGeneralPrincipalUser((0, _util.formatAvatarInfo)(data[0].users)[0]);
375
377
  setParticipant((0, _util.formatAvatarInfo)(data[1].users));
376
- setFollowers((0, _util.formatAvatarInfo)(data[2].users));
378
+ setFollowers((0, _util.formatAvatarInfo)(((_data$ = data[2]) === null || _data$ === void 0 ? void 0 : _data$.users) || []));
377
379
  }
378
380
  });
379
381
  }, []);
@@ -424,6 +426,7 @@ var BaseInfo = function BaseInfo(_ref) {
424
426
  }, [generalRoleType, participant, followers]);
425
427
  var renderDialogConfirm = (0, _react.useMemo)(function () {
426
428
  return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
429
+ zIndex: 1200,
427
430
  visible: showDialogConfirm,
428
431
  type: "warning"
429
432
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -260,6 +260,7 @@ var OProgress = function OProgress(_ref) {
260
260
  }, [oProgressData]);
261
261
  var renderDialogRemind = (0, _react.useMemo)(function () {
262
262
  return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
263
+ zIndex: 1200,
263
264
  visible: showRemindDialogConfirm,
264
265
  type: "warning"
265
266
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -36,10 +36,17 @@ var storage = new _localStorage.localStorage();
36
36
 
37
37
  function StopTakingModel() {
38
38
  var _useState = (0, _react.useState)(function () {
39
- var bol = storage.getItem('stopTaking');
39
+ var stopTaking = storage.getItem("stopTaking");
40
40
 
41
- if (typeof storage.getItem('stopTaking') === 'boolean') {
42
- return bol;
41
+ if (stopTaking !== null && stopTaking !== void 0 && stopTaking.date) {
42
+ var oldDate = new Date(stopTaking === null || stopTaking === void 0 ? void 0 : stopTaking.date).getDate();
43
+ var newDate = new Date().getDate();
44
+
45
+ if (newDate > oldDate) {
46
+ return true;
47
+ } else {
48
+ return false;
49
+ }
43
50
  }
44
51
 
45
52
  return true;
@@ -50,7 +57,10 @@ function StopTakingModel() {
50
57
 
51
58
  var handleClose = (0, _react.useCallback)(function () {
52
59
  setVisible(false);
53
- storage.setItem('stopTaking', false);
60
+ storage.setItem("stopTaking", {
61
+ bol: false,
62
+ date: new Date()
63
+ });
54
64
  }, []);
55
65
  return /*#__PURE__*/_react["default"].createElement(_titaUi.Modal, {
56
66
  visible: visible,
@@ -76,13 +86,13 @@ function StopTakingModel() {
76
86
  className: "".concat(preCls, "__content-line3")
77
87
  }, "\u5347\u7EA7\u65F6\u95F4\uFF1A", /*#__PURE__*/_react["default"].createElement("span", {
78
88
  style: {
79
- color: '#2879ff',
89
+ color: "#2879ff",
80
90
  fontWeight: 500
81
91
  }
82
92
  }, "1.21 (\u5468\u4E94) 23:00 - 1.22 (\u5468\u516D) 23:59"))), /*#__PURE__*/_react["default"].createElement("div", {
83
93
  className: "".concat(preCls, "__action"),
84
94
  onClick: function onClick() {
85
- return window.open('https://wiki.tita.com/x/RICeAQ');
95
+ return window.open("https://wiki.tita.com/x/RICeAQ");
86
96
  }
87
97
  }, "\u4E86\u89E3\u8BE6\u60C5")));
88
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.46",
3
+ "version": "1.9.50",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -63,6 +63,7 @@ export default props => {
63
63
  maskAnimation="fade"
64
64
  maskClosable={false}
65
65
  footer={footer || baseFooter}
66
+ zIndex={1299}
66
67
  {...restProps}
67
68
  />
68
69
  }
@@ -317,7 +317,7 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
317
317
  const data = resp.Data;
318
318
  setGeneralPrincipalUser(formatAvatarInfo(data[0].users)[0]);
319
319
  setParticipant(formatAvatarInfo(data[1].users));
320
- setFollowers(formatAvatarInfo(data[2].users));
320
+ setFollowers(formatAvatarInfo(data[2]?.users || []));
321
321
  }
322
322
  });
323
323
  }, []);
@@ -374,7 +374,7 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
374
374
 
375
375
  const renderDialogConfirm = useMemo(() => {
376
376
  return (
377
- <DialogConfirm visible={showDialogConfirm} type="warning">
377
+ <DialogConfirm zIndex={1200} visible={showDialogConfirm} type="warning">
378
378
  {/* @ts-ignore */}
379
379
  <span type="title">
380
380
  {delUserType === 1
@@ -160,7 +160,7 @@ const OProgress: FC<IOProgressProps> = ({listData, okrInfo, setUpdateProgress, h
160
160
 
161
161
  const renderDialogRemind = useMemo(() => {
162
162
  return (
163
- <DialogConfirm visible={showRemindDialogConfirm} type="warning">
163
+ <DialogConfirm zIndex={1200} visible={showRemindDialogConfirm} type="warning">
164
164
  {/* @ts-ignore */}
165
165
  <span type="title">{getLocale('OKR_DR_Pop_Areyousure')}</span>
166
166
  {/* @ts-ignore */}
@@ -1,48 +1,61 @@
1
1
  import React, { ReactElement, useState, useCallback } from "react";
2
2
  import { Modal } from "tita-ui";
3
3
  import { getLocale } from "../../utils/getLocale";
4
- import { localStorage } from "../../utils/local-storage"
4
+ import { localStorage } from "../../utils/local-storage";
5
5
  import "./index.scss";
6
6
 
7
7
  const preCls = "tt-stop-taking-model";
8
- const storage = new localStorage()
8
+ const storage = new localStorage();
9
9
 
10
10
  function StopTakingModel(): ReactElement {
11
11
  const [visible, setVisible] = useState<any>(() => {
12
- const bol = storage.getItem('stopTaking')
13
- if(typeof(storage.getItem('stopTaking'))==='boolean'){
14
- return bol
12
+ const stopTaking: any = storage.getItem("stopTaking");
13
+ if (stopTaking?.date) {
14
+ const oldDate = new Date(stopTaking?.date).getDate();
15
+ const newDate = new Date().getDate();
16
+ if (newDate > oldDate) {
17
+ return true;
18
+ } else {
19
+ return false;
20
+ }
15
21
  }
16
- return true
22
+ return true;
17
23
  });
18
24
 
19
25
  const handleClose = useCallback(() => {
20
26
  setVisible(false);
21
- storage.setItem('stopTaking',false)
27
+ storage.setItem("stopTaking", { bol: false, date: new Date() });
22
28
  }, []);
23
29
 
24
30
  return (
25
31
  <Modal visible={visible} customContent footer={null} width={420}>
26
-
27
- <div className={preCls}>
28
- <div className={`${preCls}__background`}></div>
29
- <span className={`tu-icon-close ${preCls}__close`} onClick={handleClose} ></span>
30
- <div className={`${preCls}__head`}>亲爱的用户</div>
31
- <div className={`${preCls}__content`}>
32
- <div className={`${preCls}__content-line1`}>
33
- 您好~
34
- </div>
35
- <div className={`${preCls}__content-line2`}>
32
+ <div className={preCls}>
33
+ <div className={`${preCls}__background`}></div>
34
+ <span
35
+ className={`tu-icon-close ${preCls}__close`}
36
+ onClick={handleClose}
37
+ ></span>
38
+ <div className={`${preCls}__head`}>亲爱的用户</div>
39
+ <div className={`${preCls}__content`}>
40
+ <div className={`${preCls}__content-line1`}>您好~</div>
41
+ <div className={`${preCls}__content-line2`}>
36
42
  为了给您带来更好的安全与稳定体验,Tita
37
43
  将在周五晚上进行升级,预计耗时一天,介时将无法使用
38
44
  Tita,请您提前安排好工作,感谢您的支持与理解!
39
- </div>
40
- <div className={`${preCls}__content-line3`}>
45
+ </div>
46
+ <div className={`${preCls}__content-line3`}>
41
47
  升级时间:
42
- <span style={{color:'#2879ff',fontWeight:500}}>1.21 (周五) 23:00 - 1.22 (周六) 23:59</span>
43
- </div>
48
+ <span style={{ color: "#2879ff", fontWeight: 500 }}>
49
+ 1.21 (周五) 23:00 - 1.22 (周六) 23:59
50
+ </span>
44
51
  </div>
45
- <div className={`${preCls}__action`} onClick={()=>window.open('https://wiki.tita.com/x/RICeAQ')} >了解详情</div>
52
+ </div>
53
+ <div
54
+ className={`${preCls}__action`}
55
+ onClick={() => window.open("https://wiki.tita.com/x/RICeAQ")}
56
+ >
57
+ 了解详情
58
+ </div>
46
59
  </div>
47
60
  </Modal>
48
61
  );