forked from Gitlink/forgeplus-react
个人信息页面
This commit is contained in:
commit
5f360812c4
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,132 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "15097291",
|
||||
"name": "新建",
|
||||
"font_class": "xinjian1",
|
||||
"unicode": "e772",
|
||||
"unicode_decimal": 59250
|
||||
},
|
||||
{
|
||||
"icon_id": "11488063",
|
||||
"name": "left arrow",
|
||||
"font_class": "leftarrow",
|
||||
"unicode": "e771",
|
||||
"unicode_decimal": 59249
|
||||
},
|
||||
{
|
||||
"icon_id": "338692",
|
||||
"name": "显示器",
|
||||
"font_class": "zhongqingdianxinicon10",
|
||||
"unicode": "e770",
|
||||
"unicode_decimal": 59248
|
||||
},
|
||||
{
|
||||
"icon_id": "12099623",
|
||||
"name": "设置",
|
||||
"font_class": "huabanfuben",
|
||||
"unicode": "eb7b",
|
||||
"unicode_decimal": 60283
|
||||
},
|
||||
{
|
||||
"icon_id": "14818827",
|
||||
"name": "选中购",
|
||||
"font_class": "check-square-fill3x",
|
||||
"unicode": "e76e",
|
||||
"unicode_decimal": 59246
|
||||
},
|
||||
{
|
||||
"icon_id": "14818833",
|
||||
"name": "展开",
|
||||
"font_class": "play-square-fill3x",
|
||||
"unicode": "e76f",
|
||||
"unicode_decimal": 59247
|
||||
},
|
||||
{
|
||||
"icon_id": "14812518",
|
||||
"name": "选中框",
|
||||
"font_class": "xuanzhongkuang",
|
||||
"unicode": "e76c",
|
||||
"unicode_decimal": 59244
|
||||
},
|
||||
{
|
||||
"icon_id": "14812519",
|
||||
"name": "未选框",
|
||||
"font_class": "weixuankuang",
|
||||
"unicode": "e76d",
|
||||
"unicode_decimal": 59245
|
||||
},
|
||||
{
|
||||
"icon_id": "14775518",
|
||||
"name": "导出",
|
||||
"font_class": "daochu3x",
|
||||
"unicode": "e75f",
|
||||
"unicode_decimal": 59231
|
||||
},
|
||||
{
|
||||
"icon_id": "14775519",
|
||||
"name": "立即截止",
|
||||
"font_class": "lijijiezhi3x",
|
||||
"unicode": "e760",
|
||||
"unicode_decimal": 59232
|
||||
},
|
||||
{
|
||||
"icon_id": "14775520",
|
||||
"name": "编辑试卷",
|
||||
"font_class": "bianjishijuan3x",
|
||||
"unicode": "e761",
|
||||
"unicode_decimal": 59233
|
||||
},
|
||||
{
|
||||
"icon_id": "14775521",
|
||||
"name": "打回重做",
|
||||
"font_class": "dahuizhongzuo3x",
|
||||
"unicode": "e762",
|
||||
"unicode_decimal": 59234
|
||||
},
|
||||
{
|
||||
"icon_id": "14775567",
|
||||
"name": "集中批量批阅",
|
||||
"font_class": "filedone2X",
|
||||
"unicode": "e764",
|
||||
"unicode_decimal": 59236
|
||||
},
|
||||
{
|
||||
"icon_id": "14775587",
|
||||
"name": "组内顺序批阅",
|
||||
"font_class": "filesync3x",
|
||||
"unicode": "e766",
|
||||
"unicode_decimal": 59238
|
||||
},
|
||||
{
|
||||
"icon_id": "14775664",
|
||||
"name": "筛选-下",
|
||||
"font_class": "bianzu19xia3x",
|
||||
"unicode": "e767",
|
||||
"unicode_decimal": 59239
|
||||
},
|
||||
{
|
||||
"icon_id": "14775724",
|
||||
"name": "筛选-上",
|
||||
"font_class": "bianzu193x",
|
||||
"unicode": "e768",
|
||||
"unicode_decimal": 59240
|
||||
},
|
||||
{
|
||||
"icon_id": "14776461",
|
||||
"name": "搜索",
|
||||
"font_class": "Search3x",
|
||||
"unicode": "e769",
|
||||
"unicode_decimal": 59241
|
||||
},
|
||||
{
|
||||
"icon_id": "14788714",
|
||||
"name": "筛选-默认",
|
||||
"font_class": "bianzu19",
|
||||
"unicode": "e76a",
|
||||
"unicode_decimal": 59242
|
||||
},
|
||||
{
|
||||
"icon_id": "14776069",
|
||||
"name": "TAR",
|
||||
|
|
|
|||
|
|
@ -20,6 +20,60 @@ Created by iconfont
|
|||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="xinjian1" unicode="" d="M614.4-97.882353H301.176471c-156.611765 0-289.129412 126.494118-289.129412 289.129412V877.929412h764.988235c156.611765 0 289.129412-126.494118 289.129412-289.129412v-246.964706h-90.352941V444.235294H108.423529v-252.988235C108.423529 82.823529 192.752941-7.529412 301.176471-7.529412h313.223529v-90.352941zM108.423529 534.588235h867.388236V594.823529c0 108.423529-90.352941 192.752941-192.752941 192.752942H108.423529V534.588235z m758.964706-590.305882h-90.352941v150.588235h-144.564706v90.352941H783.058824V329.788235h90.352941v-150.588235H1024v-90.352941h-150.588235v-144.564706z" horiz-adv-x="1084" />
|
||||
|
||||
|
||||
<glyph glyph-name="leftarrow" unicode="" d="M783.872 353.877333l-0.042667 64.405334-477.610666 0.298666 225.28 225.322667-45.568 45.568L182.506667 386.048l303.829333-303.829333 45.525333 45.504-226.474666 226.453333 478.506666-0.298667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zhongqingdianxinicon10" unicode="" d="M65.201489 686.91105l893.595998 0 0-647.830595-893.595998 0L65.201489 686.91105 65.201489 686.91105zM118.817618 631.509253l0-539.708062 786.364765 0 0 542.388101-785.468348 0C118.671285 634.038866 118.7378 632.780199 118.817618 631.509253L118.817618 631.509253zM236.77003-34.191338l565.648874 0 0-52.720735-566.53915 0 0 50.039673C235.803006-35.602478 235.729328-34.337671 236.77003-34.191338L236.77003-34.191338zM236.77003-34.191338" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="huabanfuben" unicode="" d="M98 642.62h0.57c0.72 0 66.48 1 163.69 1.22a126.54 126.54 0 0 1 243.37-0.6h436.24a35 35 0 0 1 0 70H505.62a126.54 126.54 0 0 1-243 0.61c-98-0.19-164.43-1.23-165.15-1.24a35 35 0 0 1 0.54-70z m286 92.16a56.59 56.59 0 0 0 56.4-52.91 36.49 36.49 0 0 1 0-7.24 56.52 56.52 0 1 0-56.4 60.15zM98 349h486.25a126.55 126.55 0 0 1 243.38 0.6c87.55-0.19 112.49-1.19 112.76-1.2h1.51a35 35 0 0 1 1.48 70c-1.12 0-26 1.07-116.11 1.26a126.54 126.54 0 0 1-243-0.6H98a35 35 0 0 1 0-70z m607.85 91.53A56.53 56.53 0 1 0 649.32 384a56.59 56.59 0 0 0 56.53 56.53zM941.87 124.21H505.62a126.54 126.54 0 0 1-243 0.61c-98-0.19-164.43-1.23-165.15-1.24a35 35 0 0 1 0.54-70h0.57c0.72 0 66.51 1 163.69 1.23a126.54 126.54 0 0 1 243.37-0.6h436.23a35 35 0 0 1 0 70zM384 32.68a56.53 56.53 0 1 0 56.4 60.15 36.49 36.49 0 0 1 0-7.24 56.6 56.6 0 0 0-56.4-52.91z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="check-square-fill3x" unicode="" d="M940.202667 725.333333l-491.52-681.301333a74.24 74.24 0 0 0-120.490667 0L37.205333 447.317333a18.773333 18.773333 0 0 0 15.189334 29.525334h109.226666c23.893333 0 46.592-11.434667 60.586667-31.061334l166.058667-230.4 366.933333 508.586667a74.581333 74.581333 0 0 0 60.416 31.061333h109.226667c15.36 0 24.234667-17.237333 15.36-29.696z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="play-square-fill3x" unicode="" d="M969.142857-36.571429V804.571429a36.571429 36.571429 0 0 1-36.571428 36.571428H91.428571a36.571429 36.571429 0 0 1-36.571428-36.571428v-841.142858a36.571429 36.571429 0 0 1 36.571428-36.571428h841.142858a36.571429 36.571429 0 0 1 36.571428 36.571428zM501.979429 235.739429L322.779429 463.725714a12.946286 12.946286 0 0 0 10.020571 20.918857h358.253714c10.752 0 16.822857-12.434286 10.093715-20.918857L522.020571 235.739429a12.8 12.8 0 0 0-20.041142 0z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xuanzhongkuang" unicode="" d="M941.312 850.688H82.773333A37.290667 37.290667 0 0 1 45.226667 813.226667V-45.226667c0-20.650667 16.725333-37.376 37.376-37.376H941.226667a37.290667 37.290667 0 0 1 37.376 37.376V813.226667A37.290667 37.290667 0 0 1 941.226667 850.773333zM726.186667 554.666667l-245.76-340.650667a37.12 37.12 0 0 0-60.245334 0L274.602667 415.658667a9.386667 9.386667 0 0 0 7.594666 14.762666h54.613334c11.946667 0 23.296-5.717333 30.293333-15.530666l83.029333-115.2 183.466667 254.293333a37.290667 37.290667 0 0 0 30.208 15.530667h54.613333c7.68 0 12.117333-8.618667 7.68-14.848z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="weixuankuang" unicode="" d="M941.312 850.688H82.773333A37.290667 37.290667 0 0 1 45.226667 813.226667V-45.226667c0-20.650667 16.725333-37.376 37.376-37.376H941.226667a37.290667 37.290667 0 0 1 37.376 37.376V813.226667A37.290667 37.290667 0 0 1 941.226667 850.773333z m-46.677333-849.322667H129.365333V766.634667h765.269334v-765.269334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="daochu3x" unicode="" d="M651.946667 166.656l165.546666 130.645333a9.386667 9.386667 0 0 1 0 14.677334L651.946667 442.709333a9.386667 9.386667 0 0 1-15.104-7.338666v-88.746667h-378.026667a9.386667 9.386667 0 0 1-9.386667-9.301333v-65.365334c0-5.12 4.266667-9.301333 9.386667-9.301333h378.026667V174.08a9.386667 9.386667 0 0 1 15.189333-7.338667z m304.896 472.490667L767.146667 828.842667a74.325333 74.325333 0 0 1-31.146667 18.688V850.688H82.688A37.290667 37.290667 0 0 1 45.226667 813.226667v-324.266667c0-5.12 4.266667-9.386667 9.386666-9.386667h65.28c5.12 0 9.386667 4.266667 9.386667 9.386667V766.549333h158.634667v-158.634666c0-20.650667 16.725333-37.376 37.376-37.376h373.248a37.290667 37.290667 0 0 1 37.376 37.376V741.205333l158.72-158.634666V488.96c0-5.12 4.181333-9.301333 9.301333-9.301333h65.28c5.12 0 9.386667 4.266667 9.386667 9.386666V586.325333a74.410667 74.410667 0 0 1-21.845334 52.736zM661.333333 645.290667h-298.666666V766.634667h298.666666v-121.258667z m308.053334-508.586667h-65.365334a9.386667 9.386667 0 0 1-9.386666-9.386667v-125.952H129.365333V127.317333a9.386667 9.386667 0 0 1-9.386666 9.386667H54.698667a9.386667 9.386667 0 0 1-9.386667-9.386667v-172.629333c0-20.650667 16.725333-37.376 37.376-37.376H941.226667a37.290667 37.290667 0 0 1 37.376 37.376V127.317333a9.386667 9.386667 0 0 1-9.386667 9.386667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="lijijiezhi3x" unicode="" d="M1018.53952 500.650667h-298.666667a9.386667 9.386667 0 0 1-9.386666-9.386667v-55.893333c0-5.12 4.266667-9.386667 9.386666-9.386667h298.666667c5.12 0 9.386667 4.266667 9.386667 9.386667v55.978666a9.386667 9.386667 0 0 1-9.386667 9.386667z m-156.330667-158.72H719.872853a9.386667 9.386667 0 0 1-9.386666-9.301334v-55.978666c0-5.12 4.266667-9.386667 9.386666-9.386667h142.336c5.12 0 9.386667 4.266667 9.386667 9.386667v55.978666a9.386667 9.386667 0 0 1-9.386667 9.386667zM472.918187 605.184h-50.517334a13.056 13.056 0 0 1-13.141333-13.056v-289.28c0-4.266667 2.048-8.106667 5.376-10.581333L588.45952 165.461333c5.802667-4.181333 13.994667-2.986667 18.176 2.816l30.037333 40.96v0.085334a13.056 13.056 0 0 1-2.901333 18.261333L485.80352 334.421333V592.042667a12.970667 12.970667 0 0 1-12.885333 13.056z m382.037333-409.941333h-67.413333a19.2 19.2 0 0 1-16.213334-9.045334 374.528 374.528 0 0 0-170.154666-144.64 369.664 369.664 0 0 0-144.64-29.184 370.005333 370.005333 0 0 0-262.826667 108.885334A370.005333 370.005333 0 0 0 84.822187 384a369.237333 369.237333 0 0 0 108.885333 262.826667 370.005333 370.005333 0 0 0 262.826667 108.885333 370.005333 370.005333 0 0 0 262.826666-108.885333c19.882667-19.797333 37.12-41.472 51.968-64.938667a19.2 19.2 0 0 1 16.213334-9.045333h67.413333a10.666667 10.666667 0 0 1 9.557333 15.530666A456.277333 456.277333 0 0 1 461.99552 840.106667C209.920853 843.093333 0.512853 636.757333 0.000853 384.853333a456.362667 456.362667 0 0 1 456.448-457.130666 456.362667 456.362667 0 0 1 408.064 251.733333 10.666667 10.666667 0 0 1-9.557333 15.616z" horiz-adv-x="1110" />
|
||||
|
||||
|
||||
<glyph glyph-name="bianjishijuan3x" unicode="" d="M969.386667 384h-65.365334a9.386667 9.386667 0 0 1-9.386666-9.386667v-373.248H129.365333V766.634667H502.613333c5.12 0 9.301333 4.266667 9.301334 9.386666V841.301333a9.386667 9.386667 0 0 1-9.386667 9.386667H82.773333A37.290667 37.290667 0 0 1 45.226667 813.226667V-45.226667c0-20.650667 16.725333-37.376 37.376-37.376H941.226667a37.290667 37.290667 0 0 1 37.376 37.376V374.613333a9.386667 9.386667 0 0 1-9.386667 9.301334zM329.898667 357.290667L327.68 218.453333a18.773333 18.773333 0 0 1 18.688-18.858666h0.426667l137.642666 3.413333a9.642667 9.642667 0 0 1 6.314667 2.56l485.205333 484.266667a9.386667 9.386667 0 0 1 0 13.141333L830.890667 847.957333a9.642667 9.642667 0 0 1-13.312 0L332.629333 363.776a9.728 9.728 0 0 1-2.645333-6.485333z m74.069333-27.562667L824.32 749.226667l52.736-52.565334-420.608-419.669333-53.333333-1.28 0.853333 54.101333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dahuizhongzuo3x" unicode="" d="M260.010667 682.666667a9.386667 9.386667 0 0 1-9.386667-9.386667v-55.978667c0-5.12 4.266667-9.301333 9.386667-9.301333h448c5.12 0 9.386667 4.266667 9.386666 9.386667V673.28a9.386667 9.386667 0 0 1-9.386666 9.301333h-448zM484.010667 449.365333v55.978667a9.386667 9.386667 0 0 1-9.386667 9.386667H260.010667a9.386667 9.386667 0 0 1-9.386667-9.386667v-55.978667c0-5.12 4.266667-9.386667 9.386667-9.386666h214.613333c5.12 0 9.386667 4.266667 9.386667 9.386666zM428.032-12.629333H157.354667V808.704H810.666667v-401.408c0-5.12 4.266667-9.301333 9.386666-9.301333h65.28c5.12 0 9.386667 4.266667 9.386667 9.386666V855.296a37.290667 37.290667 0 0 1-37.376 37.290667h-746.666667a37.290667 37.290667 0 0 1-37.376-37.376v-914.602667c0-20.650667 16.725333-37.376 37.376-37.376h317.354667c5.12 0 9.301333 4.266667 9.301333 9.386667v65.28a9.386667 9.386667 0 0 1-9.386666 9.386666zM549.461333 122.197333a162.133333 162.133333 0 0 0 47.616 106.666667 163.84 163.84 0 0 0 241.92-11.776l-26.965333-20.906667a9.386667 9.386667 0 0 1 3.498667-16.469333l108.885333-26.282667a9.386667 9.386667 0 0 1 11.52 9.045334l0.768 111.274666a9.386667 9.386667 0 0 1-15.104 7.509334l-23.637333-18.517334a238.250667 238.250667 0 0 1-423.253334-139.776 9.386667 9.386667 0 0 1 9.301334-9.642666h56.064a9.301333 9.301333 0 0 1 9.386666 8.874666zM941.312 113.322667h-56.064a9.301333 9.301333 0 0 1-9.386667-8.874667 162.133333 162.133333 0 0 0-47.616-106.666667 163.84 163.84 0 0 0-241.92 11.861334l26.965334 20.821333a9.386667 9.386667 0 0 1-3.498667 16.469333L500.906667 73.216a9.386667 9.386667 0 0 1-11.52-8.96l-0.682667-111.36a9.386667 9.386667 0 0 1 15.018667-7.424l23.637333 18.432a238.250667 238.250667 0 0 1 423.253333 139.776 9.386667 9.386667 0 0 1-9.301333 9.642667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="filedone2X" unicode="" d="M717.312 617.301333v56.064a9.386667 9.386667 0 0 1-9.386667 9.301334h-448a9.386667 9.386667 0 0 1-9.216-9.386667v-55.978667c0-5.12 4.181333-9.301333 9.301334-9.301333h448c5.12 0 9.386667 4.266667 9.386666 9.386667z m-457.386667-102.656a9.386667 9.386667 0 0 1-9.216-9.386666v-55.893334c0-5.12 4.181333-9.386667 9.301334-9.386666h214.613333c5.12 0 9.386667 4.266667 9.386667 9.386666v55.978667a9.386667 9.386667 0 0 1-9.386667 9.386667H260.010667z m438.784-135.338666a251.989333 251.989333 0 1 1 0-503.978667 251.989333 251.989333 0 0 1 0 503.978667z m125.44-377.429334a176.213333 176.213333 0 0 0-125.44-51.882666 176.213333 176.213333 0 0 0-125.44 51.882666 176.213333 176.213333 0 0 0-51.968 125.44c0 47.36 18.432 91.989333 51.968 125.44a176.213333 176.213333 0 0 0 125.44 51.882667c47.36 0 91.904-18.432 125.44-51.882667 33.450667-33.450667 51.882667-78.08 51.882667-125.44 0-47.36-18.432-91.904-51.968-125.44z m-21.674666 214.186667H750.933333a9.216 9.216 0 0 1-7.68-3.925333l-73.984-102.4-26.965333 37.205333a9.216 9.216 0 0 1-7.68 3.84h-51.370667a9.386667 9.386667 0 0 1-7.594666-14.848l86.186666-119.125333c3.669333-5.12 11.264-5.12 14.933334 0l133.290666 184.32a9.301333 9.301333 0 0 1-7.509333 14.848z m-374.442667-228.693333H157.354667V808.704H810.666667v-401.408c0-5.12 4.266667-9.301333 9.386666-9.301333h65.28c5.12 0 9.386667 4.266667 9.386667 9.386666V855.296a37.290667 37.290667 0 0 1-37.376 37.290667h-746.666667a37.290667 37.290667 0 0 1-37.376-37.376v-914.602667c0-20.650667 16.725333-37.376 37.376-37.376h317.354667c5.12 0 9.301333 4.266667 9.301333 9.386667v65.28a9.386667 9.386667 0 0 1-9.386666 9.386666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="filesync3x" unicode="" d="M302.677333 682.666667a9.386667 9.386667 0 0 1-9.386666-9.386667v-55.978667c0-5.12 4.266667-9.301333 9.386666-9.301333h448c5.12 0 9.386667 4.266667 9.386667 9.386667V673.28a9.386667 9.386667 0 0 1-9.386667 9.301333h-448z m224-233.301334v55.978667a9.386667 9.386667 0 0 1-9.386666 9.386667H302.677333a9.386667 9.386667 0 0 1-9.386666-9.386667v-55.978667c0-5.12 4.266667-9.386667 9.386666-9.386666h214.613334c5.12 0 9.386667 4.266667 9.386666 9.386666z m-55.978666-461.994666H200.021333V808.704H853.333333v-401.408c0-5.12 4.266667-9.301333 9.386667-9.301333h65.28c5.12 0 9.386667 4.266667 9.386667 9.386666V855.296a37.290667 37.290667 0 0 1-37.376 37.290667h-746.666667a37.290667 37.290667 0 0 1-37.376-37.376v-914.602667c0-20.650667 16.725333-37.376 37.376-37.376h317.354667c5.12 0 9.301333 4.266667 9.301333 9.386667v65.28a9.386667 9.386667 0 0 1-9.386667 9.386666zM928 202.666667A10.666667 10.666667 0 0 1 938.666667 213.333333v74.666667A10.666667 10.666667 0 0 1 928 298.666667H692.650667l62.976 80.213333a10.666667 10.666667 0 0 1-8.362667 17.237333l-96.853333-0.085333a21.76 21.76 0 0 1-16.810667-8.192l-91.306667-116.053333a42.752 42.752 0 0 1 33.706667-69.12h352zM544 117.333333a10.666667 10.666667 0 0 1-10.666667-10.666666v-74.666667c0-5.888 4.778667-10.666667 10.666667-10.666667h235.349333l-62.976-80.213333a10.666667 10.666667 0 0 1 8.362667-17.237333l96.853333 0.085333a21.76 21.76 0 0 1 16.810667 8.192l91.306667 116.053333a42.752 42.752 0 0 1-33.706667 69.12H544z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="bianzu19xia3x" unicode="" d="M709.060096 564.0192H315.024896c-11.8784 0-18.432 12.4928-11.1616 20.992L500.983296 813.4656a15.0528 15.0528 0 0 0 22.1184 0l197.12-228.4544c7.2704-8.4992 0.7168-20.992-11.1616-20.992zM709.060096 203.9808H315.024896c-11.8784 0-18.432-12.4928-11.1616-20.992l197.12-228.4544a15.0528 15.0528 0 0 1 22.1184 0l197.12 228.4544c7.2704 8.4992 0.7168 20.992-11.1616 20.992z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="bianzu193x" unicode="" d="M709.060096 203.9808H315.024896c-11.8784 0-18.432-12.4928-11.1616-20.992l197.12-228.4544a15.0528 15.0528 0 0 1 22.1184 0l197.12 228.4544c7.2704 8.4992 0.7168 20.992-11.1616 20.992zM709.060096 564.0192H315.024896c-11.8784 0-18.432 12.4928-11.1616 20.992L500.983296 813.4656a15.0528 15.0528 0 0 0 22.1184 0l197.12-228.4544c7.2704-8.4992 0.7168-20.992-11.1616-20.992z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="Search3x" unicode="" d="M966.436571-7.460571L669.622857 289.353143c46.08 59.538286 70.948571 132.388571 70.948572 208.969143a340.845714 340.845714 0 0 1-100.425143 242.395428A340.333714 340.333714 0 0 1 397.677714 841.142857a340.845714 340.845714 0 0 1-242.395428-100.425143A340.114286 340.114286 0 0 1 54.857143 498.322286c0-91.574857 35.84-177.737143 100.425143-242.468572a340.114286 340.114286 0 0 1 242.395428-100.425143 340.114286 340.114286 0 0 1 208.822857 70.875429l296.813715-296.667429c3.657143-3.657143 9.581714-3.657143 13.238857 0l49.810286 49.737143a9.362286 9.362286 0 0 1 0 13.165715z m-387.657142 324.754285a254.610286 254.610286 0 0 0-181.101715-75.044571 254.610286 254.610286 0 0 0-181.028571 75.044571 254.610286 254.610286 0 0 0-74.971429 180.955429c0 68.388571 26.697143 132.754286 74.971429 181.028571a254.610286 254.610286 0 0 0 181.028571 75.044572c68.388571 0 132.754286-26.550857 181.028572-74.971429a254.610286 254.610286 0 0 0 75.044571-181.028571c0-68.388571-26.697143-132.754286-75.044571-181.028572z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="bianzu19" unicode="" d="M709.060096 203.9808H315.024896c-11.8784 0-18.432-12.4928-11.1616-20.992l197.12-228.4544a15.0528 15.0528 0 0 1 22.1184 0l197.12 228.4544c7.2704 8.4992 0.7168 20.992-11.1616 20.992zM709.060096 564.0192H315.024896c-11.8784 0-18.432 12.4928-11.1616 20.992L500.983296 813.4656a15.0528 15.0528 0 0 0 22.1184 0l197.12-228.4544c7.2704-8.4992 0.7168-20.992-11.1616-20.992z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="TAR" unicode="" d="M916.945455-109.381818H139.636364c-69.818182 0-130.327273 55.854545-130.327273 130.327273V756.363636C9.309091 826.181818 65.163636 886.690909 139.636364 886.690909h572.509091l330.472727-302.545454v-563.2c0-69.818182-55.854545-130.327273-125.672727-130.327273zM139.636364 812.218182c-32.581818 0-55.854545-23.272727-55.854546-55.854546v-735.418181c0-32.581818 27.927273-55.854545 55.854546-55.854546h777.309091c32.581818 0 55.854545 27.927273 55.854545 55.854546V551.563636l-288.581818 260.654546H139.636364zM1010.036364 556.218182h-344.436364V849.454545h69.818182v-223.418181h274.618182zM386.327273 356.072727h-93.090909v-293.236363h-37.236364v293.236363h-93.090909v37.236364h228.072727v-37.236364zM660.945455 67.490909h-41.89091l-32.581818 93.090909h-139.636363l-32.581819-93.090909H372.363636l125.672728 325.818182h37.236363l125.672728-325.818182z m-88.436364 125.672727l-51.2 139.636364c0 4.654545-4.654545 13.963636-4.654546 23.272727 0-9.309091-4.654545-18.618182-4.654545-23.272727l-51.2-139.636364h111.709091zM940.218182 67.490909h-46.545455l-55.854545 93.090909c-4.654545 9.309091-9.309091 13.963636-13.963637 23.272727l-13.963636 13.963637c-4.654545 4.654545-9.309091 4.654545-13.963636 9.309091-4.654545 0-13.963636 4.654545-18.618182 4.654545H744.727273v-139.636363h-37.236364v325.818181h97.745455c13.963636 0 27.927273 0 37.236363-4.654545 13.963636-4.654545 23.272727-9.309091 32.581818-13.963636 9.309091-9.309091 13.963636-18.618182 18.618182-27.927273 4.654545-9.309091 9.309091-23.272727 9.309091-37.236364 0-9.309091 0-23.272727-4.654545-32.581818-4.654545-9.309091-9.309091-18.618182-13.963637-23.272727-4.654545-9.309091-13.963636-13.963636-23.272727-18.618182l-27.927273-13.963636c4.654545-4.654545 9.309091-4.654545 13.963637-9.309091 4.654545-4.654545 9.309091-4.654545 9.309091-9.309091s9.309091-9.309091 9.309091-13.963637c4.654545-4.654545 9.309091-9.309091 13.963636-18.618181l60.509091-107.054546zM744.727273 356.072727v-116.363636h51.2c9.309091 0 18.618182 0 27.927272 4.654545 9.309091 4.654545 13.963636 9.309091 23.272728 13.963637 4.654545 4.654545 9.309091 13.963636 13.963636 18.618182 4.654545 9.309091 4.654545 18.618182 4.654546 27.927272 0 18.618182-4.654545 32.581818-18.618182 41.890909-9.309091 9.309091-27.927273 13.963636-51.2 13.963637H744.727273z" horiz-adv-x="1070" />
|
||||
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 450 KiB After Width: | Height: | Size: 466 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -220,8 +220,6 @@ class App extends Component {
|
|||
|
||||
render() {
|
||||
let { mygetHelmetapi } = this.state;
|
||||
// console.log("appappapp");
|
||||
// console.log(mygetHelmetapi);
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<ConfigProvider locale={zhCN}>
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export function initAxiosInterceptors(props) {
|
|||
// TODO 读取到package.json中的配置?
|
||||
var proxy = "http://localhost:3000"
|
||||
// proxy = "https://pre-newweb.educoder.net"
|
||||
// var proxy = "https://testforgeplus.trustie.net/"
|
||||
// proxy = "https://testforgeplus.trustie.net/"
|
||||
|
||||
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
|
||||
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import * as monaco from 'monaco-editor'
|
||||
import ResizeObserver from 'resize-observer-polyfill';
|
||||
import './TPIMonacoConfig'
|
||||
import './index.css'
|
||||
|
||||
function processSize(size) {
|
||||
|
|
@ -10,24 +8,6 @@ function processSize(size) {
|
|||
function noop() { }
|
||||
let __prevent_trigger_change_event = false
|
||||
|
||||
function debounce(func, wait, immediate) {
|
||||
var timeout
|
||||
return function () {
|
||||
var context = this, args = arguments
|
||||
var later = function () {
|
||||
timeout = null
|
||||
if (!immediate) func.apply(context, args)
|
||||
};
|
||||
var callNow = immediate && !timeout
|
||||
clearTimeout(timeout)
|
||||
timeout = setTimeout(later, wait)
|
||||
if (callNow) func.apply(context, args)
|
||||
}
|
||||
}
|
||||
|
||||
//monaco-language
|
||||
// 'abap' | 'apex' | 'azcli' | 'bat' | 'cameligo' | 'clojure' | 'coffee' | 'cpp' | 'csharp' | 'csp' | 'css' | 'dockerfile' | 'fsharp' | 'go' | 'graphql' | 'handlebars' | 'html' | 'ini' | 'java' | 'javascript' | 'json' | 'kotlin' | 'less' | 'lua' | 'markdown' | 'mips' | 'msdax' | 'mysql' | 'objective-c' | 'pascal' | 'pascaligo' | 'perl' | 'pgsql' | 'php' | 'postiats' | 'powerquery' | 'powershell' | 'pug' | 'python' | 'r' | 'razor' | 'redis' | 'redshift' | 'restructuredtext' | 'ruby' | 'rust' | 'sb' | 'scheme' | 'scss' | 'shell' | 'solidity' | 'sophia' | 'sql' | 'st' | 'swift' | 'tcl' | 'twig' | 'typescript' | 'vb' | 'xml' | 'yaml';
|
||||
|
||||
const DICT = {
|
||||
"Python3.6": 'python',
|
||||
"Python2.7": 'python',
|
||||
|
|
@ -86,6 +66,7 @@ export function getLanguageByMirrorName(mirror_name = []) {
|
|||
return DICT[lang] || lang
|
||||
}
|
||||
|
||||
let monaco = null
|
||||
export default ({
|
||||
width = '100%',
|
||||
height = '100%',
|
||||
|
|
@ -117,7 +98,7 @@ export default ({
|
|||
ro.observe(editorEl.current)
|
||||
}
|
||||
return ro
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
let instance = editor.current.instance
|
||||
|
|
@ -143,56 +124,57 @@ export default ({
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
editor.current.instance = monaco.editor.create(
|
||||
editorEl.current, {
|
||||
value,
|
||||
language: getLanguageByMirrorName(language),
|
||||
theme,
|
||||
...options
|
||||
},
|
||||
overrideServices
|
||||
)
|
||||
const instance = editor.current.instance
|
||||
window.editor_monaco = instance //兼容之前的业务代码
|
||||
editorDidMount(instance, monaco)
|
||||
import(/* webpackChunkName: "monaco-editor" */ 'monaco-editor/esm/vs/editor/editor.api.js').then((mod) => {
|
||||
monaco = mod
|
||||
editor.current.instance = monaco.editor.create(
|
||||
editorEl.current, {
|
||||
value,
|
||||
language: getLanguageByMirrorName(language),
|
||||
theme,
|
||||
...options
|
||||
},
|
||||
overrideServices
|
||||
)
|
||||
const instance = editor.current.instance
|
||||
editorDidMount(instance, monaco)
|
||||
|
||||
editor.current.subscription = instance.onDidChangeModelContent(event => {
|
||||
if (!__prevent_trigger_change_event) {
|
||||
onChange(instance.getValue(), event);
|
||||
editor.current.subscription = instance.onDidChangeModelContent(event => {
|
||||
if (!__prevent_trigger_change_event) {
|
||||
onChange(instance.getValue(), event);
|
||||
}
|
||||
})
|
||||
|
||||
if (onEditBlur) {
|
||||
instance.onDidBlurEditorWidget(() => { onEditBlur(instance.getValue()) })
|
||||
}
|
||||
})
|
||||
|
||||
if (onEditBlur) {
|
||||
instance.onDidBlurEditorWidget(() => { onEditBlur(instance.getValue()) })
|
||||
}
|
||||
if (onFocus) {
|
||||
instance.onDidFocusEditorText(() => { onFocus(instance.getValue()) })
|
||||
}
|
||||
if (forbidCopy) {
|
||||
instance.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_C, () => null)
|
||||
instance.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_V, () => null)
|
||||
instance.onDidPaste((pos) => { editor.current.pastePos = pos })
|
||||
window.addEventListener('paste', onPaste)
|
||||
}
|
||||
|
||||
let ro = onLayout()
|
||||
setInit(true)
|
||||
|
||||
return () => {
|
||||
const el = editor.current.instance
|
||||
el.dispose()
|
||||
const model = el.getModel()
|
||||
if (model) {
|
||||
model.dispose()
|
||||
}
|
||||
if (editor.current.subscription) {
|
||||
editor.current.subscription.dispose()
|
||||
if (onFocus) {
|
||||
instance.onDidFocusEditorText(() => { onFocus(instance.getValue()) })
|
||||
}
|
||||
if (forbidCopy) {
|
||||
window.removeEventListener('paste', onPaste)
|
||||
instance.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_V, () => null)
|
||||
instance.onDidPaste((pos) => { editor.current.pastePos = pos })
|
||||
window.addEventListener('paste', onPaste)
|
||||
}
|
||||
ro.unobserve(editorEl.current)
|
||||
}
|
||||
|
||||
let ro = onLayout()
|
||||
setInit(true)
|
||||
|
||||
return () => {
|
||||
const el = editor.current.instance
|
||||
el.dispose()
|
||||
const model = el.getModel()
|
||||
if (model) {
|
||||
model.dispose()
|
||||
}
|
||||
if (editor.current.subscription) {
|
||||
editor.current.subscription.dispose()
|
||||
}
|
||||
if (forbidCopy) {
|
||||
window.removeEventListener('paste', onPaste)
|
||||
}
|
||||
ro.unobserve(editorEl.current)
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -200,7 +182,6 @@ export default ({
|
|||
if (instance && init) {
|
||||
let lang = getLanguageByMirrorName(language)
|
||||
monaco.editor.setModelLanguage(instance.getModel(), lang)
|
||||
console.log(`model language was changed to ${instance.getModel().getLanguageIdentifier().language}`)
|
||||
}
|
||||
}, [language, init])
|
||||
|
||||
|
|
@ -235,4 +216,42 @@ export default ({
|
|||
return (
|
||||
<div id='extend-challenge-file-edit' ref={editorEl} style={style} ></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export function DiffEditor({ width, height, original, modified, language, options = {} }) {
|
||||
const editorEl = useRef()
|
||||
|
||||
useEffect(() => {
|
||||
if (editorEl.current) {
|
||||
import(/* webpackChunkName: "monaco-editor" */ 'monaco-editor/esm/vs/editor/editor.api.js').then((mod) => {
|
||||
monaco = mod
|
||||
editorEl.current.instance = monaco.editor.createDiffEditor(editorEl.current, {
|
||||
readOnly: true,
|
||||
...options,
|
||||
})
|
||||
})
|
||||
}
|
||||
}, [editorEl.current])
|
||||
|
||||
useEffect(() => {
|
||||
if (editorEl.current) {
|
||||
let instance = editorEl.current.instance
|
||||
instance.setModel({
|
||||
original: monaco.editor.createModel(original, language),
|
||||
modified: monaco.editor.createModel(modified, language)
|
||||
})
|
||||
}
|
||||
|
||||
}, [original, modified, language, editorEl.current])
|
||||
|
||||
const fixedWidth = processSize(width)
|
||||
const fixedHeight = processSize(height)
|
||||
const style = {
|
||||
width: fixedWidth,
|
||||
height: fixedHeight
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref={editorEl} style={style} ></div>
|
||||
)
|
||||
}
|
||||
|
|
@ -2,32 +2,62 @@ import React , { Component } from 'react';
|
|||
import { Dropdown , Icon , Input } from 'antd';
|
||||
|
||||
import "./branch.css"
|
||||
import axios from 'axios';
|
||||
const $ = window.$;
|
||||
class SelectBranch extends Component{
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state={
|
||||
visible:false,
|
||||
value:undefined
|
||||
value:undefined,
|
||||
search:"branch",
|
||||
tags:undefined
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
this.getTagList();
|
||||
|
||||
document.body.addEventListener('click', e => {
|
||||
if (e.target && (e.target.matches('#m-btn') || e.target.matches("#input-btn")|| e.target.matches("#ul-btn"))) {
|
||||
let v= this.state.visible;
|
||||
if(e.target.className && e.target.className.animVal!=undefined) return;
|
||||
|
||||
let s = e.target && e.target.className && e.target.className.indexOf('showtag')> -1;
|
||||
let classF =e.target && e.target.className && e.target.className.indexOf("downobject") > -1 || e.target.className==="ant-input OptionsInput";
|
||||
if(e.target && e.target.className === "ant-dropdown-trigger" || s){
|
||||
this.setState({
|
||||
visible:!v,
|
||||
value:undefined
|
||||
})
|
||||
return;
|
||||
}else if (classF) {
|
||||
return;
|
||||
}
|
||||
if($(e.target)[0].className === "task-hide ulALink")return;
|
||||
this.setState({
|
||||
visible:false,
|
||||
value:undefined
|
||||
})
|
||||
} else{
|
||||
this.setState({
|
||||
visible:false,
|
||||
value:undefined
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ChangeVisible=(visible)=>{
|
||||
this.setState({
|
||||
visible:!visible
|
||||
})
|
||||
componentDidUpdate=(prevProps)=>{
|
||||
if(this.props.repo_id && this.props.repo_id!=prevProps.repo_id){
|
||||
this.getTagList();
|
||||
}
|
||||
}
|
||||
getTagList=()=>{
|
||||
const { repo_id } = this.props;
|
||||
if(repo_id){
|
||||
const url = `/repositories/${repo_id}/tags.json`;
|
||||
axios.get(url).then((result)=>{
|
||||
if(result){
|
||||
this.setState({
|
||||
tags:result.data
|
||||
})
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
InputClick=(e)=>{
|
||||
|
|
@ -56,15 +86,31 @@ class SelectBranch extends Component{
|
|||
changeBranch && changeBranch(value);
|
||||
}
|
||||
|
||||
// 切换搜索的列表
|
||||
changeSearch=(search)=>{
|
||||
this.setState({
|
||||
search
|
||||
})
|
||||
}
|
||||
|
||||
render(){
|
||||
const { visible , value } = this.state;
|
||||
const { visible , value , search , tags } = this.state;
|
||||
const { branchs , branch } = this.props;
|
||||
|
||||
let branchsFilter = value ? (branchs && branchs.length>0 && branchs.filter(item=>item.name.indexOf(value)>-1)):branchs;
|
||||
let array = branchs;
|
||||
if(search === "tag" && tags.length>0){
|
||||
array = tags;
|
||||
}
|
||||
|
||||
let branchsFilter = value ? (array && array.length>0 && array.filter(item=>item.name.indexOf(value)>-1)) : array;
|
||||
const menu = (
|
||||
<div className="branchOptions" id="m-btn" onClick={this.stopPropagations}>
|
||||
<div className="padding10 bor-bottom-greyE">
|
||||
<Input placeholder="请输入分支名称进行搜索" autocomplete="off" id="input-btn" value={value} className="OptionsInput" onChange={this.changeValue} onClick={this.InputClick}/>
|
||||
<div className="downobject padding10 bor-bottom-greyE">
|
||||
<Input placeholder="请输入分支或标签名称搜索" autocomplete="off" id="input-btn" value={value} className="OptionsInput" onChange={this.changeValue} onClick={this.InputClick}/>
|
||||
<ul className="navUl" id="navUl-btn">
|
||||
<li className={search ==="branch"?"downobject active":"downobject"} onClick={()=>this.changeSearch("branch")}><i className="iconfont icon-fenzhi1 font-14 mr3"></i>分支列表</li>
|
||||
<li className={search ==="tag"?"downobject active":"downobject"} onClick={()=>this.changeSearch("tag")}><i className="iconfont icon-biaoqian3 font-14 mr3"></i>标签列表</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul className="OptionsUl" id="ul-btn">
|
||||
{
|
||||
|
|
@ -78,16 +124,16 @@ class SelectBranch extends Component{
|
|||
</div>
|
||||
);
|
||||
return(
|
||||
<div className="branchDropdown f-wrap-alignCenter" onClick={()=>this.ChangeVisible(visible)}>
|
||||
<div className="branchDropdown f-wrap-alignCenter" >
|
||||
<Dropdown overlay={menu} trigger={['click']} placement="bottomLeft" visible={visible}>
|
||||
<span>
|
||||
<span id="down-btn">
|
||||
<span>
|
||||
<span className="color-grey-9 mr3">分支:</span>
|
||||
<span className="color-grey-9 mr3">{search ==="branch"?"分支":"标签"}:</span>
|
||||
<a className="ant-dropdown-link">
|
||||
{branch}
|
||||
</a>
|
||||
</span>
|
||||
<Icon type="down" />
|
||||
<i className="showtag iconfont icon-xiajiantou font-14 color-grey-9" />
|
||||
</span>
|
||||
</Dropdown>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -43,4 +43,16 @@
|
|||
padding-left: 4px;
|
||||
line-height: 32px;
|
||||
width: 100%;
|
||||
}
|
||||
.navUl{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.navUl li{
|
||||
cursor: pointer;
|
||||
}
|
||||
.navUl li.active{
|
||||
color:#5091FF;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
ul.ant-menu{
|
||||
border-right: none;
|
||||
}
|
||||
ul.ant-menu li:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
li.ant-menu-item{
|
||||
margin:0px!important;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import React from "react";
|
||||
import { Input } from "antd";
|
||||
|
||||
const { Search } = Input;
|
||||
export default ({ placeholder , onSearch }) => {
|
||||
return (
|
||||
<Search
|
||||
placeholder={placeholder}
|
||||
enterButton={'搜索'}
|
||||
onSearch={onSearch}
|
||||
width="300px"
|
||||
></Search>
|
||||
)
|
||||
};
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
import React from 'react';
|
||||
import {Popover} from 'antd';
|
||||
import './Component.scss';
|
||||
|
||||
export default (({menu , children})=>{
|
||||
return(
|
||||
<Popover content={menu} trigger={['click']} placement='bottom'>
|
||||
{children}
|
||||
</Popover>
|
||||
)
|
||||
})
|
||||
|
|
@ -59,17 +59,14 @@ class CoderRootCommit extends Component{
|
|||
}).catch((error)=>{console.log(error)})
|
||||
}
|
||||
|
||||
// 切换分支
|
||||
// 切换分支 search:tag为根据标签搜索
|
||||
changeBranch=(value)=>{
|
||||
const { branchList } = this.props;
|
||||
let branchLastCommit = branchList && branchList.filter(item=>item.name === value)[0];
|
||||
|
||||
const { page , limit } = this.state;
|
||||
this.setState({
|
||||
isSpin:true,
|
||||
branch:branchLastCommit.name,
|
||||
branch:value,
|
||||
})
|
||||
this.getCommitList(branchLastCommit.name , page , limit);
|
||||
this.getCommitList(value , page , limit);
|
||||
}
|
||||
|
||||
ChangePage=(page)=>{
|
||||
|
|
@ -79,8 +76,7 @@ class CoderRootCommit extends Component{
|
|||
|
||||
render(){
|
||||
const { branch , data , dataCount , limit , page , isSpin } = this.state;
|
||||
const { branchs } = this.props;
|
||||
|
||||
const { branchs , projectDetail } = this.props;
|
||||
const title =()=>{
|
||||
return(
|
||||
<div className="f-wrap-between" style={{alignItems:"center"}}>
|
||||
|
|
@ -102,7 +98,7 @@ class CoderRootCommit extends Component{
|
|||
<React.Fragment>
|
||||
<div className="main">
|
||||
<div className="f-wrap-between">
|
||||
<SelectBranch branch={branch} branchs={branchs} changeBranch={this.changeBranch}></SelectBranch>
|
||||
<SelectBranch repo_id={projectDetail && projectDetail.repo_id} branch={branch} branchs={branchs} changeBranch={this.changeBranch}></SelectBranch>
|
||||
</div>
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="commonBox">
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ class CoderRootDirectory extends Component{
|
|||
address:"http",
|
||||
branch:"master",
|
||||
filePath:undefined,
|
||||
http_url:undefined,
|
||||
subFileType:undefined,
|
||||
readMeContent:undefined,
|
||||
readMeFile: undefined,
|
||||
|
|
@ -37,9 +36,12 @@ class CoderRootDirectory extends Component{
|
|||
branchList:undefined,
|
||||
fileDetail:undefined,
|
||||
branchLastCommit:undefined,
|
||||
lastCommitAuthor:undefined,
|
||||
|
||||
rootList:undefined,
|
||||
readOnly: true
|
||||
readOnly: true,
|
||||
zip_url:undefined,
|
||||
tar_url:undefined
|
||||
}
|
||||
}
|
||||
changeAddress=(address)=>{
|
||||
|
|
@ -102,16 +104,22 @@ class CoderRootDirectory extends Component{
|
|||
}
|
||||
}).then((result)=>{
|
||||
if(result){
|
||||
if(result && result.data && result.data.length > 0){
|
||||
this.setState({
|
||||
filePath:undefined,
|
||||
fileDetail:undefined,
|
||||
isSpin: false
|
||||
})
|
||||
this.renderData(result.data);
|
||||
let last_commit = result.data && result.data.last_commit;
|
||||
let entries = result.data && result.data.entries;
|
||||
this.setState({
|
||||
filePath:undefined,
|
||||
fileDetail:undefined,
|
||||
isSpin: false,
|
||||
branchLastCommit:last_commit && last_commit.commit,
|
||||
lastCommitAuthor:last_commit && (last_commit.author || (last_commit.commit && last_commit.commit.author)),
|
||||
zip_url:result.data.zip_url,
|
||||
tar_url:result.data.tar_url
|
||||
})
|
||||
if(entries && entries.length > 0){
|
||||
this.renderData(entries);
|
||||
}
|
||||
this.setState({
|
||||
rootList:result.data,
|
||||
rootList:entries,
|
||||
subFileType:true
|
||||
})
|
||||
}
|
||||
|
|
@ -170,11 +178,12 @@ class CoderRootDirectory extends Component{
|
|||
ref:ref || branch
|
||||
}
|
||||
}).then((result)=>{
|
||||
if(result && result.data && result.data.length > 0){
|
||||
let entries = result.data && result.data.entries
|
||||
if(entries && entries.length > 0){
|
||||
// 当前返回的子目录只有一条数据,且这条数据返回的是文件类型
|
||||
if(result.data.length === 1 && result.data[0].type === "file"){
|
||||
if(entries.length === 1 && entries[0].type === "file"){
|
||||
this.setState({
|
||||
fileDetail:result.data,
|
||||
fileDetail:entries,
|
||||
rootList:undefined,
|
||||
isSpin:false,
|
||||
subFileType:false
|
||||
|
|
@ -182,10 +191,12 @@ class CoderRootDirectory extends Component{
|
|||
}else{
|
||||
this.setState({
|
||||
fileDetail:undefined,
|
||||
rootList:result.data,
|
||||
isSpin:false
|
||||
rootList:entries,
|
||||
isSpin:false,
|
||||
branchLastCommit:result.data.last_commit && result.data.last_commit.commit,
|
||||
lastCommitAuthor:result.data.last_commit && (result.data.last_commit.author || (result.data.last_commit.commit && result.data.last_commit.commit.author))
|
||||
})
|
||||
this.renderData(result.data)
|
||||
this.renderData(entries);
|
||||
}
|
||||
}
|
||||
}).catch((error)=>{
|
||||
|
|
@ -252,30 +263,24 @@ class CoderRootDirectory extends Component{
|
|||
|
||||
// 选择分支
|
||||
changeBranch=(value)=>{
|
||||
const { branchList } = this.props;
|
||||
let branchLastCommit = branchList && branchList.length >0 && branchList.filter(item=>item.name === value)[0];
|
||||
if(branchLastCommit){
|
||||
this.setState({
|
||||
branch:value,
|
||||
isSpin: true
|
||||
})
|
||||
let { search } = this.props.history.location;
|
||||
if(search && search.indexOf("?url=")>-1){
|
||||
let url =search.split("?url=")[1];
|
||||
this.setState({
|
||||
branch:value,
|
||||
branchLastCommit,
|
||||
http_url:branchLastCommit && branchLastCommit.http_url,
|
||||
isSpin: true
|
||||
filePath:url
|
||||
})
|
||||
let { search } = this.props.history.location;
|
||||
if(search && search.indexOf("?url=")>-1){
|
||||
let url =search.split("?url=")[1];
|
||||
this.setState({
|
||||
filePath:url
|
||||
})
|
||||
this.getFileDetail(url, value);
|
||||
}else{
|
||||
this.getProjectRoot( value );
|
||||
}
|
||||
this.getFileDetail(url, value);
|
||||
}else{
|
||||
this.getProjectRoot( value );
|
||||
}
|
||||
}
|
||||
render(){
|
||||
const { rootList , branch ,filePath , fileDetail , subFileType , readMeContent, isSpin } = this.state;
|
||||
const { branchLastCommit , http_url , isManager , isDeveloper } = this.props;
|
||||
const { branchLastCommit , lastCommitAuthor , rootList , branch ,filePath , fileDetail , subFileType , readMeContent, isSpin , zip_url , tar_url} = this.state;
|
||||
const { isManager , isDeveloper , projectDetail } = this.props;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const columns = [
|
||||
|
|
@ -304,23 +309,26 @@ class CoderRootDirectory extends Component{
|
|||
}
|
||||
];
|
||||
const title = () =>{
|
||||
if(branchLastCommit && branchLastCommit.last_commit){
|
||||
if(branchLastCommit){
|
||||
return(
|
||||
<div className="f-wrap-alignCenter">
|
||||
{
|
||||
branchLastCommit.author ?
|
||||
lastCommitAuthor ?
|
||||
<React.Fragment>
|
||||
<Link to={`/users/${branchLastCommit.author.login}/projects`} className="show-user-link">
|
||||
<img src={getImageUrl(`images/${branchLastCommit.author.image_url}`)} className="radius mr10" width="32" height="32" alt=""/>
|
||||
<span className="mr15">{branchLastCommit.author.login}</span>
|
||||
</Link>
|
||||
|
||||
{
|
||||
lastCommitAuthor.login ?
|
||||
<Link to={`/users/${lastCommitAuthor.login}/projects`} className="show-user-link">
|
||||
<img src={getImageUrl(`images/${lastCommitAuthor.image_url}`)} className="radius mr10" width="32" height="32" alt=""/>
|
||||
<span className="mr15">{lastCommitAuthor.name}</span>
|
||||
</Link>:
|
||||
<span className="mr15">{lastCommitAuthor.name}</span>
|
||||
}
|
||||
</React.Fragment>
|
||||
:""
|
||||
}
|
||||
<span className="color-blue flex-1 hide-1">{branchLastCommit.last_commit.message}</span>
|
||||
<span>{branchLastCommit.last_commit.time_from_now}</span>
|
||||
<span className="commitKey">{truncateCommitId(branchLastCommit.last_commit.id)}</span>
|
||||
<span className="color-blue flex-1 hide-1">{branchLastCommit.message}</span>
|
||||
<span>{branchLastCommit.time_from_now}</span>
|
||||
<span className="commitKey">{truncateCommitId(branchLastCommit.sha)}</span>
|
||||
</div>
|
||||
)
|
||||
}else{
|
||||
|
|
@ -328,26 +336,21 @@ class CoderRootDirectory extends Component{
|
|||
}
|
||||
}
|
||||
|
||||
const downloadUrl = ()=>{
|
||||
if(branchLastCommit && branchLastCommit.zip_url){
|
||||
return(
|
||||
<Menu>
|
||||
<Menu.Item><a href={branchLastCommit.zip_url}>ZIP</a></Menu.Item>
|
||||
<Menu.Item><a href={branchLastCommit.tar_url}>TAR.GZ</a></Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
}
|
||||
}
|
||||
const downloadUrl = ()=>(
|
||||
<Menu>
|
||||
{zip_url && <Menu.Item><a href={zip_url}>ZIP</a></Menu.Item> }
|
||||
{tar_url && <Menu.Item><a href={tar_url}>TAR.GZ</a></Menu.Item> }
|
||||
</Menu>
|
||||
)
|
||||
|
||||
const urlRoot = filePath === undefined ? '':`/${filePath}`;
|
||||
const { projectDetail } = this.props;
|
||||
let array = filePath && filePath.split("/");
|
||||
return(
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="main">
|
||||
<div className="f-wrap-between mb20">
|
||||
<div className="f-wrap-alignCenter">
|
||||
<SelectBranch branch={branch} changeBranch={this.changeBranch} {...this.props} {...this.state}></SelectBranch>
|
||||
<SelectBranch repo_id={projectDetail && projectDetail.repo_id} branch={branch} changeBranch={this.changeBranch} {...this.props} {...this.state}></SelectBranch>
|
||||
|
||||
{
|
||||
filePath &&
|
||||
|
|
@ -381,7 +384,7 @@ class CoderRootDirectory extends Component{
|
|||
</p>
|
||||
}
|
||||
{
|
||||
http_url && <CloneAddress http_url={http_url} downloadUrl={downloadUrl} showNotification={this.props.showNotification}></CloneAddress>
|
||||
projectDetail && projectDetail.clone_url && <CloneAddress http_url={projectDetail.clone_url} downloadUrl={downloadUrl} showNotification={this.props.showNotification}></CloneAddress>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,333 +0,0 @@
|
|||
import React , { Component } from 'react';
|
||||
import {Menu, Spin} from 'antd';
|
||||
import { getImageUrl , markdownToHTML } from 'educoder';
|
||||
import { Router , Route , Link } from 'react-router-dom';
|
||||
import Top from './DetailTop';
|
||||
|
||||
import './list.css';
|
||||
|
||||
import SelectBranch from '../Branch/SelectBranch';
|
||||
import CloneAddress from '../Branch/CloneAddress';
|
||||
import RootTable from './RootTable';
|
||||
import CoderRootFileDetail from './CoderRootFileDetail';
|
||||
import NullData from './NullData';
|
||||
|
||||
import axios from 'axios';
|
||||
/**
|
||||
* address:http和SSH,http_url(对应git地址)
|
||||
* branch:当前分支
|
||||
* filePath:点击目录时当前目录的路径
|
||||
* subfileType:保存当前点击目录的文件类型(显示目录列表时才显示新建文件,如果点击的是文件就不显示新建文件按钮)
|
||||
* readMeContent:根目录下面的readme文件内容
|
||||
*/
|
||||
class CoderRootDirectorytext extends Component{
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state={
|
||||
address:"http",
|
||||
branch:"master",
|
||||
filePath:[],
|
||||
http_url:undefined,
|
||||
subFileType:"",
|
||||
readMeContent:undefined,
|
||||
|
||||
isSpin:true,
|
||||
|
||||
branchList:undefined,
|
||||
fileDetail:undefined,
|
||||
branchLastCommit:undefined,
|
||||
|
||||
rootData:undefined
|
||||
}
|
||||
}
|
||||
changeAddress=(address)=>{
|
||||
this.setState({
|
||||
address
|
||||
})
|
||||
}
|
||||
|
||||
componentDidMount=()=>{
|
||||
|
||||
let { search } = this.props.history.location;
|
||||
let branchName = undefined;
|
||||
if(search && search.indexOf("branch")>-1){
|
||||
branchName = search.split("=")[1];
|
||||
this.setState({
|
||||
branch:branchName
|
||||
})
|
||||
}
|
||||
const { branch } = this.state;
|
||||
this.getProjectRoot(branchName || branch);
|
||||
}
|
||||
|
||||
// 获取根目录
|
||||
getProjectRoot=(branch)=>{
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/repositories/${projectsId}/entries.json`;
|
||||
axios.get((url),{
|
||||
params:{
|
||||
branch
|
||||
}
|
||||
}).then((result)=>{
|
||||
if(result){
|
||||
if(result && result.data && result.data.length > 0){
|
||||
this.setState({
|
||||
filePath:[],
|
||||
fileDetail:undefined,
|
||||
isSpin: false
|
||||
})
|
||||
this.renderData(result.data);
|
||||
}
|
||||
this.setState({
|
||||
rootData:result.data
|
||||
})
|
||||
}
|
||||
|
||||
}).catch((error)=>{})
|
||||
}
|
||||
|
||||
ChangeFile=(arr,index)=>{
|
||||
this.renderUrl(arr.name,arr.path,arr.type);
|
||||
//点击直接跳转页面 加载一次路由
|
||||
this.getFileDetail(arr);
|
||||
this.setState({
|
||||
subFileType:arr.type
|
||||
})
|
||||
}
|
||||
|
||||
renderUrl=(name,path,type)=>{
|
||||
let list =[];
|
||||
const { filePath } = this.state;
|
||||
if(path.indexOf("/")){
|
||||
const array = path.split("/");
|
||||
let str = "";
|
||||
array.map((i,k)=>{
|
||||
str += '/'+i;
|
||||
return list.push({
|
||||
index:k,
|
||||
name:i,
|
||||
path:str.substr(1),
|
||||
type:(filePath && filePath.length>0) ? (filePath[k] ? filePath[k].type : type) : type
|
||||
})
|
||||
})
|
||||
}else{
|
||||
list.push({
|
||||
index:0,
|
||||
name,path,type
|
||||
})
|
||||
}
|
||||
this.setState({
|
||||
filePath:list
|
||||
})
|
||||
}
|
||||
|
||||
// 获取子目录
|
||||
getFileDetail=(arr)=>{
|
||||
const { projectsId } = this.props.match.params;
|
||||
const { branch } = this.state;
|
||||
const url =`/repositories/${projectsId}/sub_entries.json`;
|
||||
|
||||
axios.get(url,{
|
||||
params:{
|
||||
filepath:arr.path,
|
||||
ref:branch
|
||||
}
|
||||
}).then((result)=>{
|
||||
if(result && result.data && result.data.length > 0){
|
||||
if(arr.type==="file"){
|
||||
this.setState({
|
||||
fileDetail:result.data[0],
|
||||
rootList:undefined
|
||||
})
|
||||
}else{
|
||||
if(arr.type===""){
|
||||
this.props.showNotification('该文件夹下已无文件')
|
||||
return
|
||||
}
|
||||
this.setState({
|
||||
fileDetail:undefined
|
||||
})
|
||||
this.renderData(result.data)
|
||||
}
|
||||
}
|
||||
}).catch((error)=>{
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
|
||||
renderData=(data)=>{
|
||||
const rootList = [];
|
||||
const readMeContent = [];
|
||||
data && data.map((item,key)=>{
|
||||
rootList.push({
|
||||
key,
|
||||
...item
|
||||
})
|
||||
if(item.name === 'README.md'){
|
||||
readMeContent.push({...item})
|
||||
}
|
||||
})
|
||||
this.setState({
|
||||
rootList:rootList,
|
||||
readMeContent
|
||||
})
|
||||
}
|
||||
|
||||
// readme文件内容
|
||||
renderReadMeContent=(readMeContent)=>{
|
||||
const { fileDetail } = this.state;
|
||||
if(fileDetail){return;}
|
||||
if(readMeContent && readMeContent.length > 0){
|
||||
return(
|
||||
<div className="commonBox">
|
||||
<div className="commonBox-title">{readMeContent[0].name}</div>
|
||||
<div className="commonBox-info">
|
||||
{
|
||||
readMeContent[0].content ?
|
||||
<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(readMeContent[0].content).replace(/▁/g, "▁▁▁")}}></div>
|
||||
:
|
||||
<span>暂无~</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 选择分支
|
||||
changeBranch=(value)=>{
|
||||
const { branchList } = this.props;
|
||||
|
||||
let branchLastCommit = branchList && branchList.length >0 && branchList.filter(item=>item.name === value)[0];
|
||||
this.setState({
|
||||
branch:branchLastCommit && branchLastCommit.name,
|
||||
branchLastCommit,
|
||||
http_url:branchLastCommit && branchLastCommit.http_url,
|
||||
isSpin: true
|
||||
})
|
||||
this.getProjectRoot(branchLastCommit.name);
|
||||
|
||||
}
|
||||
render(){
|
||||
const { rootList , branch ,filePath , fileDetail , subFileType , readMeContent, isSpin , rootData } = this.state;
|
||||
const { branchLastCommit , http_url , isManager , isDeveloper } = this.props;
|
||||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: 'name',
|
||||
width:"100%",
|
||||
render: (text,item) => (
|
||||
<a onClick={()=>this.ChangeFile(item)}>
|
||||
<i className={ item.type === "file" ? "iconfont icon-zuoye font-15 color-blue mr5":"iconfont icon-wenjian font-15 color-blue mr5"}></i>{text}
|
||||
</a>
|
||||
),
|
||||
}
|
||||
];
|
||||
const title = () =>{
|
||||
if(branchLastCommit && branchLastCommit.last_commit){
|
||||
return(
|
||||
<div className="f-wrap-alignCenter">
|
||||
{
|
||||
branchLastCommit.author ?
|
||||
<React.Fragment>
|
||||
<img src={getImageUrl(`images/${branchLastCommit.author.image_url}`)} className="radius mr10" width="32" height="32" alt=""/>
|
||||
<span className="mr15">{branchLastCommit.author.login}</span>
|
||||
</React.Fragment>
|
||||
:""
|
||||
}
|
||||
<Link to={``} className="commitKey">{branchLastCommit.last_commit.id}</Link>
|
||||
<span className="color-blue flex-1 hide-1">{branchLastCommit.last_commit.message}</span>
|
||||
<span>{branchLastCommit.last_commit.time_from_now}</span>
|
||||
</div>
|
||||
)
|
||||
}else{
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
const downloadUrl = ()=>{
|
||||
if(branchLastCommit && branchLastCommit.zip_url){
|
||||
return(
|
||||
<Menu>
|
||||
<Menu.Item><a href={branchLastCommit.zip_url}>ZIP</a></Menu.Item>
|
||||
<Menu.Item><a href={branchLastCommit.tar_url}>TAR.GZ</a></Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const urlRoot = filePath && filePath.length > 0 ? `/${filePath[filePath.length - 1].path}` : "";
|
||||
return(
|
||||
<React.Fragment>
|
||||
{
|
||||
rootData &&
|
||||
<React.Fragment>
|
||||
{
|
||||
rootData.length > 0 ?
|
||||
<div>
|
||||
<Top { ...this.props } {...this.state} />
|
||||
<div className="f-wrap-between mt20">
|
||||
<div className="f-wrap-alignCenter">
|
||||
<SelectBranch branch={branch} changeBranch={this.changeBranch} {...this.props} {...this.state}></SelectBranch>
|
||||
{
|
||||
filePath && filePath.length > 0 &&
|
||||
<span className="ml20 font-16">
|
||||
<a onClick={()=>this.getProjectRoot(branch)} className="color-blue">{projectsId}</a>
|
||||
{
|
||||
filePath.map((item,key)=>{
|
||||
return(
|
||||
<React.Fragment>
|
||||
{
|
||||
key === filePath.length-1 ?
|
||||
<span className="color-grey-6 subFileName" key={key}>{item.name}</span>
|
||||
:
|
||||
<a onClick={()=>this.ChangeFile(item,key)} className="color-blue subFileName" key={key}>{item.name}</a>
|
||||
}
|
||||
</React.Fragment>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
</span>
|
||||
}
|
||||
|
||||
</div>
|
||||
<div className="f-wrap-alignCenter">
|
||||
{
|
||||
subFileType !== "file" && (isManager || isDeveloper) &&
|
||||
<p className="addFile mr30">
|
||||
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
||||
{/* <Link to={``}>上传文件</Link> */}
|
||||
</p>
|
||||
}
|
||||
{
|
||||
filePath && filePath.length === 0 && <CloneAddress http_url={http_url} downloadUrl={downloadUrl} showNotification={this.props.showNotification}></CloneAddress>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<Spin spinning={isSpin}>
|
||||
{/* 文件夹-子目录列表 */}
|
||||
{
|
||||
rootList && <RootTable columns = {columns} data={rootList} title={() => title()}></RootTable>
|
||||
}
|
||||
|
||||
{
|
||||
fileDetail &&
|
||||
<CoderRootFileDetail detail = {fileDetail} {...this.props} {...this.state}></CoderRootFileDetail>
|
||||
}
|
||||
|
||||
{/* readme.txt */}
|
||||
{ this.renderReadMeContent(readMeContent) }
|
||||
</Spin>
|
||||
</div>
|
||||
:
|
||||
<NullData {...this.props} {...this.state} http_url={http_url} ></NullData>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default CoderRootDirectorytext;
|
||||
|
|
@ -52,7 +52,7 @@ class CoderRootIndex extends Component{
|
|||
}
|
||||
></Route>
|
||||
{/* diff */}
|
||||
<Route path="/projects/:projectsId/diff/:commitId"
|
||||
<Route path="/projects/:projectsId/diff/:sha"
|
||||
render={
|
||||
(props) => (<Diff {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ class Detail extends Component {
|
|||
author: undefined,
|
||||
branchs: undefined,
|
||||
branchList: undefined,
|
||||
branchLastCommit: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,6 +175,7 @@ class Detail extends Component {
|
|||
watchers_count: result.data.watchers_count,
|
||||
praises_count: result.data.praises_count,
|
||||
forked_count: result.data.forked_count,
|
||||
isSpin:false
|
||||
})
|
||||
if (result.data.project_id) {
|
||||
this.getBranch(result.data.project_id);
|
||||
|
|
@ -278,12 +278,34 @@ class Detail extends Component {
|
|||
this.setState({
|
||||
branchList: result.data,
|
||||
branchs,
|
||||
branchLastCommit: result.data[0],
|
||||
})
|
||||
}
|
||||
}).catch((error) => { })
|
||||
}
|
||||
|
||||
// 同步镜像
|
||||
synchronismMirror=()=>{
|
||||
const { repo_id } = this.state.projectDetail;
|
||||
this.setState({
|
||||
isSpin:true
|
||||
})
|
||||
const url = `/repositories/${repo_id}/sync_mirror.json`;
|
||||
axios.post(url).then(result=>{
|
||||
if(result && result.data && result.data.status === 0){
|
||||
this.props.showNotification("镜像同步成功!");
|
||||
this.getDetail();
|
||||
}else{
|
||||
this.props.showNotification("镜像同步失败!");
|
||||
this.setState({
|
||||
isSpin:false
|
||||
})
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
const { projectDetail, watchers_count, praises_count, forked_count, isSpin, isManager, watched, praised } = this.state;
|
||||
const url = this.props.history.location.pathname;
|
||||
|
|
@ -333,6 +355,10 @@ class Detail extends Component {
|
|||
</span>
|
||||
</p>
|
||||
<span className="df mt25">
|
||||
{
|
||||
projectDetail && projectDetail.type && projectDetail.type === 2 &&
|
||||
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a>
|
||||
}
|
||||
<span className="detail_tag_btn">
|
||||
<a className="detail_tag_btn_name" onClick={() => this.focusFunc(watched)}>
|
||||
<img src={watched ? img_focused : img_focus} alt="" width="14px" />
|
||||
|
|
@ -340,8 +366,7 @@ class Detail extends Component {
|
|||
</a>
|
||||
<Link className="detail_tag_btn_count" to={{pathname:`/projects/${projectsId}/watch_users`, state}}>
|
||||
{watchers_count}
|
||||
</Link>
|
||||
{/* <span className="detail_tag_btn_count">{watchers_count}</span> */}
|
||||
</Link>
|
||||
</span>
|
||||
<span className="detail_tag_btn">
|
||||
<a className="detail_tag_btn_name" onClick={() => this.pariseFunc(praised)}>
|
||||
|
|
@ -549,6 +574,11 @@ class Detail extends Component {
|
|||
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} {...common}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId"
|
||||
render={
|
||||
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} {...common}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:projectsId/watch_users"
|
||||
render={
|
||||
(props) => (<WatchUsers {...this.props} {...props} {...this.state} {...common}/>)
|
||||
|
|
|
|||
|
|
@ -1,81 +1,193 @@
|
|||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { Button } from 'antd';
|
||||
import User from '../Component/User';
|
||||
import Keys from '../Component/Keys';
|
||||
import React, { useEffect, useState } from "react";
|
||||
import styled from "styled-components";
|
||||
import { Button ,Spin } from "antd";
|
||||
import { truncateCommitId } from '../common/util';
|
||||
import Nodata from '../Nodata';
|
||||
|
||||
import User from "../Component/User";
|
||||
import Keys from "../Component/Keys";
|
||||
|
||||
import axios from "axios";
|
||||
|
||||
const Infos = styled.div`
|
||||
border:1px solid #DDDDDD;
|
||||
& .commitinfos{
|
||||
background-color:#F1F8FF;
|
||||
border-bottom:1px solid #ddd;
|
||||
padding:20px;
|
||||
border: 1px solid #dddddd;
|
||||
& .commitinfos {
|
||||
background-color: #f1f8ff;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 20px;
|
||||
}
|
||||
& > .f-wrap-between{
|
||||
padding:10px 24px;
|
||||
& > .f-wrap-between {
|
||||
padding: 10px 24px;
|
||||
}
|
||||
`;
|
||||
const Operation = styled.p`
|
||||
border-bottom:1px solid #eee;
|
||||
padding:12px 0px;
|
||||
margin-top:10px;
|
||||
display:flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 12px 0px;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
const fileUl = styled.ul`
|
||||
& li{
|
||||
display:flex;
|
||||
const FileUl = styled.ul`
|
||||
padding-top: 10px;
|
||||
& li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height:20px;
|
||||
line-height:20px;
|
||||
margin-bottom:10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
`;
|
||||
const DetailP = styled.p`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 20px 12px 12px;
|
||||
background-color: #fafafa;
|
||||
border: 1px solid #dddddd;
|
||||
`;
|
||||
|
||||
const files = ()=>{
|
||||
return(
|
||||
<fileUl>
|
||||
<li>
|
||||
<span><i className="iconfont icon-wenjia color-grey-3 font-16 mr8"></i></span>
|
||||
</li>
|
||||
</fileUl>
|
||||
)
|
||||
}
|
||||
export default ({ projectDetail, match }) => {
|
||||
const [data, setData] = useState(undefined);
|
||||
const [commit, setCommit] = useState(undefined);
|
||||
const [files, setFiles] = useState(undefined);
|
||||
const [parents, setParents] = useState(undefined);
|
||||
const [committer, setCommitter] = useState(undefined);
|
||||
const [fileflag , setFileflag] = useState(false);
|
||||
const [isSpin, setIsSpin] = useState(true);
|
||||
|
||||
export default () => {
|
||||
return(
|
||||
<div className="main">
|
||||
<Infos>
|
||||
<div className="commitinfos">
|
||||
<p className="f-wrap-between">
|
||||
<span className="font-20 color-grey-3">title</span>
|
||||
<Button type="primary">浏览代码</Button>
|
||||
</p>
|
||||
<pre className="mt10">I wanner be a dancer \n I wanner be a dancer I wanner be a dancer</pre>
|
||||
</div>
|
||||
<div className="f-wrap-between" style={{alignItems:'center'}}>
|
||||
<ul className="df">
|
||||
<User url="https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3025493530,1989042357&fm=26&gp=0.jpg" name="caicai" />
|
||||
</ul>
|
||||
<li className="df">
|
||||
<Keys title="父节点" value={"dddddd"} className="mr20"></Keys>
|
||||
<Keys title="当前节点" value={"dddddd"}></Keys>
|
||||
</li>
|
||||
</div>
|
||||
</Infos>
|
||||
<Operation>
|
||||
<span>
|
||||
<i className="iconfont icon-triangle mr8 color-grey-9 font-16"></i>
|
||||
<span className="color-grey-9">
|
||||
共有<span>3个文件被更改</span>,包括<span className="color-green">20次插入</span><span className="color-red">和3次删除</span>
|
||||
const repo_id = projectDetail && projectDetail.repo_id;
|
||||
const { sha } = match.params;
|
||||
useEffect(() => {
|
||||
if (repo_id && sha) {
|
||||
const url = `/repositories/${repo_id}/commits/${sha}.json`;
|
||||
axios
|
||||
.get(url)
|
||||
.then(result => {
|
||||
if (result) {
|
||||
setData(result.data);
|
||||
setCommit(result.data.commit);
|
||||
setFiles(result.data.files);
|
||||
setParents(result.data.parents);
|
||||
setCommitter(result.data.committer || (result.data.commit && result.data.commit.committer));
|
||||
setIsSpin(false);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}, [repo_id, sha]);
|
||||
const renderFiles = () => {
|
||||
return (
|
||||
<FileUl>
|
||||
{
|
||||
files && files.length > 0 && files.map((item,key)=>{
|
||||
return(
|
||||
<li>
|
||||
<span className="mr30 task-hide flex1">
|
||||
<i className="iconfont icon-wenjia color-grey-3 font-16 mr8"></i>
|
||||
{item.Name}
|
||||
</span>
|
||||
<span>
|
||||
<label className="color-green mr20">+{item.Addition}</label>
|
||||
<label className="color-red">-{item.Deletion}</label>
|
||||
</span>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</FileUl>
|
||||
);
|
||||
};
|
||||
|
||||
function changeFlag(){
|
||||
let flag = !fileflag;
|
||||
setFileflag(flag);
|
||||
}
|
||||
|
||||
const filesDetail = () => {
|
||||
return (
|
||||
<div>
|
||||
<DetailP>
|
||||
<span>
|
||||
<i className="iconfont icon-youjiantou mr4 font-15 color-grey-9"></i>
|
||||
<span className="font-16 color-grey-3">README.md</span>
|
||||
</span>
|
||||
</span>
|
||||
<Button>双栏查看</Button>
|
||||
</Operation>
|
||||
<Button>查看文件</Button>
|
||||
</DetailP>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="main">
|
||||
<Spin spinning={isSpin}>
|
||||
<Infos>
|
||||
<div className="commitinfos">
|
||||
<p className="f-wrap-between">
|
||||
<span className="font-20 color-grey-3">
|
||||
{ commit && commit.title }
|
||||
</span>
|
||||
<Button type="primary">浏览代码</Button>
|
||||
</p>
|
||||
{commit && commit.message ? (
|
||||
<pre className="mt10">{commit.message}</pre>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
<div className="f-wrap-between" style={{ alignItems: "center" }}>
|
||||
<ul className="df">
|
||||
<User
|
||||
url={(committer && committer.image_url)|| "https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3025493530,1989042357&fm=26&gp=0.jpg"}
|
||||
name={committer && committer.name}
|
||||
/>
|
||||
</ul>
|
||||
<li className="df">
|
||||
{
|
||||
parents && parents.length > 0 && parents.map((item,key)=>{
|
||||
return(
|
||||
<Keys title="父节点" value={truncateCommitId(item.sha) } className="mr20"></Keys>
|
||||
)
|
||||
})
|
||||
}
|
||||
<Keys title="当前节点" value={truncateCommitId(sha)}></Keys>
|
||||
</li>
|
||||
</div>
|
||||
</Infos>
|
||||
{
|
||||
files && files.length > 0 ?
|
||||
<React.Fragment>
|
||||
<Operation>
|
||||
<span className="files_info" onClick={changeFlag}>
|
||||
<i className={fileflag ? "iconfont icon-sanjiaoxing-down mr8 color-grey-9 font-16":"iconfont icon-triangle mr8 color-grey-9 font-16"}></i>
|
||||
<span className="color-grey-9">
|
||||
共有<span>{files && files.length}个文件被更改</span>,包括
|
||||
{data && data.additions ? (
|
||||
<span className="color-green">{data.additions}次插入</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{data && data.additions && data.deletions ? "和" : ""}
|
||||
{data && data.deletions ? (
|
||||
<span className="color-red">{data.deletions}次删除</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
<Button>双栏查看</Button>
|
||||
</Operation>
|
||||
{fileflag && renderFiles()}
|
||||
{filesDetail()}
|
||||
</React.Fragment>
|
||||
:
|
||||
<Nodata _html="暂无文件修改信息!"/>
|
||||
}
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -558,6 +558,18 @@
|
|||
line-height: 50px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.synchronism{
|
||||
display: block;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
padding:0px 15px;
|
||||
color: #fff!important;
|
||||
background-color: #28BD6C;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.files_info{
|
||||
cursor: pointer;
|
||||
}
|
||||
.commonBox .commonBox-info{
|
||||
padding:20px 15px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Input, Form, Select, Checkbox, Button, Divider, Spin, AutoComplete } from 'antd';
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
import '../css/index.css';
|
||||
import './new.css'
|
||||
|
|
@ -16,6 +17,8 @@ class Index extends Component {
|
|||
gitignoreType: "0",
|
||||
LicensesType: "0",
|
||||
|
||||
mirrorCheck:false,
|
||||
|
||||
CategoryList: undefined,
|
||||
LanguageList: undefined,
|
||||
GitignoreList: undefined,
|
||||
|
|
@ -129,17 +132,19 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
subMitFrom = () => {
|
||||
this.setState({
|
||||
isSpin: true
|
||||
})
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if (!err) {
|
||||
this.setState({
|
||||
isSpin: true
|
||||
})
|
||||
const { current_user } = this.props;
|
||||
const { projectsType } = this.props.match.params;
|
||||
const { project_language_id, project_category_id, license_id, ignore_id } = this.state;
|
||||
const decoderPass = Base64.encode(values.password);
|
||||
const url = projectsType === "deposit" ? "/projects.json" : "/projects/migrate.json";
|
||||
axios.post(url, {
|
||||
...values,
|
||||
auth_password:decoderPass,
|
||||
project_language_id,
|
||||
project_category_id,
|
||||
license_id,
|
||||
|
|
@ -204,6 +209,13 @@ class Index extends Component {
|
|||
callback();
|
||||
}
|
||||
|
||||
changeMirrorCheck=()=>{
|
||||
const { mirrorCheck } = this.state;
|
||||
this.setState({
|
||||
mirrorCheck:!mirrorCheck
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
// 项目类型:deposit-托管项目,mirror-镜像项目
|
||||
|
|
@ -228,6 +240,8 @@ class Index extends Component {
|
|||
project_category_list,
|
||||
license_list,
|
||||
ignore_list,
|
||||
|
||||
mirrorCheck
|
||||
} = this.state;
|
||||
return (
|
||||
<div className="main back-white">
|
||||
|
|
@ -254,6 +268,39 @@ class Index extends Component {
|
|||
<p className="formTip color-orange">示例:https://github.com/facebook/reack.git</p>
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
projectsType !== "deposit" &&
|
||||
<React.Fragment>
|
||||
<p className="mt10 mb10 color-grey-3 pointer" onClick={this.changeMirrorCheck}>需要授权验证<i className={mirrorCheck?"iconfont icon-xiajiantou font-13 ml10 color-grey-8":"iconfont icon-youjiantou font-13 ml10 color-grey-8"}></i></p>
|
||||
{
|
||||
mirrorCheck &&
|
||||
<div className="df mb20" style={{alignItems:'center'}}>
|
||||
<span className="mr10">用户名</span>
|
||||
<Form.Item
|
||||
style={{ marginBottom: "0px" }}
|
||||
label=""
|
||||
>
|
||||
{getFieldDecorator('auth_username', {
|
||||
rules: [],
|
||||
})(
|
||||
<Input placeholder="请输入对应平台的登录用户名" style={{width:"240px"}} />
|
||||
)}
|
||||
</Form.Item>
|
||||
<span className="mr10">密码</span>
|
||||
<Form.Item
|
||||
style={{ marginBottom: "0px" }}
|
||||
label=""
|
||||
>
|
||||
{getFieldDecorator('password', {
|
||||
rules: [],
|
||||
})(
|
||||
<Input placeholder="请输入对应平台的登录密码" type="password" style={{width:"240px"}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</div>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
<Form.Item
|
||||
label="项目名称"
|
||||
>
|
||||
|
|
@ -384,6 +431,18 @@ class Index extends Component {
|
|||
<Checkbox value="limit">将项目设为私有<span className="ml15 font-13 color-grey-9">(只有项目所有人或拥有权限的项目成员才能看到)</span></Checkbox>
|
||||
)}
|
||||
</Form.Item >
|
||||
{
|
||||
projectsType !== "deposit" &&
|
||||
<Form.Item
|
||||
label="迁移类型:"
|
||||
style={{ margin: "0px" }}
|
||||
className="privatePart"
|
||||
>
|
||||
{getFieldDecorator('is_mirror')(
|
||||
<Checkbox value="limit">该仓库将是一个<span className="color-blue">镜像</span>(设置为镜像后,该项目为只读,不能进行push等相关操作)</Checkbox>
|
||||
)}
|
||||
</Form.Item >
|
||||
}
|
||||
<div>
|
||||
注:<span className="ant-form-item-required"></span> 为必填项,否则为选填
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
export function truncateCommitId(str) {
|
||||
if (str.length > 11) {
|
||||
if (str && str.length > 11) {
|
||||
return str.substring(0, 10)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
$flex:flex;
|
||||
.headerbox{
|
||||
padding:20px 40px;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
display: $flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
& > div{
|
||||
width: 400px;
|
||||
}
|
||||
& > p{
|
||||
display: $flex;
|
||||
align-items: center;
|
||||
}
|
||||
& > p a{
|
||||
color: #5091FF;
|
||||
margin-left: 30px;
|
||||
font-size: 16px;
|
||||
display: $flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.contentBox{
|
||||
padding:20px 40px 0px 40px;
|
||||
& > div{
|
||||
margin-bottom: 20px;
|
||||
display: $flex;
|
||||
align-items: flex-start;
|
||||
padding:20px 25px;
|
||||
background-color:rgba(250,250,250,1)
|
||||
}
|
||||
& > div img{
|
||||
width: 190px;
|
||||
height: 90px;
|
||||
margin-right: 20px
|
||||
}
|
||||
.item-news{
|
||||
display: $flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-top: 3px;
|
||||
}
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC"
|
|||
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
|
||||
import "./new_user.css";
|
||||
import "../css/index.css";
|
||||
import './Index.scss';
|
||||
|
||||
import Loadable from "react-loadable";
|
||||
import Loading from "../../Loading";
|
||||
|
|
@ -22,6 +23,10 @@ const InfosUser = Loadable({
|
|||
loader: () => import("./InfosUser"),
|
||||
loading: Loading,
|
||||
});
|
||||
const Organize = Loadable({
|
||||
loader: () => import("./Team"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
const WatchsUser = Loadable({
|
||||
loader: () => import("./watch_users"),
|
||||
|
|
@ -97,11 +102,15 @@ class Infos extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
organize_link = () => {
|
||||
const {user} = this.state
|
||||
this.props.history.push(`/users/${user && user.login}/organizes`)
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { current_user, mygetHelmetapi } = this.props;
|
||||
const { user, isSpin, project_type, route_type } = this.state;
|
||||
console.log(this.props.match.params)
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<Spin spinning={isSpin}>
|
||||
|
|
@ -211,7 +220,7 @@ class Infos extends Component {
|
|||
</div>
|
||||
<div className="bgcF">
|
||||
<div className="list-l-Menu">
|
||||
<p className="list-l-p pd20">
|
||||
<p className="list-l-p pd20" onClick={() => this.organize_link()} >
|
||||
<span className="font-16 fwb">
|
||||
<i className="iconfont icon-itsm-liuchengguanli font-15 mr5"></i>
|
||||
组织
|
||||
|
|
@ -251,6 +260,12 @@ class Infos extends Component {
|
|||
return <InfosUser {...this.props} {...this.state} />;
|
||||
}}
|
||||
></Route>
|
||||
<Route
|
||||
path="/users/:username/organizes"
|
||||
render={(props) => {
|
||||
return <Organize {...this.props} {...this.state} />;
|
||||
}}
|
||||
></Route>
|
||||
<Route
|
||||
path="/users/:username"
|
||||
render={(props) => {
|
||||
|
|
@ -262,6 +277,22 @@ class Infos extends Component {
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="list-right">
|
||||
<Switch {...this.props}>
|
||||
<Route
|
||||
path="/users/:username/organize"
|
||||
render={(props) => {
|
||||
return <Organize {...this.props} {...this.state} />;
|
||||
}}
|
||||
></Route>
|
||||
{/* <Route
|
||||
path="/users/:username/projects"
|
||||
render={(props) => {
|
||||
return <InfosIndex {...this.props} {...this.state} />;
|
||||
}}
|
||||
></Route> */}
|
||||
</Switch>
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
import React from 'react';
|
||||
export default (()=>{
|
||||
return(
|
||||
<div>
|
||||
<img alt="" src="https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=275377869,874401419&fm=26&gp=0.jpg"/>
|
||||
<div>
|
||||
<p className="mb5 font-18 color-grey-3 task-hide">组织名称组织名称</p>
|
||||
<div className="task-hide-2">
|
||||
组织描述内容组织描述内容组织描述内容组织描述内容组织描述内容组织描述内容组织描述内容组织描述内容组织描述内容组织描述内容组织描述内
|
||||
</div>
|
||||
<p className="item-news">
|
||||
<span>项目:11</span>
|
||||
<span><i className="iconfont icon-shijian color-green mr3 font-12"></i>创建时间:2020-04-28</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
import React from 'react';
|
||||
import {Popover , Menu} from 'antd';
|
||||
import Search from '../Component/Search';
|
||||
import Sort from '../Component/Sort';
|
||||
|
||||
import Item from './Team-item';
|
||||
|
||||
export default (()=>{
|
||||
// 搜索
|
||||
function onSearch(value){
|
||||
|
||||
}
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu.Item key="updated_on">更新时间排序</Menu.Item>
|
||||
<Menu.Item key="created_on">项目数排序</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
return(
|
||||
<div>
|
||||
<div className="headerbox">
|
||||
<div>
|
||||
<Search placeholder="请输入项目名称关键字进行搜索" onSearch={onSearch}/>
|
||||
</div>
|
||||
<p>
|
||||
<a><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</a>
|
||||
<Sort menu={menu}>
|
||||
<a>排序<i className="iconfont icon-sanjiaoxing-down ml3 font-14"></i></a>
|
||||
</Sort>
|
||||
</p>
|
||||
</div>
|
||||
<div className="contentBox">
|
||||
<Item></Item>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
.list-right{
|
||||
width:74%;
|
||||
background: #fff;
|
||||
padding:10px;
|
||||
padding:0px;
|
||||
}
|
||||
.list-l-Menu{
|
||||
margin-bottom: 12px;
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
.list-l-Menu li.active::before{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 10px;
|
||||
top: 16px;
|
||||
width: 6px;
|
||||
content: '';
|
||||
height: 33px;
|
||||
|
|
|
|||
|
|
@ -940,7 +940,8 @@ class NewHeader extends Component {
|
|||
|
||||
{
|
||||
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_organ &&
|
||||
<li><a href={`${mygetHelmetapi2.new_course.my_organ}`} target="_blank">我的组织</a></li>
|
||||
// <li><a href={`${mygetHelmetapi2.new_course.my_organ}`} target="_blank">我的组织</a></li>
|
||||
<li><a href={`/users/${this.props.current_user.login}/organize`} target="_blank">我的组织</a></li>
|
||||
}
|
||||
<li className="bor-top-greyE">
|
||||
<a onClick={() => this.educoderloginysl()}>退出</a>
|
||||
|
|
|
|||
|
|
@ -296,13 +296,13 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
}
|
||||
|
||||
fetchUser = () => {
|
||||
console.log("`111111");
|
||||
let url = `/users/get_user_info.json`
|
||||
let courseId;
|
||||
let query = this.props.location.pathname;
|
||||
const type = query.split('/');
|
||||
if (type[1] == 'classrooms' && type[2]) {
|
||||
courseId = parseInt(type[2])
|
||||
// url += `?course_id=${courseId}`
|
||||
}
|
||||
var datay = {};
|
||||
if (JSON.stringify(this.state.dataquerys) === "{}") {
|
||||
|
|
@ -320,25 +320,11 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
}
|
||||
}
|
||||
axios.get(url, {
|
||||
params:
|
||||
datay
|
||||
params: datay
|
||||
}).then((response) => {
|
||||
/*
|
||||
{
|
||||
"username": "黄井泉",
|
||||
"login": "Hjqreturn",
|
||||
"user_id": 12,
|
||||
"image_url": "avatar/User/12",
|
||||
"admin": true,
|
||||
"is_teacher": false,
|
||||
"tidding_count": 0
|
||||
}
|
||||
*/
|
||||
if (response === undefined) {
|
||||
return
|
||||
}
|
||||
if (response.data) {
|
||||
this.initCommonState(response.data)
|
||||
if (response && response.data) {
|
||||
console.log("`111111",response.data);
|
||||
this.initCommonState(response.data);
|
||||
this.setState({
|
||||
tpmLoading: false,
|
||||
coursedata: {
|
||||
|
|
@ -346,12 +332,9 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
course_public: response.data.course_public,
|
||||
name: response.data.course_name,
|
||||
userid: response.data.user_id
|
||||
},
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue