diff --git a/src/common/DateUtil.js b/src/common/DateUtil.js
index 630b2d7d6..8846d274c 100644
--- a/src/common/DateUtil.js
+++ b/src/common/DateUtil.js
@@ -107,7 +107,7 @@ export function timeAgo(backDate) {
try {
moment(backDate);
} catch (e) {
- return;
+ return '刚刚';
}
if(typeof backDate ==='number'){
backDate=backDate*1000
@@ -134,4 +134,5 @@ export function timeAgo(backDate) {
if (seconds) {
return seconds + "秒前";
}
+ return "刚刚";
}
\ No newline at end of file
diff --git a/src/forge/Component/AddGroup.jsx b/src/forge/Component/AddGroup.jsx
index 656175d5f..feff6f372 100644
--- a/src/forge/Component/AddGroup.jsx
+++ b/src/forge/Component/AddGroup.jsx
@@ -55,6 +55,7 @@ function AddGroup({organizeId,getGroupID}){
function addCollaborator(){
getGroupID && getGroupID(id);
+ setID(undefined);
}
return(
diff --git a/src/forge/Component/CopyTool.jsx b/src/forge/Component/CopyTool.jsx
new file mode 100644
index 000000000..e659c077e
--- /dev/null
+++ b/src/forge/Component/CopyTool.jsx
@@ -0,0 +1,44 @@
+import React, { useState, useCallback, memo } from 'react';
+import { Tooltip } from 'antd';
+
+CopyTool.defaultProps = {
+ beforeText: '复制', //浮动过去显示的文字
+ afterText: '复制成功', //点击后显示的文字
+ className: '', //传给svg的class
+ inputId: 'copyText', //要复制的文本的ID
+};
+
+
+function CopyTool({ beforeText, afterText, className,inputId }) {
+ const [title, setTitle] = useState(() => {
+ return beforeText;
+ });
+
+ // 复制链接
+ const copyUrl = useCallback(() => {
+ let inputDom = document.getElementById(inputId);
+ if (!inputDom) {
+ console.error("您的CopyTool未设置正确的inputId");
+ return;
+ }
+ inputDom.select();
+ if (document.execCommand('copy')) {
+ document.execCommand('copy');
+ }
+ setTitle(afterText);
+ inputDom.blur();
+ }, []);
+
+ return (
+
需要授权验证
++ 需要授权验证 + 如果源项目为公有仓库,禁止填写用户名密码。如果源项目为私有仓库,则必须填写正确的用户名和密码!
{ mirrorCheck &&允许访问项目单元:
-允许访问项目单元:
+
- { organizeDetail && organizeDetail.is_admin ?
+ { organizeDetail && organizeDetail.can_create_project ?
- {item.nickname}
+ {
+ (item.is_admin || item.is_member) ?
+ {item.nickname}
+ :
+ {item.nickname}
+ }
{ item.is_admin && item.authorize!=="owner" &&
- - {contentTitle}
-{content}
-{contentTitle}
} -{content}
+ {contentTitle &&{contentTitle}
} +{content}