You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Shixuns__Detail__Reposit...

2 lines
2.4 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5894],{84206:function(D,d,s){s.r(d),s.d(d,{default:function(){return w}});var e=s(59301),c=s(58106),n={bg:"bg___mMxrd",wrap:"wrap___jlj7b",commitWrap:"commitWrap___ORA2n",colorGray:"colorGray___qxQtS",content:"content___c1lTc",item:"item___CjXzD",itemContent:"itemContent____1l4i",itemEmail:"itemEmail___JfZGX",itemTitle:"itemTitle____yZfX",itemTime:"itemTime___g62XP"},v=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,C=(t,o)=>{var i={};for(var a in t)g.call(t,a)&&o.indexOf(a)<0&&(i[a]=t[a]);if(t!=null&&v)for(var a of v(t))o.indexOf(a)<0&&b.call(t,a)&&(i[a]=t[a]);return i},N=(t,o,i)=>new Promise((a,_)=>{var y=l=>{try{u(i.next(l))}catch(m){_(m)}},p=l=>{try{u(i.throw(l))}catch(m){_(m)}},u=l=>l.done?a(l.value):Promise.resolve(l.value).then(y,p);u((i=i.apply(t,o)).next())});const O=t=>{var o=t,{shixunsDetail:i,globalSetting:a,loading:_,user:y,dispatch:p}=o,u=C(o,["shixunsDetail","globalSetting","loading","user","dispatch"]);const l=(0,c.useParams)(),m=(0,e.useRef)(),[f,x]=(0,e.useState)([]);(0,e.useEffect)(()=>{T()},[]);const T=()=>N(void 0,null,function*(){var r,E;m.current=((E=(r=location.pathname)==null?void 0:r.split("/"))==null?void 0:E[3])==="repository";const h=yield p({type:"shixunsDetail/getRepositoryCommit",payload:{id:l.id,secret_repository:m.current?void 0:!0}});h&&x(h.commits||[])});return e.createElement("section",{className:n.bg},e.createElement("div",{className:n.wrap},e.createElement("div",{className:n.commitWrap},e.createElement("div",null,e.createElement("i",{className:"iconfont icon-tijiaojilu mr5"}),"\u63D0\u4EA4\u8BB0\u5F55"),e.createElement(c.Link,{to:`/shixuns/${l.id}/repository`,className:`${n.colorGray} font14`},"\u8FD4\u56DE")),e.createElement("div",{className:n.content},f==null?void 0:f.map(r=>e.createElement("div",{className:`${n.item} mb5`,key:r.id},e.createElement("div",{className:n.itemContent},r.email&&e.createElement("span",{className:n.itemEmail},r.email),e.createElement("span",{className:n.itemTitle},r.title)),e.createElement("span",{className:n.itemTime},r.time))))))};var j=(0,c.connect)(({shixunsDetail:t,loading:o,globalSetting:i,user:a})=>({shixunsDetail:t,globalSetting:i,user:a,loading:o.models.index}))(O);const P=({globalSetting:t})=>e.createElement(j,null);var w=(0,c.connect)(({globalSetting:t})=>({globalSetting:t}))(P)}}]);