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.3 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4884],{994:function(D,v,s){s.r(v),s.d(v,{default:function(){return j}});var e=s(59301),u=s(71471),n={bg:"bg___GqpQF",wrap:"wrap___DbTSK",commitWrap:"commitWrap___amrYc",colorGray:"colorGray___Cz49B",content:"content___AIRyv",item:"item___AxLEf",itemContent:"itemContent___zj1HZ",itemEmail:"itemEmail___IqeJO",itemTitle:"itemTitle___lQYBA",itemTime:"itemTime___OFq07"},b=s(7718),_=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,N=(a,m)=>{var i={};for(var t in a)g.call(a,t)&&m.indexOf(t)<0&&(i[t]=a[t]);if(a!=null&&_)for(var t of _(a))m.indexOf(t)<0&&C.call(a,t)&&(i[t]=a[t]);return i},O=(a,m,i)=>new Promise((t,p)=>{var y=l=>{try{c(i.next(l))}catch(r){p(r)}},d=l=>{try{c(i.throw(l))}catch(r){p(r)}},c=l=>l.done?t(l.value):Promise.resolve(l.value).then(y,d);c((i=i.apply(a,m)).next())});const R=a=>{var m=a,{shixunsDetail:i,globalSetting:t,loading:p,user:y,dispatch:d}=m,c=N(m,["shixunsDetail","globalSetting","loading","user","dispatch"]);const l=(0,u.useParams)(),r=(0,e.useRef)(),[f,w]=(0,e.useState)([]);(0,e.useEffect)(()=>{x()},[]);const x=()=>O(void 0,null,function*(){var o,E;r.current=((E=(o=location.pathname)==null?void 0:o.split("/"))==null?void 0:E[3])==="repository";const h=yield d({type:"shixunsDetail/getRepositoryCommit",payload:{id:l.id,secret_repository:r.current?void 0:!0}});h&&w(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(u.Link,{to:`/shixuns/${l.id}/repository`,className:`${n.colorGray} font14`},"\u8FD4\u56DE")),e.createElement("div",{className:n.content},f==null?void 0:f.map(o=>e.createElement("div",{className:`${n.item} mb5`,key:o.id},e.createElement("div",{className:n.itemContent},o.email&&e.createElement("span",{className:n.itemEmail},o.email),e.createElement("span",{className:n.itemTitle},o.title)),e.createElement("span",{className:n.itemTime},o.time))))),e.createElement(b.Z,null))};var j=(0,u.connect)(({shixunsDetail:a,loading:m,globalSetting:i,user:t})=>({shixunsDetail:a,globalSetting:i,user:t,loading:m.models.index}))(R)}}]);