diff --git a/src/forge/SecuritySetting/bot/disposition/detail.jsx b/src/forge/SecuritySetting/bot/disposition/detail.jsx index 6a267f1a4..ebcc209f9 100644 --- a/src/forge/SecuritySetting/bot/disposition/detail.jsx +++ b/src/forge/SecuritySetting/bot/disposition/detail.jsx @@ -5,6 +5,7 @@ import { Link } from "react-router-dom"; import { getInstallBot, updateInstallBot } from "../../../../softbot/api"; import { getImageUrl } from 'educoder'; import './index.scss'; +import '../exploit/index.scss'; function DispositionDetail(props){ const {match:{params:{id}}, current_user, current_user:{login, user_id}} = props; @@ -16,6 +17,8 @@ function DispositionDetail(props){ // bot状态 const [botState, setBotState] = useState(true); const [error, setError] = useState(false); + // 保存按钮loading效果 + const [saveLoading, setSaveLoading] = useState(false); // 获取bot详情 useEffect(()=>{ @@ -122,6 +125,7 @@ function DispositionDetail(props){ repo_owner_map[item.id+""] = login; }); } + setSaveLoading(true); current_user && updateInstallBot({ bot_id: id, password: "", @@ -134,6 +138,7 @@ function DispositionDetail(props){ installed_store_list: botDetail.store_id_list }).then(res=>{ if(res && res.code === 200){ + setSaveLoading(false); setSelectValue([]); const repoIds = new Set(); options.map(item=>{ @@ -143,6 +148,7 @@ function DispositionDetail(props){ getInsBotDetail(repoIds); message.success('更改成功'); }else{ + setSaveLoading(false); message.error(res.message); } }) @@ -154,7 +160,10 @@ function DispositionDetail(props){ {botDetail &&
-
{botDetail && botDetail.market_name}
+
+ {botDetail && botDetail.market_name} + {botDetail.is_public ? '公开' : '私有'} +
{botDetail && botDetail.register_name} {botDetail && botDetail.create_time}
@@ -192,7 +201,7 @@ function DispositionDetail(props){ {botState ? '开始使用该Bot,授予该Bot所需的仓库访问权限' : '暂停停止使用该bot,阻塞该bot拥有的仓库访问权限'}
- {botDetail && !botDetail.is_public && login !== botDetail.register_login ? : } + {botDetail && !botDetail.is_public && login !== botDetail.register_login ? : } } diff --git a/src/forge/SecuritySetting/bot/disposition/index.scss b/src/forge/SecuritySetting/bot/disposition/index.scss index c2d580a31..e020c4b1e 100644 --- a/src/forge/SecuritySetting/bot/disposition/index.scss +++ b/src/forge/SecuritySetting/bot/disposition/index.scss @@ -106,6 +106,10 @@ } } .changeStatusTip{color:#99a2af;} + .myInstallBotStatus{ + position: relative; + top: -4px; + } } .nullBotsBox{ border-radius: 4px 4px 0px 0px;