Commit 74ae3916 authored by rocosen's avatar rocosen

Merge branch 'release' into 'master'

Release

See merge request !2
parents 1610acc3 c308dde5
......@@ -2,7 +2,7 @@ root = true
[*]
indent_style = space
indent_size = 2
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
......
......@@ -24,7 +24,7 @@ module.exports = {
typescript: {},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
'@typescript-eslint/parser': ['.ts', '.tsx','.js', '.jsx'],
},
},
};
{
"recommendations": ["dbaeumer.vscode-eslint", "EditorConfig.EditorConfig"]
"recommendations": [
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"rvest.vs-code-prettier-eslint"
]
}
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
<svg width="232" height="232" viewBox="0 0 232 232" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_b)">
<path d="M231.5 1V0.5H231H1H0.5V1V231V231.5H1H231H231.5V231V1ZM40.5 25C40.5 33.0082 34.0082 39.5 26 39.5C17.9918 39.5 11.5 33.0082 11.5 25C11.5 16.9918 17.9918 10.5 26 10.5C34.0082 10.5 40.5 16.9918 40.5 25ZM220.5 25C220.5 33.0082 214.008 39.5 206 39.5C197.992 39.5 191.5 33.0082 191.5 25C191.5 16.9918 197.992 10.5 206 10.5C214.008 10.5 220.5 16.9918 220.5 25ZM40.5 205C40.5 213.008 34.0082 219.5 26 219.5C17.9918 219.5 11.5 213.008 11.5 205C11.5 196.992 17.9918 190.5 26 190.5C34.0082 190.5 40.5 196.992 40.5 205ZM220.5 205C220.5 213.008 214.008 219.5 206 219.5C197.992 219.5 191.5 213.008 191.5 205C191.5 196.992 197.992 190.5 206 190.5C214.008 190.5 220.5 196.992 220.5 205ZM209.5 111C209.5 162.639 167.639 204.5 116 204.5C64.3613 204.5 22.5 162.639 22.5 111C22.5 59.3613 64.3613 17.5 116 17.5C167.639 17.5 209.5 59.3613 209.5 111Z" fill="white" stroke="white"/>
<path d="M63.5 146.5C63.5 149.959 60.8969 152.5 58 152.5C55.1031 152.5 52.5 149.959 52.5 146.5C52.5 143.041 55.1031 140.5 58 140.5C60.8969 140.5 63.5 143.041 63.5 146.5Z" stroke="white" stroke-width="5"/>
<path d="M54.9856 139.466C54.9856 139.466 51.1973 116.315 83.1874 93.1647C115.178 70.014 133.698 69.5931 133.698 69.5931" stroke="white" stroke-width="5" stroke-linecap="round"/>
<path d="M178.902 142.686C177.27 139.853 173.652 138.88 170.819 140.512C167.987 142.144 167.014 145.762 168.646 148.595C170.277 151.427 173.896 152.4 176.728 150.768C179.561 149.137 180.534 145.518 178.902 142.686Z" stroke="white" stroke-width="5"/>
<path d="M169.409 151.555C169.409 151.555 151.24 166.394 115.211 150.232C79.182 134.07 69.5718 118.232 69.5718 118.232" stroke="white" stroke-width="5" stroke-linecap="round"/>
<path d="M109.577 41.9707C107.966 44.8143 108.964 48.4262 111.808 50.038C114.651 51.6498 118.263 50.6512 119.875 47.8075C121.487 44.9639 120.488 41.3521 117.645 39.7403C114.801 38.1285 111.189 39.1271 109.577 41.9707Z" stroke="white" stroke-width="5"/>
<path d="M122.038 45.6467C122.038 45.6467 144.047 53.7668 148.412 93.0129C152.778 132.259 144.012 148.579 144.012 148.579" stroke="white" stroke-width="5" stroke-linecap="round"/>
<path d="M59.6334 105C59.6334 105 50.4373 82.1038 61.3054 73.3616C72.1736 64.6194 96 69.1987 96 69.1987" stroke="white" stroke-width="5" stroke-linecap="round"/>
<path d="M149.532 66.9784C149.532 66.9784 174.391 68.9134 177.477 82.6384C180.564 96.3634 165.799 115.833 165.799 115.833" stroke="white" stroke-width="5" stroke-linecap="round"/>
<path d="M138.248 163.363C138.248 163.363 124.023 183.841 110.618 179.573C97.2129 175.305 87.8662 152.728 87.8662 152.728" stroke="white" stroke-width="5" stroke-linecap="round"/>
<path d="M116 119C120.418 119 124 115.642 124 111.5C124 107.358 120.418 104 116 104C111.582 104 108 107.358 108 111.5C108 115.642 111.582 119 116 119Z" fill="white"/>
</g>
<defs>
<filter id="filter0_b" x="-4" y="-4" width="240" height="240" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feGaussianBlur in="BackgroundImage" stdDeviation="2"/>
<feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_backgroundBlur" result="shape"/>
</filter>
</defs>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>北鲲云标志修改-06</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="北鲲云标志修改-06" fill-rule="nonzero">
<rect id="矩形" fill="#FFFFFF" x="0" y="0" width="256" height="256" rx="49.0591958"></rect>
<path d="M143.375554,114.136619 C143.375554,114.136619 132.066664,106.932197 124.430193,102.125649 C110.107759,93.10662 93.1714274,86.0102105 76.299903,88.8833383 C102.114847,94.0139235 118.889161,114.806295 125.45631,120.9846 L143.375554,114.136619 Z" id="路径" fill="#00CCCC"></path>
<path d="M216.748323,108.27155 C216.359479,103.821442 199.811991,96.3253871 172.355259,100.084216 C134.324121,105.29041 114.730686,125.078267 63.8136787,118.44631 C71.0677748,123.346814 78.6460446,127.749427 86.496266,131.623813 C125.737142,151.195646 162.612548,152.610607 188.168263,140.124383 C213.723978,127.638159 217.288384,114.309438 216.748323,108.27155 Z" id="路径" fill="#0066FF"></path>
<path d="M216.672714,107.882705 C214.512468,123.09084 180.86663,122.172735 146.399899,94.5107801 C122.140332,75.0685625 91.896882,58.6830935 64.0081009,65.0450192 C99.576558,69.9595798 120.854985,92.9770052 141.161301,110.539808 C164.99962,131.15936 189.766845,139.346694 207.113624,127.627357 C210.137969,125.024261 218.098477,116.469685 216.672714,107.882705 Z" id="路径" fill="#00CCCC"></path>
<path d="M40.5910299,106.618961 C32.26328,103.983461 27.7591663,106.618961 18.6537277,105.106789 C32.6953293,113.078098 49.253618,116.718113 63.8136787,118.424708 C68.0369605,118.932366 72.8759124,120.1097 79.3890553,119.710054 C74.9821527,119.2348 70.2836167,116.966541 64.0081009,111.533522 C54.3626007,103.173368 39.7053289,91.1407957 18.0272562,89.2181764 C30.5998903,94.7808109 33.8510611,101.628792 40.5910299,106.618961 Z" id="路径" fill="#0066FF"></path>
<path d="M67.3672841,177.215814 C67.2111136,176.952325 67.0183738,176.712309 66.7948188,176.502932 C66.5929024,176.324406 66.3719465,176.16865 66.1359436,176.038479 C65.8311122,175.859712 65.499091,175.732011 65.1530315,175.660436 C65.6103425,175.510513 66.0176306,175.237743 66.3303658,174.871946 C66.5192125,174.67032 66.6758677,174.440802 66.7948188,174.191469 C66.9369255,173.891048 67.04559,173.575921 67.1188557,173.251762 C67.2016404,172.842986 67.2414613,172.426676 67.2376693,172.00962 C67.244987,171.436041 67.1870074,170.863493 67.0648496,170.303025 C66.9560342,169.815549 66.7040251,169.371712 66.341167,169.02848 C65.9127072,168.643041 65.3917418,168.375116 64.8289946,168.250791 C64.0045703,168.057506 63.1588216,167.97039 62.3123075,167.991562 L48.4327244,167.991562 L48.4327244,184.701067 L60.9189486,184.701067 C61.8103193,184.710477 62.7013946,184.663579 63.5868529,184.560651 C64.2375363,184.490104 64.8785935,184.348854 65.4986709,184.139403 C65.9619833,183.970416 66.3903323,183.7178 66.7624151,183.394118 C67.0874419,183.093431 67.3419473,182.724582 67.5077001,182.313995 C67.6861513,181.894489 67.7990818,181.450053 67.8425383,180.996245 C67.9015663,180.469063 67.9304166,179.938938 67.9289481,179.408464 C67.9352551,178.97455 67.8807185,178.541893 67.7669297,178.123117 C67.67559,177.803917 67.5411354,177.498669 67.3672841,177.215814 L67.3672841,177.215814 Z M64.8073921,173.100544 C64.7754885,173.365071 64.6949238,173.621413 64.569765,173.856631 C64.4578381,174.058364 64.2936785,174.226255 64.0945108,174.342686 C63.8383608,174.496241 63.5566218,174.60235 63.2628159,174.655922 C62.8424623,174.740787 62.4164879,174.794936 61.9882705,174.81794 C61.4914139,174.81794 60.9081473,174.81794 60.1844648,174.81794 L50.7657905,174.81794 L50.7657905,169.935783 L61.5670225,169.935783 C62.1263174,169.930827 62.6854006,169.959683 63.2412135,170.022193 C63.5903103,170.04262 63.9301573,170.142358 64.2349268,170.313826 C64.4581272,170.445008 64.6267844,170.651997 64.710181,170.897093 C64.821252,171.246004 64.8723818,171.611217 64.8613983,171.977216 C64.8643875,172.352374 64.8463572,172.727404 64.8073921,173.100544 Z M50.7657905,176.848572 L60.2276697,176.848572 C61.0161597,176.848572 61.7182397,176.848572 62.3015063,176.848572 C62.797171,176.865055 63.2913565,176.911949 63.7812751,176.988988 C64.1041549,177.046627 64.4194214,177.140844 64.7209822,177.26982 C64.9364095,177.373026 65.1222019,177.529092 65.2610438,177.723472 C65.4003532,177.93442 65.4890679,178.174688 65.5202734,178.425552 C65.5755816,178.761073 65.6008845,179.100855 65.595882,179.440867 C65.6015194,179.877755 65.5762535,180.314494 65.5202734,180.747817 C65.4859981,181.053818 65.3943908,181.350626 65.2502426,181.622716 C65.1302237,181.856035 64.9467659,182.050725 64.7209822,182.18438 C64.415481,182.365424 64.078192,182.486408 63.7272689,182.540821 C63.2432036,182.637101 62.7517141,182.69131 62.2583013,182.70284 C61.685836,182.70284 61.0161597,182.70284 60.1844648,182.70284 L50.7657905,182.70284 L50.7657905,176.848572 Z" id="形状" fill="#4D4D4D"></path>
<polygon id="路径" fill="#4D4D4D" points="90.1902873 167.991562 86.6258808 167.991562 75.9866672 175.206785 73.415974 175.206785 73.415974 167.991562 71.0829079 167.991562 71.0829079 184.733471 73.415974 184.733471 73.415974 177.18341 75.9974685 177.18341 86.9283153 184.711869 86.9715202 184.733471 90.5251255 184.733471 78.3197333 176.200498"></polygon>
<path d="M109.880933,176.362516 C109.880933,177.44264 109.880933,178.285136 109.880933,179.019619 C109.871552,179.638853 109.813769,180.256405 109.708114,180.86663 C109.632096,181.284164 109.470267,181.681381 109.232859,182.033163 C109.01264,182.334317 108.708225,182.563568 108.35796,182.692038 C107.872937,182.875043 107.36321,182.98427 106.845787,183.016075 C106.230117,183.070081 105.463229,183.091684 104.555926,183.091684 L99.7061727,183.091684 C98.7988692,183.091684 98.0211805,183.091684 97.4055103,183.016075 C96.8880875,182.98427 96.3783607,182.875043 95.8933378,182.692038 C95.5430723,182.563568 95.2386577,182.334317 95.018438,182.033163 C94.7866684,181.680651 94.6320688,181.283109 94.5647863,180.86663 C94.4529609,180.257242 94.3951301,179.639175 94.3919666,179.019619 C94.3919666,178.285136 94.3919666,177.421037 94.3919666,176.362516 L94.3919666,167.991562 L92.0264968,167.991562 L92.0264968,176.362516 C92.0264968,177.345428 92.0264968,178.241931 92.0264968,179.030421 C92.0419283,179.756663 92.1250983,180.47988 92.2749251,181.190667 C92.4026137,181.794222 92.6327693,182.371438 92.9554027,182.897262 C93.2959724,183.406957 93.7557052,183.825907 94.2947555,184.117801 C94.9739173,184.465047 95.7025595,184.705499 96.4550019,184.830682 C97.5268387,184.997154 98.6107951,185.073031 99.6953715,185.057508 L104.523522,185.057508 C105.608129,185.07412 106.692177,184.998236 107.763892,184.830682 C108.516459,184.706004 109.245177,184.465527 109.924138,184.117801 C110.460017,183.825553 110.916158,183.406497 111.25269,182.897262 C111.580141,182.373867 111.810647,181.795774 111.933167,181.190667 C112.081835,180.479692 112.164992,179.756583 112.181596,179.030421 C112.181596,178.241931 112.181596,177.345428 112.181596,176.362516 L112.181596,167.991562 L109.84853,167.991562 L109.880933,176.362516 Z" id="路径" fill="#4D4D4D"></path>
<polygon id="路径" fill="#4D4D4D" points="134.086494 182.227585 119.213198 168.034766 119.169993 167.991562 115.367959 167.991562 115.367959 184.733471 117.701025 184.733471 117.701025 170.151808 133.43842 184.701067 133.481625 184.733471 136.41956 184.733471 136.41956 167.991562 134.086494 167.991562"></polygon>
<polygon id="路径" fill="#4D4D4D" points="150.00751 175.995274 142.511455 167.991562 139.389899 167.991562 148.840977 177.788279 148.840977 184.733471 151.174043 184.733471 151.174043 177.788279 160.625121 167.991562 157.492764 167.991562"></polygon>
<path d="M181.028649,176.362516 C181.028649,177.367031 181.028649,178.263533 181.028649,179.019619 C181.019267,179.638853 180.961484,180.256405 180.855829,180.86663 C180.778548,181.282037 180.620769,181.678319 180.391376,182.033163 C180.166895,182.334645 179.858967,182.563713 179.505675,182.692038 C179.020652,182.875043 178.510925,182.98427 177.993502,183.016075 C177.377832,183.070081 176.610945,183.091684 175.703641,183.091684 L170.87549,183.091684 C169.968187,183.091684 169.190498,183.091684 168.574828,183.016075 C168.057581,182.982997 167.54804,182.87381 167.062656,182.692038 C166.71239,182.563568 166.407975,182.334317 166.187756,182.033163 C165.957696,181.679772 165.803241,181.282603 165.734104,180.86663 C165.62283,180.257166 165.565004,179.639147 165.561284,179.019619 C165.561284,178.285136 165.561284,177.388633 165.561284,176.362516 L165.561284,167.991562 L163.239019,167.991562 L163.239019,176.362516 C163.239019,177.367031 163.239019,178.241931 163.239019,179.030421 C163.255623,179.756583 163.33878,180.479692 163.487448,181.190667 C163.615136,181.794222 163.845292,182.371438 164.167925,182.897262 C164.512523,183.407418 164.975849,183.826265 165.518079,184.117801 C166.196077,184.467826 166.925165,184.708425 167.678326,184.830682 C168.750163,184.997154 169.834119,185.073031 170.918695,185.057508 L175.746846,185.057508 C176.831423,185.073031 177.915379,184.997154 178.987216,184.830682 C179.740377,184.708425 180.469464,184.467826 181.147462,184.117801 C181.688588,183.828839 182.148972,183.409296 182.486815,182.897262 C182.814266,182.373867 183.044772,181.795774 183.167293,181.190667 C183.317119,180.47988 183.400289,179.756663 183.415721,179.030421 C183.415721,178.231129 183.415721,177.334627 183.415721,176.362516 L183.415721,167.991562 L181.082655,167.991562 L181.028649,176.362516 Z" id="路径" fill="#4D4D4D"></path>
<polygon id="路径" fill="#4D4D4D" points="205.23421 167.991562 205.23421 182.227585 190.360913 168.034766 190.317708 167.991562 186.515674 167.991562 186.515674 184.733471 188.848741 184.733471 188.848741 170.151808 204.586136 184.701067 204.629341 184.733471 207.556474 184.733471 207.556474 167.991562"></polygon>
</g>
</g>
</svg>
\ No newline at end of file
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
......@@ -110,14 +110,24 @@
"dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@mui/icons-material": "^5.10.14",
"@mui/material": "^5.10.8",
"axios": "^1.1.3",
"electron-debug": "^3.2.0",
"electron-localstorage": "^1.0.5",
"electron-log": "^4.4.8",
"electron-root-path": "^1.1.0",
"electron-traywindow-positioner": "^1.1.1",
"electron-updater": "^5.2.1",
"express": "^4.18.2",
"history": "^5.3.0",
"qs": "^6.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0"
"react-redux": "^8.0.5",
"react-router-dom": "^6.3.0",
"redux": "^4.2.0",
"tss-react": "^4.4.4"
},
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
......@@ -137,11 +147,12 @@
"chalk": "^4.1.2",
"concurrently": "^7.3.0",
"core-js": "^3.24.1",
"moment": "^2.22.2",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^4.0.0",
"detect-port": "^1.3.0",
"electron": "^20.0.2",
"electron": "20.0.2",
"electron-builder": "^23.3.3",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.2.1",
......@@ -226,7 +237,7 @@
]
},
"nsis": {
"include": "build/installer.nsh",
"include": "",
"oneClick": false,
"perMachine": true,
"allowElevation": true,
......
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>alert-circle-outline</title>
<g id="云平台视觉规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Feedback-反馈" transform="translate(-379.000000, -636.000000)" fill="#FF4E4E" fill-rule="nonzero">
<g id="编组" transform="translate(355.000000, 394.000000)">
<g id="编组-4备份-7" transform="translate(0.000000, 225.000000)">
<g id="alert-circle-outline" transform="translate(24.000000, 17.000000)">
<path d="M7.2,10.4 L8.8,10.4 L8.8,12 L7.2,12 L7.2,10.4 M7.2,4 L8.8,4 L8.8,8.8 L7.2,8.8 L7.2,4 M8,-3.55271368e-16 C3.576,-3.55271368e-16 0,3.6 0,8 C0,10.1217319 0.842854723,12.1565632 2.34314575,13.6568542 C3.84343678,15.1571453 5.87826808,16 8,16 C12.418278,16 16,12.418278 16,8 C16,5.87826808 15.1571453,3.84343678 13.6568542,2.34314575 C12.1565632,0.842854723 10.1217319,-3.55271368e-16 8,-3.55271368e-16 M8,14.4 C4.4653776,14.4 1.6,11.5346224 1.6,8 C1.6,4.4653776 4.4653776,1.6 8,1.6 C9.69738553,1.6 11.3252506,2.27428378 12.5254834,3.4745166 C13.7257162,4.67474942 14.4,6.30261447 14.4,8 C14.4,11.5346224 11.5346224,14.4 8,14.4 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>check-circle-outline</title>
<g id="云平台视觉规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Feedback-反馈" transform="translate(-379.000000, -561.000000)" fill="#0DD09B" fill-rule="nonzero">
<g id="编组" transform="translate(355.000000, 394.000000)">
<g id="编组-4备份-5" transform="translate(0.000000, 150.000000)">
<g id="check-circle-outline" transform="translate(24.000000, 17.000000)">
<path d="M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 M8,14.4 C4.472,14.4 1.6,11.528 1.6,8 C1.6,4.472 4.472,1.6 8,1.6 C11.528,1.6 14.4,4.472 14.4,8 C14.4,11.528 11.528,14.4 8,14.4 M11.672,4.464 L6.4,9.736 L4.328,7.672 L3.2,8.8 L6.4,12 L12.8,5.6 L11.672,4.464 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18px" height="15px" viewBox="0 0 18 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>alert-outline</title>
<g id="云平台视觉规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Feedback-反馈" transform="translate(-379.000000, -486.000000)" fill="#FFB919" fill-rule="nonzero">
<g id="编组" transform="translate(355.000000, 394.000000)">
<g id="编组-4备份-8" transform="translate(0.000000, 75.000000)">
<g id="alert-outline" transform="translate(24.000000, 17.000000)">
<path d="M9,0 L0,15 L18,15 M9,3.15789474 L15.1609091,13.4210526 L2.83909091,13.4210526 M8.18181818,6.31578947 L8.18181818,9.47368421 L9.81818182,9.47368421 L9.81818182,6.31578947 M8.18181818,11.0526316 L8.18181818,12.6315789 L9.81818182,12.6315789 L9.81818182,11.0526316" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="16px" viewBox="0 0 20 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 10</title>
<defs>
<polyline id="path-1" points="2.31172354 9.13262023 5.98559527 12.3841839 14.2635346 3.60504792"></polyline>
</defs>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-738.000000, -2193.000000)">
<g id="编组-65备份" transform="translate(714.000000, 1798.000000)">
<g id="编组-12" transform="translate(0.000000, 380.500000)">
<g id="编组-10" transform="translate(24.000000, 14.500000)">
<g id="编组-7备份-3">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<polyline id="路径-8" stroke="#208F40" stroke-width="1.6" points="2.31172354 9.13262023 5.98559527 12.3841839 14.2635346 3.60504792"></polyline>
</g>
<g id="编组-7备份-4" transform="translate(4.000000, 0.000000)">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="路径-8">
<use stroke="#FFFFFF" stroke-width="3.68" xlink:href="#path-1"></use>
<use stroke="#208F40" stroke-width="1.6" xlink:href="#path-1"></use>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 48</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-776.000000, -26.000000)">
<g id="编组-19" transform="translate(556.000000, 0.000000)">
<g id="编组-7" transform="translate(190.000000, 26.000000)">
<g id="编组-48" transform="translate(30.000000, 0.000000)">
<rect id="矩形备份-4" x="0" y="0" width="16" height="16"></rect>
<g id="编组-4备份" transform="translate(1.000000, 1.000000)" stroke="#8A9099" stroke-width="1.68">
<rect id="矩形" x="0.84" y="0.84" width="4.54222222" height="4.54222222" rx="1.03703704"></rect>
<rect id="矩形备份-2" x="0.84" y="8.61777778" width="4.54222222" height="4.54222222" rx="1.03703704"></rect>
<path d="M12.962963,0.84 L13.16,5.18518519 L8.81481481,5.38222222 L8.61777778,1.03703704 L12.962963,0.84 Z" id="矩形备份" transform="translate(10.888889, 3.111111) rotate(-90.000000) translate(-10.888889, -3.111111) "></path>
<rect id="矩形备份-3" x="8.61777778" y="8.61777778" width="4.54222222" height="4.54222222" rx="1.03703704"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 3</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-580.000000, -18.000000)">
<g id="编组-19" transform="translate(556.000000, 0.000000)">
<g id="编组-3" transform="translate(24.000000, 18.000000)">
<g id="编组-35" fill="#A0C3FF">
<rect id="矩形" x="0" y="0" width="32" height="32" rx="16"></rect>
</g>
<circle id="椭圆形" fill="#4374E0" cx="16" cy="12" r="5.33333333"></circle>
<path d="M16,18.6666667 C21.403155,18.6666667 25.9722592,22.2376629 27.4759544,27.1482974 C24.5694157,30.1407649 20.5018317,32 16,32 C11.4981683,32 7.43058428,30.1407649 4.52321549,27.1482624 C6.02774083,22.2376629 10.596845,18.6666667 16,18.6666667 Z" id="形状结合" fill="#4374E0"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 20</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-806.000000, -26.000000)">
<g id="编组-19" transform="translate(556.000000, 0.000000)">
<g id="编组-7" transform="translate(190.000000, 26.000000)">
<g id="编组-20" transform="translate(60.000000, 0.000000)">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="SSH连接" transform="translate(0.500000, 2.000000)" stroke="#8A9099">
<rect id="矩形" stroke-width="1.6875" x="0.84375" y="0.84375" width="13.3125" height="10.3125" rx="1.40625"></rect>
<path d="M3.28125,2.76923077 L7.03125,5.53846154 L3.28125,8.30769231 M7.5,8.30769231 L11.71875,8.30769231" id="形状" stroke-width="1.5" stroke-linejoin="round"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 36</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-202.000000, -281.000000)">
<g id="编组-26" transform="translate(178.000000, 120.000000)">
<g id="编组-23" transform="translate(0.000000, 128.000000)">
<g id="编组-17" transform="translate(24.000000, 32.000000)">
<g id="编组-36" transform="translate(0.000000, 1.000000)">
<rect id="矩形" x="0" y="0" width="20" height="20"></rect>
<g id="编组" transform="translate(2.000000, 2.291879)" stroke="#8A9099" stroke-linejoin="round" stroke-width="1.64102564">
<path d="M0.205128205,0.833333333 C0.205128205,0.373095833 0.572484103,0 1.02564103,0 L5.94871795,0 L8,2.22752189 L14.974359,2.22752189 C15.4275282,2.22752189 15.7948718,2.60060522 15.7948718,3.06085522 L15.7948718,12.8747881 C15.7948718,13.3350381 15.4275282,13.7081214 14.974359,13.7081214 L1.02564103,13.7081214 C0.572484103,13.7081214 0.205128205,13.3350381 0.205128205,12.8747881 L0.205128205,0.833333333 Z" id="路径"></path>
<line x1="15.7948718" y1="5.37478808" x2="0.205128205" y2="5.37478808" id="路径"></line>
<line x1="0.205128205" y1="2.87478808" x2="0.205128205" y2="7.87478808" id="路径" stroke-linecap="round"></line>
<line x1="15.7948718" y1="2.87478808" x2="15.7948718" y2="7.87478808" id="路径" stroke-linecap="round"></line>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="25px" height="33px" viewBox="0 0 25 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 8备份 6</title>
<defs>
<linearGradient x1="-29.9370433%" y1="20.7762066%" x2="93.5116704%" y2="63.8685987%" id="linearGradient-1">
<stop stop-color="#1660FF" offset="0.0491695804%"></stop>
<stop stop-color="#6C95F7" offset="100%"></stop>
</linearGradient>
</defs>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="传输备份" transform="translate(-562.000000, -203.000000)">
<g id="编组-31备份-3" transform="translate(538.000000, 89.000000)">
<g id="编组-6" transform="translate(24.000000, 110.750000)">
<g id="编组-8备份-6" transform="translate(0.000000, 4.150000)">
<rect id="矩形" x="0" y="0" width="25" height="31.2"></rect>
<g id="编组-5" transform="translate(0.000000, 0.709091)">
<g id="编组-3" transform="translate(3.289474, 0.000000)">
<path d="M1.30909091,0 L14.5889944,0 L14.5889944,0 L21.7105263,6.50727755 L21.7105263,25.3704545 C21.7105263,26.0934455 21.1244264,26.6795455 20.4014354,26.6795455 L1.30909091,26.6795455 C0.586099964,26.6795455 9.76719274e-16,26.0934455 0,25.3704545 L0,1.30909091 C-8.85408547e-17,0.586099964 0.586099964,-8.92333229e-17 1.30909091,0 Z" id="矩形" fill="#E8EAF0"></path>
<path d="M14.5889944,4.43378667e-13 L14.5889944,5.19818664 C14.5889944,5.92117758 15.1750944,6.50727755 15.8980853,6.50727755 L21.7105263,6.50727755 L21.7105263,6.50727755 L14.5889944,4.43378667e-13 Z" id="路径-4" fill="#A7AEBC"></path>
<polygon id="路径-5" fill="#D3D8DF" points="17.4256221 6.50727755 21.7105263 10.4123947 21.7105263 6.50727755"></polygon>
</g>
<rect id="矩形" fill="url(#linearGradient-1)" x="0" y="11.4340909" width="21.7105263" height="11.4340909" rx="1.30909091"></rect>
<g id="data" transform="translate(3.138158, 14.702970)" fill="#FFFFFF" fill-rule="nonzero">
<path d="M0,0 L0,4.989075 L1.86710526,4.989075 C2.69934211,4.989075 3.32894737,4.765475 3.76315789,4.318275 C4.17565789,3.88505 4.38552632,3.2771375 4.38552632,2.4945375 C4.38552632,1.70495 4.18289474,1.0970375 3.77763158,0.6777875 C3.34342105,0.2236 2.71381579,0 1.88157895,0 L0,0 Z M0.788815789,0.6498375 L1.73684211,0.6498375 C2.38815789,0.6498375 2.86578947,0.796575 3.16973684,1.0970375 C3.45921053,1.3905125 3.61118421,1.8516875 3.61118421,2.4945375 C3.61118421,3.1234125 3.45921053,3.5845875 3.1625,3.88505 C2.85855263,4.1855125 2.37368421,4.3392375 1.72236842,4.3392375 L0.788815789,4.3392375 L0.788815789,0.6498375 Z" id="形状"></path>
<path d="M6.80263158,1.2787125 C6.33947368,1.2787125 5.96315789,1.355575 5.68815789,1.523275 C5.36973684,1.70495 5.16710526,1.998425 5.0875,2.389725 L5.84736842,2.4526125 C5.89078947,2.249975 5.99934211,2.1032375 6.17302632,2.0054125 C6.31776316,1.9215625 6.51315789,1.8796375 6.75197368,1.8796375 C7.31644737,1.8796375 7.59868421,2.1311875 7.59868421,2.6342875 L7.59868421,2.781025 L6.75921053,2.8019875 C6.20921053,2.8159625 5.775,2.920775 5.47105263,3.1304 C5.13815789,3.3470125 4.97171053,3.66145 4.97171053,4.066725 C4.97171053,4.3671875 5.0875,4.61175 5.32631579,4.8004125 C5.54342105,4.989075 5.84736842,5.0869 6.23815789,5.0869 C6.57105263,5.0869 6.86052632,5.0240125 7.10657895,4.9122125 C7.32368421,4.8074 7.50460526,4.6606625 7.64934211,4.4789875 L7.64934211,4.989075 L8.35855263,4.989075 L8.35855263,2.6832 C8.35855263,2.2429875 8.24276316,1.9075875 8.01842105,1.677 C7.75789474,1.411475 7.35263158,1.2787125 6.80263158,1.2787125 Z M7.59868421,3.3190625 L7.59868421,3.5286875 C7.59868421,3.8081875 7.47565789,4.0457625 7.24407895,4.234425 C7.0125,4.4230875 6.7375,4.5209125 6.41184211,4.5209125 C6.21644737,4.5209125 6.05723684,4.472 5.94144737,4.3811625 C5.81842105,4.290325 5.76052632,4.178525 5.76052632,4.038775 C5.76052632,3.591575 6.10789474,3.354 6.80986842,3.340025 L7.59868421,3.3190625 Z" id="形状"></path>
<path d="M10.3703947,0.209625 L9.60328947,0.517075 L9.60328947,1.3765375 L8.90855263,1.3765375 L8.90855263,1.9914375 L9.60328947,1.9914375 L9.60328947,4.0876875 C9.60328947,4.374175 9.66842105,4.5907875 9.81315789,4.7445125 C9.95789474,4.905225 10.1967105,4.989075 10.5151316,4.989075 L11.1302632,4.989075 L11.1302632,4.374175 L10.6381579,4.374175 C10.5440789,4.374175 10.4789474,4.346225 10.4355263,4.3043 C10.3921053,4.2553875 10.3703947,4.1855125 10.3703947,4.0876875 L10.3703947,1.9914375 L11.2243421,1.9914375 L11.2243421,1.3765375 L10.3703947,1.3765375 L10.3703947,0.209625 Z" id="路径"></path>
<path d="M13.5256579,1.2787125 C13.0625,1.2787125 12.6861842,1.355575 12.4111842,1.523275 C12.0927632,1.70495 11.8901316,1.998425 11.8105263,2.389725 L12.5703947,2.4526125 C12.6138158,2.249975 12.7223684,2.1032375 12.8960526,2.0054125 C13.0407895,1.9215625 13.2361842,1.8796375 13.475,1.8796375 C14.0394737,1.8796375 14.3217105,2.1311875 14.3217105,2.6342875 L14.3217105,2.781025 L13.4822368,2.8019875 C12.9322368,2.8159625 12.4980263,2.920775 12.1940789,3.1304 C11.8611842,3.3470125 11.6947368,3.66145 11.6947368,4.066725 C11.6947368,4.3671875 11.8105263,4.61175 12.0493421,4.8004125 C12.2664474,4.989075 12.5703947,5.0869 12.9611842,5.0869 C13.2940789,5.0869 13.5835526,5.0240125 13.8296053,4.9122125 C14.0467105,4.8074 14.2276316,4.6606625 14.3723684,4.4789875 L14.3723684,4.989075 L15.0815789,4.989075 L15.0815789,2.6832 C15.0815789,2.2429875 14.9657895,1.9075875 14.7414474,1.677 C14.4809211,1.411475 14.0756579,1.2787125 13.5256579,1.2787125 Z M14.3217105,3.3190625 L14.3217105,3.5286875 C14.3217105,3.8081875 14.1986842,4.0457625 13.9671053,4.234425 C13.7355263,4.4230875 13.4605263,4.5209125 13.1348684,4.5209125 C12.9394737,4.5209125 12.7802632,4.472 12.6644737,4.3811625 C12.5414474,4.290325 12.4835526,4.178525 12.4835526,4.038775 C12.4835526,3.591575 12.8309211,3.354 13.5328947,3.340025 L14.3217105,3.3190625 Z" id="形状"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 20</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-746.000000, -26.000000)">
<g id="编组-19" transform="translate(556.000000, 0.000000)">
<g id="编组-20" transform="translate(190.000000, 26.000000)">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组" transform="translate(1.500000, 2.500000)" stroke="#8A9099" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8">
<path d="M0,0.676115764 L0,11 L1.16071429,4.23884236 L11.0732143,4.23884236 L11.0732143,1.96129929 C11.0732143,1.58788055 10.7822093,1.28518353 10.4232143,1.28518353 L6.5,1.28518353 L4.875,0 L0.65,0 C0.29101475,0 0,0.302707169 0,0.676115764 Z" id="路径"></path>
<polygon id="路径" points="11.7 11 13 4.23884236 1.5640625 4.23884236 0 11"></polygon>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 14</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-836.000000, -26.000000)">
<g id="编组-19" transform="translate(556.000000, 0.000000)">
<g id="编组-7" transform="translate(190.000000, 26.000000)">
<g id="编组-14" transform="translate(90.000000, 0.000000)">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-13" transform="translate(1.510000, 0.700000)" stroke="#8A9099" stroke-width="2">
<path d="M0,13 L0,6.14912527 C-1.29033365e-15,5.86105827 0.124226344,5.58698374 0.340858081,5.3971067 L5.83946185,0.577597741 C6.21662517,0.247015269 6.78032581,0.246948478 7.15756746,0.577441563 L12.6589637,5.39709336 C12.8757026,5.58697354 13,5.86111843 13,6.14926811 L13,13 L13,13" id="路径-9"></path>
<line x1="6.5" y1="13" x2="6.5" y2="7" id="路径-10"></line>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="187px" height="42px" viewBox="0 0 187 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>北鲲云logo_备份</title>
<defs>
<polygon id="path-1" points="0 0 75.6028237 0 75.6028237 24.4008147 0 24.4008147"></polygon>
</defs>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="登录初始化" transform="translate(-828.000000, -248.000000)">
<g id="编组-9" transform="translate(695.000000, 180.000000)">
<g id="北鲲云logo_备份" transform="translate(133.000000, 68.000000)">
<path d="M61.9394468,25.0906397 C61.9394468,25.0906397 56.3541226,21.5107675 52.5768196,19.1189791 C45.5019249,14.6367879 37.1342295,11.1127363 28.7925439,12.5411016 C41.5504692,15.0920822 49.839909,25.4478459 53.0852549,28.4915643 L61.9394468,25.0906397 Z" id="Fill-1" fill="#00CCCC"></path>
<g id="编组" transform="translate(22.623039, 17.599185)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Clip-4"></g>
<path d="M75.5781774,4.57426286 C75.3814075,2.36785417 67.203923,-1.36133257 53.6378842,0.508084806 C34.8431949,3.0969683 25.1605339,12.927145 0,9.62476796 C3.0730026,11.7333182 6.80190478,13.9477669 11.2357859,16.1716339 C30.6268915,25.8954528 48.8491387,26.6009063 61.477015,20.3944773 C74.124342,14.1774815 75.8450606,7.57640291 75.5781774,4.57426286" id="Fill-3" fill="#0066FF" mask="url(#mask-2)"></path>
</g>
<path d="M98.162677,21.9803041 C97.072979,29.5402114 80.464697,29.0839982 63.4332468,15.3374174 C51.447926,5.66367637 36.4997484,-2.47005803 22.7213339,0.694260523 C40.2944667,3.13589696 50.8146436,14.5768324 60.8456099,23.3039196 C72.6242092,33.5485014 84.8494988,37.6185846 93.4386168,31.7948602 C94.930223,30.5013373 98.8658466,26.2495498 98.162677,21.9803041" id="Fill-5" fill="#00CCCC"></path>
<path d="M11.1502928,21.3519428 C7.03463605,20.0416507 4.80819624,21.3737657 0.310308351,20.6026138 C7.25741573,24.5622043 15.4290198,26.3723553 22.6231073,27.2239073 C24.7109035,27.4731476 27.1049369,28.0607575 30.3220113,27.8618247 C28.146234,27.6240701 25.8232187,26.4961714 22.7210399,23.7954169 C17.9526499,19.6428662 10.7099354,13.6629358 0,12.7068637 C6.2129522,15.4730869 7.81967999,18.8742412 11.1502928,21.3519428" id="Fill-7" fill="#0066FF"></path>
<polygon id="Fill-9" fill="#4D4D4D" points="111.667514 24.3925371 104.344282 24.3925371 104.344282 27.1442882 111.667514 27.1442882 111.667514 33.6459004 104.346317 37.0799039 104.346317 40.3342706 111.667514 36.8981996 111.667514 41.3066524 114.598706 41.3066524 114.598706 16.7400547 111.667514 16.7400547"></polygon>
<path d="M121.042625,29.2279833 C123.57485,28.2367649 126.316058,26.9595517 128.284209,25.7018643 L128.284209,22.4500245 C126.095314,23.7442365 123.654915,24.9274964 121.042625,25.9582258 L121.042625,16.7397791 L118.107588,16.7397791 L118.107588,38.4569969 C118.107588,40.5058214 118.849207,41.3068362 121.042625,41.3068362 L127.776,41.3068362 L128.771837,38.5566931 L121.042625,38.5566931 L121.042625,29.2279833 Z" id="Fill-11" fill="#4D4D4D"></path>
<path d="M187,28.3230227 L187,25.5712716 L162.573395,25.5712716 L162.573395,28.3230227 L169.091906,28.3230227 L164.347264,38.5565782 C163.677342,39.9973482 164.645585,41.2584813 166.297321,41.2584813 L173.567855,41.2584813 L176.293005,41.2584813 L183.571455,41.2584813 C185.218215,41.2584813 186.184423,39.9973482 185.516536,38.5565782 L182.472936,31.9911054 L179.161095,31.9911054 L182.203565,38.5565782 L176.293005,38.5565782 L173.567855,38.5565782 L167.66114,38.5565782 L172.404651,28.3230227 L187,28.3230227 Z" id="Fill-13" fill="#4D4D4D"></path>
<polygon id="Fill-15" fill="#4D4D4D" points="165.355608 20.2395958 184.214304 20.2395958 184.214304 17.4892229 165.355608 17.4892229"></polygon>
<polygon id="Fill-17" fill="#4D4D4D" points="133.452065 41.3068362 144.188688 39.3142918 144.188688 36.7982278 133.452065 38.7916911"></polygon>
<path d="M134.23505,33.9252333 L134.23505,36.0454991 L136.488857,36.0454991 L137.902207,36.0454991 L140.105804,36.0454991 L143.821588,36.0454991 L143.821588,34.6862778 L143.821588,33.9252333 L143.821588,26.3246665 C143.821588,24.8179685 143.279905,24.2310477 141.668202,24.2310477 L141.437054,24.2310477 C142.22549,22.6053575 143.060066,20.4072185 143.060066,19.6500792 C143.060066,18.8750222 142.862391,18.6848185 141.980772,18.6848185 L138.424439,18.6848185 C138.59633,18.0400096 138.730903,17.3903768 138.791517,16.7395953 L136.343202,16.7395953 C135.885203,19.1290865 135.201258,20.8620534 133.304351,22.984846 L133.304351,26.0508467 C133.632754,25.805971 133.936051,25.5457043 134.23505,25.2849783 L134.23505,33.9252333 Z M136.488857,29.1016863 L137.901755,29.1016863 L137.901755,26.3513134 L136.488857,26.3513134 L136.488857,29.1016863 Z M136.488857,33.9252333 L137.901755,33.9252333 L137.901755,31.1746308 L136.488857,31.1746308 L136.488857,33.9252333 Z M140.105804,33.9252333 L141.569817,33.9252333 L141.569817,31.1746308 L140.105804,31.1746308 L140.105804,33.9252333 Z M140.105804,29.1016863 L141.569817,29.1016863 L141.569817,26.3513134 L140.105804,26.3513134 L140.105804,29.1016863 Z M137.625373,20.8558511 L140.513366,20.8558511 C140.166418,21.8792297 139.714752,22.9370654 138.9763,24.2310477 L137.902207,24.2310477 L136.488857,24.2310477 L135.758999,24.2310477 L135.323391,24.2310477 C136.289147,23.1909 137.055192,22.0499076 137.625373,20.8558511 L137.625373,20.8558511 Z" id="Fill-18" fill="#4D4D4D"></path>
<path d="M157.169438,27.9255246 L157.169438,26.5651547 L157.169438,25.8061777 L157.169438,19.3139838 C157.169438,17.8088938 156.628661,17.2208244 155.0156,17.2208244 L147.294305,17.2208244 L146.563316,17.2208244 L145.040951,17.2208244 L145.040951,25.8061777 L145.040951,27.9255246 L147.294305,27.9255246 L157.169438,27.9255246 Z M147.294305,21.5128119 L154.918346,21.5128119 L154.918346,19.3406307 L147.294305,19.3406307 L147.294305,21.5128119 Z M147.294305,25.8061777 L154.918346,25.8061777 L154.918346,23.6335371 L147.294305,23.6335371 L147.294305,25.8061777 Z" id="Fill-19" fill="#4D4D4D"></path>
<polygon id="Fill-20" fill="#4D4D4D" points="147.294395 34.4741823 151.288598 34.4741823 151.288598 32.3539166 147.294395 32.3539166 147.294395 29.1278048 145.041041 29.1278048 145.041041 32.3539166 145.041041 34.4741823 145.041041 39.1865475 145.041041 41.3068132 147.294395 41.3068132 150.879678 41.3068132 151.64414 39.1865475 147.294395 39.1865475"></polygon>
<path d="M154.397064,34.916337 C155.831901,34.3983305 157.025412,33.8881344 158.298536,33.2688239 L158.298536,31.0242826 C157.001438,31.6626594 155.795487,32.1666533 154.397064,32.6688094 L154.397064,29.1279886 L152.142579,29.1279886 L152.142579,39.2129188 C152.142579,40.7214545 152.685392,41.3065376 154.298905,41.3065376 L158.000893,41.3065376 L158.746583,39.1867313 L154.397064,39.1867313 L154.397064,34.916337 Z" id="Fill-21" fill="#4D4D4D"></path>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="192px" height="120px" viewBox="0 0 192 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 5</title>
<defs>
<linearGradient x1="33.6183035%" y1="100%" x2="33.6183035%" y2="5.98826544e-13%" id="linearGradient-1">
<stop stop-color="#EBEDF2" stop-opacity="0" offset="0%"></stop>
<stop stop-color="#E5E8EF" offset="53.8662878%"></stop>
<stop stop-color="#D8DCE6" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="95.5415697%" id="linearGradient-2">
<stop stop-color="#CDD3E1" offset="0%"></stop>
<stop stop-color="#CDD3E1" stop-opacity="0.397399476" offset="31.1672026%"></stop>
<stop stop-color="#CDD3E1" stop-opacity="0" offset="100%"></stop>
</linearGradient>
<linearGradient x1="79.5210868%" y1="36.502654%" x2="43.538716%" y2="68.2268762%" id="linearGradient-3">
<stop stop-color="#F3F4F6" offset="0%"></stop>
<stop stop-color="#DEE2EB" offset="100%"></stop>
</linearGradient>
<linearGradient x1="87.6946467%" y1="100%" x2="12.3053533%" y2="30.8681882%" id="linearGradient-4">
<stop stop-color="#D8DCE6" offset="0%"></stop>
<stop stop-color="#EDF0F5" offset="100%"></stop>
</linearGradient>
<linearGradient x1="79.6103369%" y1="25.4995301%" x2="13.5823999%" y2="81.9840829%" id="linearGradient-5">
<stop stop-color="#F5F7FA" offset="0%"></stop>
<stop stop-color="#F2F3F5" offset="100%"></stop>
</linearGradient>
<linearGradient x1="85.3345299%" y1="44.0928232%" x2="21.7248806%" y2="51.8002766%" id="linearGradient-6">
<stop stop-color="#E8EAEF" offset="0%"></stop>
<stop stop-color="#F2F4F7" offset="100%"></stop>
</linearGradient>
<linearGradient x1="55.2719939%" y1="6.12010442e-13%" x2="45.6676211%" y2="95.6587127%" id="linearGradient-7">
<stop stop-color="#E8EBF2" offset="0%"></stop>
<stop stop-color="#D6DCEB" offset="100%"></stop>
</linearGradient>
<linearGradient x1="98.3245421%" y1="-10.6552489%" x2="-32.0634654%" y2="161.063163%" id="linearGradient-8">
<stop stop-color="#F2F6FA" offset="0%"></stop>
<stop stop-color="#E8EAED" stop-opacity="0.946978802" offset="29.7382561%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
</defs>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-858.000000, -577.000000)">
<g id="编组-19备份" transform="translate(779.000000, 434.000000)">
<g id="编组-5" transform="translate(79.000000, 143.000000)">
<rect id="矩形" x="0" y="0" width="192" height="120"></rect>
<g id="编组-2" transform="translate(35.670000, 13.684411)">
<g id="编组-79" transform="translate(7.000000, 21.000000)">
<rect id="矩形" fill="url(#linearGradient-1)" x="52.90675" y="54.9146341" width="11.5437566" height="24.0853659"></rect>
<rect id="矩形" fill="url(#linearGradient-2)" x="58.678629" y="54.9146341" width="5.77187831" height="24.0853659"></rect>
<path d="M31.2036023,10.597561 L72.8036023,10.597561 C83.4074695,10.597561 92.0036023,19.1936938 92.0036023,29.797561 L92.0036023,52.9946341 C92.0036023,54.0550209 91.143989,54.9146341 90.0836023,54.9146341 L12.0036023,54.9146341 L12.0036023,54.9146341 L12.0036023,29.797561 C12.0036023,19.1936938 20.5997351,10.597561 31.2036023,10.597561 Z" id="矩形" fill="url(#linearGradient-3)"></path>
<path d="M31.2431966,10.597561 C41.8689312,10.597561 50.482791,19.2114208 50.482791,29.8371553 L50.482791,54.9146341 L50.482791,54.9146341 L12.0036023,54.9146341 L12.0036023,29.8371553 C12.0036023,19.2114208 20.6174621,10.597561 31.2431966,10.597561 Z" id="矩形" fill="url(#linearGradient-4)"></path>
<path d="M31.2431966,11.097561 C36.4179927,11.097561 41.1028913,13.1950615 44.4940909,16.5862611 C47.8852905,19.9774607 49.982791,24.6623592 49.982791,29.8371553 L49.982791,29.8371553 L49.982791,54.4146341 L12.5036023,54.4146341 L12.5036023,29.8371553 C12.5036023,24.6623592 14.6011028,19.9774607 17.9923024,16.5862611 C21.383502,13.1950615 26.0684006,11.097561 31.2431966,11.097561 Z" id="矩形" stroke="url(#linearGradient-5)"></path>
<path d="M12.0036023,54.9146341 L50.482791,54.9146341 L47.9266253,58.6097302 C42.0101161,67.1624115 32.2727367,72.2665862 21.8730521,72.2665862 L19.2395944,72.2665862 C13.6697585,72.2665862 9.15451443,67.7513421 9.15451443,62.1815062 C9.15451443,60.131401 9.77931307,58.1299822 10.9456433,56.4439795 L12.0036023,54.9146341 L12.0036023,54.9146341 Z" id="矩形" fill="url(#linearGradient-6)"></path>
<g id="编组-78" transform="translate(69.722385, 0.000000)">
<path d="M16.3536552,0 L12.5757118,4.81707317 L16.3536552,9.63414634 L4.04,9.634 L4.04089203,27.0528311 C5.57743267,27.4101434 6.73385803,28.9651341 6.73385803,30.8292683 C6.73385803,32.9575851 5.22643256,34.6829268 3.36692901,34.6829268 C1.50742547,34.6829268 0,32.9575851 0,30.8292683 C0,29.043411 1.06134547,27.5412798 2.50147148,27.1041124 L2.501,9.634 L1.92395944,9.63414634 L1.92395944,0 L16.3536552,0 Z" id="形状结合备份" fill="#CDD3E1"></path>
<path d="M17.3156349,0 L13.5376916,4.81707317 L17.3156349,9.63414634 L5.00197972,9.634 L5.00287174,27.0528311 C6.53941238,27.4101434 7.69583774,28.9651341 7.69583774,30.8292683 C7.69583774,32.9575851 6.18841228,34.6829268 4.32890873,34.6829268 C2.46940518,34.6829268 0.961979718,32.9575851 0.961979718,30.8292683 C0.961979718,29.043411 2.02332519,27.5412798 3.4634512,27.1041124 L3.46297972,9.634 L2.88593915,9.63414634 L2.88593915,0 L17.3156349,0 Z" id="形状结合" fill="url(#linearGradient-7)"></path>
</g>
</g>
<g id="编组" transform="translate(20.239203, 21.189052) scale(-1, 1) translate(-20.239203, -21.189052) ">
<path d="M35.6058653,4.23314168 C26.9123119,19.2246172 19.5240882,27.7403326 13.441194,29.7802879 C10.2433104,31.00036 4.95099184,29.2438597 8.28870142,24.819926 C10.0267969,22.4145379 13.4412504,23.7181562 13.4412205,26.925986 C13.4411907,30.1338158 13.7734299,36.1753923 4.87253976,38.1449626" id="路径-22备份-2" stroke="url(#linearGradient-8)" stroke-width="1.06" stroke-linecap="round" transform="translate(20.239203, 21.189052) scale(-1, 1) rotate(20.000000) translate(-20.239203, -21.189052) "></path>
<path d="M30.0861271,3.91792961 C29.2669238,6.00459208 28.857319,7.75580113 28.8573126,9.17155674 C28.8573031,11.2951902 26.2902016,15.6373612 18.9532695,14.8733441 C18.7711127,15.185291 20.6752726,13.0989907 21.1429743,11.1352899 C21.610676,9.17158915 24.8561334,8.07912635 26.4174296,7.70764118 C27.4582937,7.4599844 28.6811929,6.19674721 30.0861271,3.91792961 Z" id="路径-23备份-2" fill="#EBECED" transform="translate(24.513579, 9.440178) scale(-1, 1) rotate(9.000000) translate(-24.513579, -9.440178) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>项目设置</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="消息与设置备份-2" transform="translate(-866.000000, -26.000000)" stroke="#8A9099" stroke-width="1.8">
<g id="编组-19" transform="translate(556.000000, 0.000000)">
<g id="编组-7" transform="translate(190.000000, 26.000000)">
<g id="项目设置" transform="translate(120.000000, 0.000000)">
<path d="M5.6468635,0.898881955 C6.14528043,1.30537285 7.24167646,2.18357391 8.0410091,2.18357391 C8.8308373,2.18357391 9.92398309,1.32150761 10.2368179,0.980034551 L10.2368179,0.980034551 L12.3308993,2.04696616 C12.3431614,2.3648859 12.1321914,2.92987668 12.1321914,3.4239819 C12.1321914,4.2305816 12.4452664,4.95998211 12.9450283,5.48894606 C13.4514699,6.02498009 14.1479355,6.35630737 14.9145081,6.3705714 C14.9531794,6.54087453 15.1,7.35349198 15.1,8.00533082 C15.1,8.6556832 14.9533984,9.46726628 14.9466572,9.50421289 C14.1428065,9.67528346 13.4689798,9.99804986 12.9763084,10.4987773 C12.4525703,11.0310794 12.1322113,11.7686647 12.1322113,12.5854135 C12.1322113,13.0881341 12.3455712,13.6509669 12.3636551,13.6967454 L12.3636551,13.6967454 L10.4567007,15.0578787 C9.90039296,14.6711203 8.77874757,13.7390234 7.95899092,13.7390234 C7.20266609,13.7390234 6.11156957,14.5617994 5.71504051,15.0152684 L5.71504051,15.0152684 L3.66760003,13.961537 C3.64448937,13.6755001 3.86780868,13.0962911 3.86780868,12.5853924 C3.86780868,11.7789547 3.55471922,11.0495828 3.05489403,10.5206282 C2.54849651,9.98471816 1.85211955,9.65342374 1.08567986,9.63912038 C1.04511493,9.46051033 0.9,8.65262466 0.9,8.0053097 C0.9,7.3565262 1.04535289,6.54758129 1.05337791,6.50491397 C1.85713453,6.33424414 2.53081339,6.01155261 3.02338319,5.51111858 C3.54737112,4.97876482 3.86780868,4.2410476 3.86780868,3.42400299 C3.86780868,2.91699387 3.65075835,2.34910553 3.63542293,2.31052944 L3.63542293,2.31052944 Z" id="路径" fill-rule="nonzero"></path>
<circle id="椭圆形备份" cx="8" cy="8" r="2.3"></circle>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="19px" viewBox="0 0 20 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 7备份</title>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="传输备份" transform="translate(-844.000000, -260.000000)">
<g id="编组-31备份-3" transform="translate(538.000000, 89.000000)">
<g id="编组-7备份" transform="translate(306.000000, 171.000000)">
<rect id="矩形" x="0" y="0" width="20" height="19"></rect>
<polyline id="路径-8" stroke="#208F40" stroke-width="2" points="2.88965442 10.8449865 7.48199409 14.7062184 17.8294182 4.2809944"></polyline>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="192px" height="120px" viewBox="0 0 192 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 4</title>
<defs>
<linearGradient x1="4.14246223%" y1="50.7022018%" x2="100%" y2="50%" id="linearGradient-1">
<stop stop-color="#FFFFFF" offset="0%"></stop>
<stop stop-color="#E1E4EB" offset="100%"></stop>
</linearGradient>
<linearGradient x1="81.5371017%" y1="45.668127%" x2="12.3149931%" y2="55.5036963%" id="linearGradient-2">
<stop stop-color="#F3F4F6" offset="0%"></stop>
<stop stop-color="#E1E5EE" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
<stop stop-color="#E8EBF5" offset="0%"></stop>
<stop stop-color="#E3E6ED" offset="100%"></stop>
</linearGradient>
<linearGradient x1="89.2765811%" y1="49.1536614%" x2="1.69393633%" y2="51.1048509%" id="linearGradient-4">
<stop stop-color="#F5F7FA" offset="0%"></stop>
<stop stop-color="#F2F3F5" offset="100%"></stop>
</linearGradient>
<linearGradient x1="98.3245421%" y1="-10.6552489%" x2="-32.0634654%" y2="161.063163%" id="linearGradient-5">
<stop stop-color="#F2F6FA" offset="0%"></stop>
<stop stop-color="#E8EAED" stop-opacity="0.946978802" offset="29.7382561%"></stop>
<stop stop-color="#FFFFFF" offset="100%"></stop>
</linearGradient>
</defs>
<g id="最新版本" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="传输备份" transform="translate(-196.000000, -232.000000)">
<g id="编组-31备份-2" transform="translate(117.000000, 89.000000)">
<g id="编组-4" transform="translate(79.000000, 143.000000)">
<rect id="矩形" x="0" y="0" width="192" height="120"></rect>
<g id="编组-3" transform="translate(32.400000, 12.684411)">
<g id="编组-77" transform="translate(0.000000, 40.315589)">
<polygon id="路径-28" fill="url(#linearGradient-1)" points="109.675487 45.5543123 8.32442588 59 1.21084329e-15 34.3245048 66.5227448 24.6122388"></polygon>
<g id="编组-75" transform="translate(16.135099, 0.000000)">
<path d="M0,17.6315477 L94.8649012,17.6315477 L94.8649012,44.1543123 C94.8649012,44.927511 94.2380999,45.5543123 93.4649012,45.5543123 L1.4,45.5543123 C0.62680135,45.5543123 -1.2375781e-15,44.927511 0,44.1543123 L0,17.6315477 L0,17.6315477 Z" id="矩形" fill="url(#linearGradient-2)"></path>
<polygon id="路径-24" fill="url(#linearGradient-3)" points="0 17.6315477 14.5949617 9.09370612e-13 81.6808065 9.09494702e-13 94.8649012 17.6315477"></polygon>
<polygon id="路径-25" fill="#D8DCE6" points="81.6808065 9.09494702e-13 81.6808065 17.6315477 94.8649012 17.6315477"></polygon>
<polygon id="路径-26" fill="#EAEEF5" points="14.5949617 9.09494702e-13 2.9918383e-16 17.6315477 14.5949617 17.6315477"></polygon>
<path d="M14.8419121,0.525 L81.4178346,0.525 L93.8167856,17.1065477 L1.11611463,17.1065477 L14.8419121,0.525 Z" id="路径-27" stroke="url(#linearGradient-4)" stroke-width="1.05"></path>
</g>
<path d="M32.1784277,24.6122388 L38.456252,31.8964383 L34.5246033,31.8962388 L34.5246852,38.5736212 L29.5966384,38.5736212 L29.5966033,31.8962388 L25.9006033,31.8964383 L32.1784277,24.6122388 Z" id="形状结合" fill="#CDD3E1"></path>
<g id="编组-76" transform="translate(77.518270, 28.800654)" fill="#CDD3E1" stroke="#CDD3E1" stroke-width="2.8">
<ellipse id="椭圆形" cx="22.3211532" cy="2.79227647" rx="1.39014415" ry="1.39227647"></ellipse>
<ellipse id="椭圆形备份-6" cx="12.5556487" cy="2.79227647" rx="1.39014415" ry="1.39227647"></ellipse>
<ellipse id="椭圆形备份-7" cx="2.79014415" cy="2.79227647" rx="1.39014415" ry="1.39227647"></ellipse>
</g>
<path d="M16.1350988,44.1581741 L111,44.1581741 C111,44.92924 110.374928,45.5543123 109.603862,45.5543123 L17.531237,45.5543123 C16.7601711,45.5543123 16.1350988,44.92924 16.1350988,44.1581741 L16.1350988,44.1581741 L16.1350988,44.1581741 Z" id="矩形" fill="#CDD3E1" opacity="0.196730841"></path>
</g>
<path d="M105.879028,4.54835376 C97.185475,19.5398293 89.7972513,28.0555447 83.7143571,30.0954999 C80.5164735,31.315572 75.2241549,29.5590717 78.5618645,25.1351381 C80.29996,22.72975 83.7144135,24.0333683 83.7143836,27.2411981 C83.7143538,30.4490279 84.046593,36.4906044 75.1457029,38.4601746" id="路径-22备份" stroke="url(#linearGradient-5)" stroke-width="1.06" stroke-linecap="round" transform="translate(90.512366, 21.504264) scale(-1, 1) rotate(20.000000) translate(-90.512366, -21.504264) "></path>
<path d="M96.2820131,0.803750554 C95.4628098,2.89041303 95.0532049,4.64162207 95.0531986,6.05737768 C95.0531891,8.1810111 92.4860876,12.5231821 85.1491555,11.759165 C84.9669987,12.071112 86.8711586,9.98481166 87.3388602,8.02111088 C87.8065619,6.05741009 91.0520194,4.9649473 92.6133156,4.59346213 C93.6541797,4.34580535 94.8770789,3.08256816 96.2820131,0.803750554 Z" id="路径-23备份" fill="#EBECED" transform="translate(90.709465, 6.325999) scale(-1, 1) rotate(9.000000) translate(-90.709465, -6.325999) "></path>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
import Controller from './controller';
import store from '../reduxs/store';
import { setRequest } from '../reduxs/actions';
import qs from 'qs';
import API from '../../commons/utils/api_manager';
import { Constants } from '../../commons/utils/constants';
import axios from 'axios';
const { ipcRenderer } = require('electron');
const electron = window.require('electron');
class Axios {
static async request({
url = '',
type = 'get',
param = {},
actions,
timeout,
isheader = true,
noheader = false,
fileType = false,
other,
}) {
try {
let res = await Controller.awaitAxios({
url,
type,
param,
timeout,
isheader,
noheader,
fileType,
other,
});
return {
code: 200,
status: 'success',
res,
};
} catch (error) {
if (error.response.data.errorCode === '100003') {
let reLoad = await Axios.request_reLoad();
console.log('reLoad: ', reLoad);
if (reLoad['access_token']) {
localStorage.setItem(
Constants.TOKEN_KEY,
JSON.stringify(data)
);
window.location.reload();
} else {
setTimeout(() => {
localStorage.removeItem(Constants.TEMPORARY_TOKEN_KEY);
localStorage.removeItem(Constants.TOKEN_KEY);
}, 3000);
}
return;
}
actions && store.dispatch(setRequest(error));
if (!actions) {
return {
code: 40001,
status: 'fail',
error: error.response ? error.response.data : error,
};
}
}
}
static request_reLoad() {
let token =
localStorage.getItem(Constants.TOKEN_KEY) &&
JSON.parse(localStorage.getItem(Constants.TOKEN_KEY)).refresh_token;
let data = qs.stringify({
scope: 'ui',
grant_type: 'refresh_token',
refresh_token: token,
});
return new Promise((resolve, reject) => {
axios
.post(API.API_USER_LOGIN, data, {
headers: {
Authorization: 'Basic YnJvd3Nlcjo=',
'Content-Type': 'application/x-www-form-urlencoded',
},
})
.then(function (response) {
console.log('response: ', response);
resolve(response.data);
})
.catch(function (error) {
electron.ipcRenderer.send('openLogin-windown');
reject(error);
});
});
}
}
export default Axios;
import axios from 'axios';
import HeadersComponent from './header';
let headers = {
'Content-Type': 'application/json',
'Accept-Language': 'zh-CN,zh;q=0.5', //中文
};
let headersTemp = {};
class Controller {
static awaitAxios({
url,
type,
param,
store,
timeout,
isheader,
noheader,
fileType,
other,
}) {
// 发送 POST 请求
return new Promise((resolve, reject) => {
if (isheader && !HeadersComponent(headers)) {
reject({
message: '你还没有登陆或凭证过期,请重新登陆',
status: 'error',
});
return;
}
if (isheader && typeof isheader === 'object') {
headersTemp = {
...headers,
...isheader,
};
}
const json = {
url: url || '',
method: type || 'get',
responseType: fileType ? 'arraybuffer' : '',
headers: noheader
? {}
: isheader && typeof isheader === 'object'
? headersTemp
: headers,
data: param,
timeout: timeout || 200000,
...other,
};
axios(json)
.then(function (response) {
if (fileType) {
resolve(response);
} else {
resolve(response.data);
}
})
.catch((error) => {
reject(error);
});
});
}
}
export default Controller;
import { Constants } from '../utils/constants';
const HeadersComponent = (headers) => {
let token =
localStorage.getItem(Constants.TOKEN_KEY) &&
JSON.parse(localStorage.getItem(Constants.TOKEN_KEY)).access_token;
if (token) {
headers['Authorization'] = 'Bearer ' + token;
headers['Accept-Language'] = 'zh-CN,zh,q=0.5';
// headers['Accept-Language'] =
// getLanguage() === 'en' ? 'en-US,en;q=0.5' : 'zh-CN,zh,q=0.5';
return true;
}
return false;
};
export default HeadersComponent;
import React, { useState } from 'react';
import { SnackbarContent, Snackbar, Grid } from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import { useNavigate } from 'react-router-dom';
import { makeStyles } from 'tss-react/mui';
import alert_error from '../assets/img/alert_error.svg';
import alert_success from '../assets/img/alert_success.svg';
import alert_warning from '../assets/img/alert_warning.svg';
const { ipcRenderer } = require('electron');
const electron = window.require('electron');
const useStyles = makeStyles()((_theme) => {
return {
body: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
},
message: {
width: '100%',
fontSize: '14px',
},
text_warning: {
color: '#FFB919',
fontSize: '14px',
},
text_error: {
color: '#FF4E4E',
fontSize: '14px',
},
text_success: {
color: '#02AB83',
},
body_warning: {
background: '#FFF6E2',
boxShadow: 'none',
},
body_error: {
background: '#FFEDED',
boxShadow: 'none',
},
body_success: {
background: '#D9FFEE',
boxShadow: 'none',
},
};
});
const variantIcon = {
success: alert_success,
warning: alert_warning,
error: alert_error,
};
export default () => {
const { classes } = useStyles();
const navigate = useNavigate();
const [onloading, setOnloading] = useState(false);
const [messages, setMessages] = useState<{
message: string;
messagetype: 'success' | 'warning' | 'error';
}>({
message: '',
messagetype: 'success',
});
const Icon = variantIcon[messages.messagetype];
const handleClose = (_e: any) => {
setMessages(() => {
return {
message: '',
messagetype: 'success',
};
});
};
const ipcSend = (type: string) => {
electron.ipcRenderer.send(type);
};
const render = (dom: any) => {
return (
<React.Fragment>
{dom}
<Snackbar
anchorOrigin={{
vertical: 'top',
horizontal: 'center',
}}
sx={{ maxWidth: '380px', margin: '0 auto' }}
autoHideDuration={3000}
open={messages['message'] ? true : false}
onClose={handleClose}
key={messages['message']}
>
<SnackbarContent
message={
<Grid className={classes.body}>
<Grid
sx={{
display: 'flex',
alignItems: 'center',
}}
>
<img
src={Icon}
style={{ marginRight: '10px' }}
/>
<Grid
className={
classes[
`text_${messages.messagetype}`
]
}
>
{messages['message']}
</Grid>
</Grid>
<CloseIcon
fontSize="small"
className={
classes[`text_${messages.messagetype}`]
}
/>
</Grid>
}
classes={{
root: classes[`body_${messages.messagetype}`],
message: classes.message,
}}
/>
</Snackbar>
</React.Fragment>
);
};
return { render, navigate, setMessages, setOnloading, ipcSend };
};
// 设置 http请求错误
export const setRequest = (data) => {
return {
type: 'httpRequestError',
state: data,
};
};
import { combineReducers } from 'redux';
import setRequestReducer from './reducers/setRequestReducer.js';
const reducer = combineReducers({
httpRequestError: setRequestReducer,
});
export default reducer;
const setRequestReducer = (state = {}, action) => {
switch (action.type) {
case 'httpRequestError':
return action.state;
default:
return state;
}
};
export default setRequestReducer;
import { createStore, combineReducers } from 'redux';
import reducer from './reducer.js';
const store = createStore(
reducer,
);
export default store;
\ No newline at end of file
import Login from '../../renderer/console/login';
import Site from '../../renderer/console/site';
import Home from '../../renderer/console/home';
import User from '../../renderer/console/userDetails';
var indexRoutes = [
{ exact: false, path: '/', name: 'Page', component: <Login /> }, //登录页面
{ exact: false, path: '/site', name: 'Page2', component: <Site /> }, //设置
{ exact: false, path: '/home', name: 'Page0', component: <Home /> }, //主页面
{ exact: false, path: '/details', name: 'Page4', component: <User /> }, //账号详情
];
export default indexRoutes;
import API from './api_manager';
import { getCurrentZone, getUserInfo } from './publicMethod';
// 获取用户基础信息
export const userInfo = () => {
return {
url: API.API_USER_CURRENT,
type: 'get',
param: {},
actions: true,
};
};
// 退出登录
export const logout = () => {
return {
url: API.API_USER_LOGOUT,
type: 'delete',
param: {},
actions: true,
};
};
//获取余额
export const getAccountBalance = () => {
return {
url: API.API_DASHBOARD_ACCOUNT + `?zone=${getCurrentZone()}`,
type: 'get',
param: {},
actions: true,
};
};
//获取通知消息
export const messageData = (page, size) => {
return {
url:
API.API_USER_MESSAGEALL +
`?receiver=${
getUserInfo().name
}&msgType=USER&page=${page}&size=${size}`,
type: 'get',
param: {},
actions: true,
};
};
//const BACKEND_API_URI_PREFIX = 'https://www.cloudam.cn';
const BACKEND_API_URI_PREFIX = 'http://47.57.4.97';
//const BACKEND_API_URI_PREFIX = 'http://47.75.104.171';
export { BACKEND_API_URI_PREFIX };
import { BACKEND_API_URI_PREFIX } from './api_address';
const API = {
API_USER_LOGIN: `${BACKEND_API_URI_PREFIX}/uaa/oauth/token`, //登录
API_USER_CURRENT: `${BACKEND_API_URI_PREFIX}/accounts/current`, //获取账号信息
API_USER_LOGOUT: `${BACKEND_API_URI_PREFIX}/uaa/users/token`, //退出登录
API_DASHBOARD_ACCOUNT: `${BACKEND_API_URI_PREFIX}/accounts/dashboard/account`, //获取余额
API_USER_MESSAGEALL: `${BACKEND_API_URI_PREFIX}/imapp/querymessage`, //查询全部信息
};
export default API;
export const Constants = {
TOKEN_KEY: 'token_key',
ACCEPT_LANGUAGE: 'zh-CN,zh;q=0.5',
TEMPORARY_TOKEN_KEY: 'temporary_token_key',
RAYSYNC_ADDR_TOKEN_KEY: 'raysyncAddr',
CURRENT_REGION_SELECT_KEY: 'current-region',
USER_INFO_TOKEN_KEY: 'userinfo',
USERNAME_LOGIN_HELPER_TEXT: '请输入您的用户名',
PASSWORD_LOGIN_HELPER_TEXT: '请输入您的密码',
COLLECT_NAME: 'recently-used',
SHARE: 'share',
server: 'present-server',
CURRENT_ISFILESYSTEM: 'isShareFileSystem',
};
export const USERCENTER = {
INPUT_JOB_ERROR_TIPS2: '长度限制50个字符以内',
INPUT_JOB_ERROR_TIPS:
'作业命名支持中文、数字、大小写字母,特殊符号仅支持_或者-',
};
export const INTELLIGROUP = {
ERROR_MSG: {
ITERNAL_SERVER_ERROR: '内部服务器错误,请稍后重试',
},
EVENT_ACTIVITY: '事件活动:',
MESSAGE_CODE: '消息代码:',
EVENT_OBJECT: '发生事件对象:',
FIRST_OCCURRENCE: '初次发生时间:',
EVENT_CONTENT: '事件内容:',
};
/**
* @Description 获取电脑中所盘符及其名称
* @Author WJW
* @Date 2022-01-25
*/
const process = require('child_process');
// cmd命令
const cmdOrder = {
getAllDrive: () => 'wmic logicaldisk where drivetype=3 get deviceid',
getOneDriveName: (drive: string) =>
`wmic logicaldisk where name="${drive}:" get volumename`,
};
const isMac = process.platform === 'darwin';
/**
* 获取电脑中所有盘符及其名称
* @returns 电脑中所有盘符及其名称
*/
export default async function getAllDrive(): Promise<string[]> {
if (isMac) return [];
let result: string[] = [];
let promise = new Promise((resolve, reject) => {
// 获取电脑中所有盘符
process.exec(cmdOrder.getAllDrive(), (error: any, stdout: any) => {
if (error !== null) {
console.error(error);
return;
}
//@ts-ignore
let stdoutArr = [...stdout];
let res: string[] = [];
stdoutArr.forEach((v: string, i: number) => {
if (v === ':') {
res.push(stdoutArr[i - 1]);
}
});
let resList: {
drive: string;
name: string;
}[] = [];
let promiseArr: Promise<any>[] = [];
// 获取所有盘符的所有名称
res.forEach((v: string) => {
promiseArr.push(
new Promise((resolve, reject) => {
process.exec(
cmdOrder.getOneDriveName(v),
(error: any, stdout: any) => {
if (error !== null) {
console.error(error);
return;
}
let stdoutArr = [...stdout];
let res: string[] = [];
stdoutArr.forEach((v: string, i: number) => {
if (v !== ' ' && v !== '\n' && v !== '\r') {
res.push(v);
}
});
res.splice(0, 10);
resList.push({
drive: v,
name: res.join(''),
});
resolve(true);
}
);
})
);
});
Promise.all(promiseArr).then((res) => {
resolve(resList);
});
});
});
await promise.then((res: any) => {
result = res;
});
// console.log(result);
return result;
}
import { Constants } from '../utils/constants';
import moment from 'moment';
export const getUserInfo = () => {
return (
localStorage.getItem(Constants.USER_INFO_TOKEN_KEY) &&
JSON.parse(localStorage.getItem(Constants.USER_INFO_TOKEN_KEY))
);
};
export const getCurrentZone = () => {
let localUtc = new Date().getTimezoneOffset() / 60;
let Rounding = parseInt(localUtc);
let Remainder = new Date().getTimezoneOffset() % 60;
let Remainder2 = Math.abs(Remainder);
let Remainder3 = '00';
let timezone = '%2B08:00';
if ([0, '0'].includes(Remainder2)) {
Remainder3 = '00';
} else {
Remainder3 = Remainder2;
}
if (Rounding > 0) {
if (Rounding >= 10) {
timezone = '-1' * Rounding + ':' + Remainder3;
} else {
timezone = '-0' + Rounding + ':' + Remainder3;
}
} else {
let localTime = Math.abs(Rounding);
if (localTime < 10) {
timezone = '%2B0' + localTime + ':' + Remainder3;
} else {
timezone = '%2B' + localTime + ':' + Remainder3;
}
}
return timezone;
};
export const convert_timer = (item) => {
return moment(item).format('YYYY-MM-DD HH:mm:ss');
};
const child_process = require('child_process');
let child = child_process.spawn('go', ['run', 'gochild.go'], {
stdio: [0, 1, 2, 'ipc'],
});
child.on('close', (code) => {
process.exit(code);
});
child.send({ hello: 'child' });
child.on('message', function (msg, handle) {
if (msg.hello === 'parent') {
console.log(msg);
process.exit(0);
}
process.exit(1);
});
......@@ -9,107 +9,288 @@
* `./src/main.js` using webpack. This gives us some performance wins.
*/
import path from 'path';
import { app, BrowserWindow, shell, ipcMain } from 'electron';
import { app, BrowserWindow, shell, ipcMain, Tray, Menu } from 'electron';
import { autoUpdater } from 'electron-updater';
import log from 'electron-log';
import MenuBuilder from './menu';
import { resolveHtmlPath } from './util';
const nativeImage = require('electron').nativeImage;
const positioner = require('electron-traywindow-positioner');
const storage = require('electron-localstorage');
const fs = require('fs');
class AppUpdater {
constructor() {
log.transports.file.level = 'info';
autoUpdater.logger = log;
autoUpdater.checkForUpdatesAndNotify();
}
constructor() {
log.transports.file.level = 'info';
autoUpdater.logger = log;
autoUpdater.checkForUpdatesAndNotify();
}
}
let tray: Tray | null = null;
let mainWindow: BrowserWindow | null = null;
let siteWindown: BrowserWindow | null = null;
let homeWindown: BrowserWindow | null = null;
ipcMain.on('ipc-example', async (event, arg) => {
const msgTemplate = (pingPong: string) => `IPC test: ${pingPong}`;
console.log(msgTemplate(arg));
event.reply('ipc-example', msgTemplate('pong'));
const isDev = process.env.NODE_ENV === 'development';
const isMac = process.platform === 'darwin';
const alignment = { x: 'left', y: 'up' };
const RESOURCES_PATH = app.isPackaged
? path.join(process.resourcesPath, 'assets')
: path.join(__dirname, '../../assets');
const getAssetPath = (...paths: string[]): string => {
return path.join(RESOURCES_PATH, ...paths);
};
let image: any;
if (isMac) {
image = nativeImage.createFromPath(getAssetPath('/img/iconTemplate.png'));
} else {
image = nativeImage.createFromPath(
getAssetPath('/img/iconwinTemplate.png')
);
}
Menu.setApplicationMenu(null);
const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) {
app.quit();
}
app.setLoginItemSettings({
openAtLogin: storage.getItem('Preferences')
? JSON.parse(storage.getItem('Preferences'))['selfStart']
: true,
openAsHidden: false,
path: process.execPath,
args: [],
});
ipcMain.on('createNewWindow-site', (event, arg) => {
if (siteWindown) {
siteWindown.focus();
return;
}
siteWindown = new BrowserWindow({
width: 620,
height: 482,
minWidth: 100,
minHeight: 100,
frame: true,
resizable: false,
webPreferences: {
sandbox: false,
nodeIntegration: true,
contextIsolation: false,
webSecurity: false,
},
// parent: siteWindown, //win是主窗口
});
siteWindown.loadURL(resolveHtmlPath(`index.html#/site`));
isDev && siteWindown.webContents.openDevTools();
siteWindown.on('closed', () => {
siteWindown = null;
});
});
ipcMain.on('resize-home', (event) => {
if (!tray) return;
mainWindow?.close();
if (homeWindown) {
homeWindown.focus();
return;
}
homeWindown = new BrowserWindow({
show: false,
width: 350,
height: 425,
minWidth: 100,
minHeight: 100,
frame: false,
resizable: false,
minimizable: false,
maximizable: false,
webPreferences: {
sandbox: false,
nodeIntegration: true,
contextIsolation: false,
webSecurity: false,
},
});
homeWindown.loadURL(resolveHtmlPath(`index.html#/home`));
positioner.position(homeWindown, tray.getBounds(), alignment);
isDev && homeWindown.webContents.openDevTools();
// homeWindown.webContents.openDevTools();
homeWindown.once('ready-to-show', () => {
homeWindown?.show();
});
homeWindown.on('blur', () => {
!isDev && homeWindown?.hide();
});
homeWindown.on('closed', () => {
homeWindown = null;
});
});
ipcMain.on('asynchronous-message', function (event, arg) {
// arg是从渲染进程返回来的数据
const USER_HOME = isMac
? (process.env.HOME || process.env.USERPROFILE) + '/bkunyun/'
: (process.env.HOME || process.env.USERPROFILE) + '/.bkunyun/';
fs.mkdir(USER_HOME, { recursive: true }, (err: any) => {
if (err) return;
fs.writeFile(
USER_HOME + 'roco.json',
JSON.stringify(arg),
'utf8',
(err: any) => {
if (err) {
event.sender.send('asynchronous-reply', '写入失败');
} else {
event.sender.send('asynchronous-reply', '写入成功');
}
}
);
});
});
ipcMain.on('window-close', (event) => {
app.quit();
});
ipcMain.on('openAtLogin-true', () => {
app.setLoginItemSettings({
openAtLogin: true,
});
});
ipcMain.on('openAtLogin-false', () => {
app.setLoginItemSettings({
openAtLogin: false,
});
});
ipcMain.on('openLogin-windown', () => {
if (mainWindow) {
mainWindow.show();
mainWindow.focus();
}
});
if (process.env.NODE_ENV === 'production') {
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();
}
const isDebug =
process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true';
process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true';
if (isDebug) {
require('electron-debug')();
require('electron-debug')();
}
const installExtensions = async () => {
const installer = require('electron-devtools-installer');
const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
const extensions = ['REACT_DEVELOPER_TOOLS'];
return installer
.default(
extensions.map((name) => installer[name]),
forceDownload
)
.catch(console.log);
const installer = require('electron-devtools-installer');
const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
const extensions = ['REACT_DEVELOPER_TOOLS'];
return installer
.default(
extensions.map((name) => installer[name]),
forceDownload
)
.catch(console.log);
};
const createWindow = async () => {
if (isDebug) {
await installExtensions();
}
if (isDebug) {
await installExtensions();
}
if (homeWindown) return;
mainWindow = new BrowserWindow({
show: false,
width: 480,
height: 486,
minWidth: 100,
minHeight: 100,
icon: getAssetPath('icon.ico'),
frame: true,
resizable: false,
titleBarStyle: 'hidden',
maximizable: false,
titleBarOverlay: {
color: '#ffffff',
height: 30,
},
webPreferences: {
sandbox: false,
nodeIntegration: true,
contextIsolation: false,
webSecurity: false,
},
});
const RESOURCES_PATH = app.isPackaged
? path.join(process.resourcesPath, 'assets')
: path.join(__dirname, '../../assets');
tray = new Tray(await image);
const contextMenu = Menu.buildFromTemplate([
{
label: '退出',
click: async () => {
app.quit();
},
},
]);
tray.setContextMenu(contextMenu);
// tray.setTitle('test');
tray.setToolTip('北鲲云');
const getAssetPath = (...paths: string[]): string => {
return path.join(RESOURCES_PATH, ...paths);
};
mainWindow = new BrowserWindow({
show: false,
width: 1024,
height: 728,
icon: getAssetPath('icon.png'),
webPreferences: {
sandbox: false,
nodeIntegration: true,
contextIsolation: false,
},
});
mainWindow.loadURL(resolveHtmlPath('index.html'));
mainWindow.on('ready-to-show', () => {
if (!mainWindow) {
throw new Error('"mainWindow" is not defined');
}
if (process.env.START_MINIMIZED) {
mainWindow.minimize();
} else {
mainWindow.show();
}
});
mainWindow.loadURL(resolveHtmlPath('index.html'));
// mainWindow.webContents.openDevTools();
mainWindow.once('ready-to-show', () => {
if (!mainWindow) {
throw new Error('"mainWindow" is not defined');
}
if (process.env.START_MINIMIZED) {
mainWindow.minimize();
} else {
mainWindow.hide();
// mainWindow.webContents.openDevTools();
}
});
mainWindow.on('closed', () => {
mainWindow = null;
});
mainWindow.on('closed', () => {
mainWindow = null;
});
// const menuBuilder = new MenuBuilder(mainWindow);
// menuBuilder.buildMenu();
const menuBuilder = new MenuBuilder(mainWindow);
menuBuilder.buildMenu();
// Open urls in the user's browser
mainWindow.webContents.setWindowOpenHandler((edata) => {
shell.openExternal(edata.url);
return { action: 'deny' };
});
// Remove this if your app does not use auto updates
// eslint-disable-next-line
new AppUpdater();
// Open urls in the user's browser
mainWindow.webContents.setWindowOpenHandler((edata) => {
shell.openExternal(edata.url);
return { action: 'deny' };
});
tray.on('click', function () {
if (mainWindow) {
mainWindow.show();
return;
}
if (!homeWindown || !tray) return;
homeWindown.show();
positioner.position(homeWindown, tray.getBounds(), alignment);
});
// Remove this if your app does not use auto updates
// eslint-disable-next-line
new AppUpdater();
tray.on('right-click', function () {
if (!tray) return;
tray.popUpContextMenu();
});
};
/**
......@@ -117,21 +298,20 @@ const createWindow = async () => {
*/
app.on('window-all-closed', () => {
// Respect the OSX convention of having the application in memory even
// after all windows have been closed
if (process.platform !== 'darwin') {
app.quit();
}
// Respect the OSX convention of having the application in memory even
// after all windows have been closed
if (process.platform !== 'darwin') {
app.quit();
}
});
app
.whenReady()
.then(() => {
createWindow();
app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) createWindow();
});
})
.catch(console.log);
app.whenReady()
.then(() => {
createWindow();
app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) createWindow();
});
})
.catch(console.log);
import {
app,
Menu,
shell,
BrowserWindow,
MenuItemConstructorOptions,
app,
Menu,
shell,
BrowserWindow,
MenuItemConstructorOptions,
} from 'electron';
interface DarwinMenuItemConstructorOptions extends MenuItemConstructorOptions {
selector?: string;
submenu?: DarwinMenuItemConstructorOptions[] | Menu;
selector?: string;
submenu?: DarwinMenuItemConstructorOptions[] | Menu;
}
export default class MenuBuilder {
mainWindow: BrowserWindow;
mainWindow: BrowserWindow;
constructor(mainWindow: BrowserWindow) {
this.mainWindow = mainWindow;
}
buildMenu(): Menu {
if (
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
) {
this.setupDevelopmentEnvironment();
constructor(mainWindow: BrowserWindow) {
this.mainWindow = mainWindow;
}
const template =
process.platform === 'darwin'
? this.buildDarwinTemplate()
: this.buildDefaultTemplate();
const menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
return menu;
}
buildMenu(): Menu {
if (
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
) {
this.setupDevelopmentEnvironment();
}
setupDevelopmentEnvironment(): void {
this.mainWindow.webContents.on('context-menu', (_, props) => {
const { x, y } = props;
const template =
process.platform === 'darwin'
? this.buildDarwinTemplate()
: this.buildDefaultTemplate();
Menu.buildFromTemplate([
{
label: 'Inspect element',
click: () => {
this.mainWindow.webContents.inspectElement(x, y);
},
},
]).popup({ window: this.mainWindow });
});
}
const menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
buildDarwinTemplate(): MenuItemConstructorOptions[] {
const subMenuAbout: DarwinMenuItemConstructorOptions = {
label: 'Electron',
submenu: [
{
label: 'About ElectronReact',
selector: 'orderFrontStandardAboutPanel:',
},
{ type: 'separator' },
{ label: 'Services', submenu: [] },
{ type: 'separator' },
{
label: 'Hide ElectronReact',
accelerator: 'Command+H',
selector: 'hide:',
},
{
label: 'Hide Others',
accelerator: 'Command+Shift+H',
selector: 'hideOtherApplications:',
},
{ label: 'Show All', selector: 'unhideAllApplications:' },
{ type: 'separator' },
{
label: 'Quit',
accelerator: 'Command+Q',
click: () => {
app.quit();
},
},
],
};
const subMenuEdit: DarwinMenuItemConstructorOptions = {
label: 'Edit',
submenu: [
{ label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' },
{ label: 'Redo', accelerator: 'Shift+Command+Z', selector: 'redo:' },
{ type: 'separator' },
{ label: 'Cut', accelerator: 'Command+X', selector: 'cut:' },
{ label: 'Copy', accelerator: 'Command+C', selector: 'copy:' },
{ label: 'Paste', accelerator: 'Command+V', selector: 'paste:' },
{
label: 'Select All',
accelerator: 'Command+A',
selector: 'selectAll:',
},
],
};
const subMenuViewDev: MenuItemConstructorOptions = {
label: 'View',
submenu: [
{
label: 'Reload',
accelerator: 'Command+R',
click: () => {
this.mainWindow.webContents.reload();
},
},
{
label: 'Toggle Full Screen',
accelerator: 'Ctrl+Command+F',
click: () => {
this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen());
},
},
{
label: 'Toggle Developer Tools',
accelerator: 'Alt+Command+I',
click: () => {
this.mainWindow.webContents.toggleDevTools();
},
},
],
};
const subMenuViewProd: MenuItemConstructorOptions = {
label: 'View',
submenu: [
{
label: 'Toggle Full Screen',
accelerator: 'Ctrl+Command+F',
click: () => {
this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen());
},
},
],
};
const subMenuWindow: DarwinMenuItemConstructorOptions = {
label: 'Window',
submenu: [
{
label: 'Minimize',
accelerator: 'Command+M',
selector: 'performMiniaturize:',
},
{ label: 'Close', accelerator: 'Command+W', selector: 'performClose:' },
{ type: 'separator' },
{ label: 'Bring All to Front', selector: 'arrangeInFront:' },
],
};
const subMenuHelp: MenuItemConstructorOptions = {
label: 'Help',
submenu: [
{
label: 'Learn More',
click() {
shell.openExternal('https://electronjs.org');
},
},
{
label: 'Documentation',
click() {
shell.openExternal(
'https://github.com/electron/electron/tree/main/docs#readme'
);
},
},
{
label: 'Community Discussions',
click() {
shell.openExternal('https://www.electronjs.org/community');
},
},
{
label: 'Search Issues',
click() {
shell.openExternal('https://github.com/electron/electron/issues');
},
},
],
};
return menu;
}
const subMenuView =
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
? subMenuViewDev
: subMenuViewProd;
setupDevelopmentEnvironment(): void {
this.mainWindow.webContents.on('context-menu', (_, props) => {
const { x, y } = props;
return [subMenuAbout, subMenuEdit, subMenuView, subMenuWindow, subMenuHelp];
}
Menu.buildFromTemplate([
{
label: 'Inspect element',
click: () => {
this.mainWindow.webContents.inspectElement(x, y);
},
},
]).popup({ window: this.mainWindow });
});
}
buildDefaultTemplate() {
const templateDefault = [
{
label: '&File',
submenu: [
{
label: '&Open',
accelerator: 'Ctrl+O',
},
{
label: '&Close',
accelerator: 'Ctrl+W',
click: () => {
this.mainWindow.close();
},
},
],
},
{
label: '&View',
submenu:
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
? [
buildDarwinTemplate(): MenuItemConstructorOptions[] {
const subMenuAbout: DarwinMenuItemConstructorOptions = {
label: 'Electron',
submenu: [
{
label: '&Reload',
accelerator: 'Ctrl+R',
click: () => {
this.mainWindow.webContents.reload();
},
label: 'About ElectronReact',
selector: 'orderFrontStandardAboutPanel:',
},
{ type: 'separator' },
{ label: 'Services', submenu: [] },
{ type: 'separator' },
{
label: 'Toggle &Full Screen',
accelerator: 'F11',
click: () => {
this.mainWindow.setFullScreen(
!this.mainWindow.isFullScreen()
);
},
label: 'Hide ElectronReact',
accelerator: 'Command+H',
selector: 'hide:',
},
{
label: 'Toggle &Developer Tools',
accelerator: 'Alt+Ctrl+I',
click: () => {
this.mainWindow.webContents.toggleDevTools();
},
label: 'Hide Others',
accelerator: 'Command+Shift+H',
selector: 'hideOtherApplications:',
},
]
: [
{ label: 'Show All', selector: 'unhideAllApplications:' },
{ type: 'separator' },
{
label: 'Toggle &Full Screen',
accelerator: 'F11',
click: () => {
this.mainWindow.setFullScreen(
!this.mainWindow.isFullScreen()
);
},
label: 'Quit',
accelerator: 'Command+Q',
click: () => {
app.quit();
},
},
],
},
{
label: 'Help',
submenu: [
{
label: 'Learn More',
click() {
shell.openExternal('https://electronjs.org');
},
},
{
label: 'Documentation',
click() {
shell.openExternal(
'https://github.com/electron/electron/tree/main/docs#readme'
);
],
};
const subMenuEdit: DarwinMenuItemConstructorOptions = {
label: 'Edit',
submenu: [
{ label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' },
{
label: 'Redo',
accelerator: 'Shift+Command+Z',
selector: 'redo:',
},
{ type: 'separator' },
{ label: 'Cut', accelerator: 'Command+X', selector: 'cut:' },
{ label: 'Copy', accelerator: 'Command+C', selector: 'copy:' },
{
label: 'Paste',
accelerator: 'Command+V',
selector: 'paste:',
},
{
label: 'Select All',
accelerator: 'Command+A',
selector: 'selectAll:',
},
],
};
const subMenuViewDev: MenuItemConstructorOptions = {
label: 'View',
submenu: [
{
label: 'Reload',
accelerator: 'Command+R',
click: () => {
this.mainWindow.webContents.reload();
},
},
{
label: 'Toggle Full Screen',
accelerator: 'Ctrl+Command+F',
click: () => {
this.mainWindow.setFullScreen(
!this.mainWindow.isFullScreen()
);
},
},
{
label: 'Toggle Developer Tools',
accelerator: 'Alt+Command+I',
click: () => {
this.mainWindow.webContents.toggleDevTools();
},
},
],
};
const subMenuViewProd: MenuItemConstructorOptions = {
label: 'View',
submenu: [
{
label: 'Toggle Full Screen',
accelerator: 'Ctrl+Command+F',
click: () => {
this.mainWindow.setFullScreen(
!this.mainWindow.isFullScreen()
);
},
},
],
};
const subMenuWindow: DarwinMenuItemConstructorOptions = {
label: 'Window',
submenu: [
{
label: 'Minimize',
accelerator: 'Command+M',
selector: 'performMiniaturize:',
},
{
label: 'Close',
accelerator: 'Command+W',
selector: 'performClose:',
},
{ type: 'separator' },
{ label: 'Bring All to Front', selector: 'arrangeInFront:' },
],
};
const subMenuHelp: MenuItemConstructorOptions = {
label: 'Help',
submenu: [
{
label: 'Learn More',
click() {
shell.openExternal('https://electronjs.org');
},
},
{
label: 'Documentation',
click() {
shell.openExternal(
'https://github.com/electron/electron/tree/main/docs#readme'
);
},
},
{
label: 'Community Discussions',
click() {
shell.openExternal(
'https://www.electronjs.org/community'
);
},
},
{
label: 'Search Issues',
click() {
shell.openExternal(
'https://github.com/electron/electron/issues'
);
},
},
],
};
const subMenuView =
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
? subMenuViewDev
: subMenuViewProd;
return [
subMenuAbout,
subMenuEdit,
subMenuView,
subMenuWindow,
subMenuHelp,
];
}
buildDefaultTemplate() {
const templateDefault = [
{
label: '&File',
submenu: [
{
label: '&Open',
accelerator: 'Ctrl+O',
},
{
label: '&Close',
accelerator: 'Ctrl+W',
click: () => {
this.mainWindow.close();
},
},
],
},
},
{
label: 'Community Discussions',
click() {
shell.openExternal('https://www.electronjs.org/community');
{
label: '&View',
submenu:
process.env.NODE_ENV === 'development' ||
process.env.DEBUG_PROD === 'true'
? [
{
label: '&Reload',
accelerator: 'Ctrl+R',
click: () => {
this.mainWindow.webContents.reload();
},
},
{
label: 'Toggle &Full Screen',
accelerator: 'F11',
click: () => {
this.mainWindow.setFullScreen(
!this.mainWindow.isFullScreen()
);
},
},
{
label: 'Toggle &Developer Tools',
accelerator: 'Alt+Ctrl+I',
click: () => {
this.mainWindow.webContents.toggleDevTools();
},
},
]
: [
{
label: 'Toggle &Full Screen',
accelerator: 'F11',
click: () => {
this.mainWindow.setFullScreen(
!this.mainWindow.isFullScreen()
);
},
},
],
},
},
{
label: 'Search Issues',
click() {
shell.openExternal('https://github.com/electron/electron/issues');
{
label: 'Help',
submenu: [
{
label: 'Learn More',
click() {
shell.openExternal('https://electronjs.org');
},
},
{
label: 'Documentation',
click() {
shell.openExternal(
'https://github.com/electron/electron/tree/main/docs#readme'
);
},
},
{
label: 'Community Discussions',
click() {
shell.openExternal(
'https://www.electronjs.org/community'
);
},
},
{
label: 'Search Issues',
click() {
shell.openExternal(
'https://github.com/electron/electron/issues'
);
},
},
],
},
},
],
},
];
];
return templateDefault;
}
return templateDefault;
}
}
......@@ -3,11 +3,19 @@ import { URL } from 'url';
import path from 'path';
export function resolveHtmlPath(htmlFileName: string) {
if (process.env.NODE_ENV === 'development') {
const port = process.env.PORT || 1212;
const url = new URL(`http://localhost:${port}`);
url.pathname = htmlFileName;
return url.href;
}
return `file://${path.resolve(__dirname, '../renderer/', htmlFileName)}`;
if (process.env.NODE_ENV === 'development') {
const port = process.env.PORT || 1212;
const url = new URL(`http://localhost:${port}`);
url.pathname = htmlFileName;
let goPath = url.href.replace('%23', '#');
return goPath;
} else {
let openPath = `file://${path.resolve(
__dirname,
'../renderer/',
htmlFileName
)}`;
let src = openPath.replace(/\\/g, '/');
return src;
}
}
......@@ -3,60 +3,97 @@
* See https://github.com/webpack-contrib/sass-loader#imports
*/
body {
position: relative;
color: white;
height: 100vh;
background: linear-gradient(
position: relative;
color: #1e2633;
height: 100vh;
margin: 0;
/* background: linear-gradient(
200.96deg,
#fedc2a -29.09%,
#dd5789 51.77%,
#7a2c9e 129.35%
);
font-family: sans-serif;
overflow-y: hidden;
display: flex;
); */
font-family: sans-serif;
overflow-y: hidden;
/* -webkit-app-region: drag; */
/* display: flex;
justify-content: center;
align-items: center;
align-items: center; */
}
button {
background-color: white;
padding: 10px 20px;
border-radius: 10px;
border: none;
appearance: none;
font-size: 1.3rem;
box-shadow: 0px 8px 28px -6px rgba(24, 39, 75, 0.12),
0px 18px 88px -4px rgba(24, 39, 75, 0.14);
transition: all ease-in 0.1s;
cursor: pointer;
opacity: 0.9;
background-color: white;
padding: 10px 20px;
border-radius: 10px;
border: none;
appearance: none;
font-size: 1.3rem;
box-shadow: 0px 8px 28px -6px rgba(24, 39, 75, 0.12),
0px 18px 88px -4px rgba(24, 39, 75, 0.14);
transition: all ease-in 0.1s;
cursor: pointer;
opacity: 0.9;
-webkit-app-region: no-drag;
}
button:hover {
transform: scale(1.05);
opacity: 1;
transform: scale(1.05);
opacity: 1;
}
input {
-webkit-app-region: no-drag;
}
label {
-webkit-app-region: no-drag;
}
li {
list-style: none;
list-style: none;
}
a {
text-decoration: none;
height: fit-content;
width: fit-content;
margin: 10px;
text-decoration: none;
height: fit-content;
width: fit-content;
margin: 10px;
}
a:hover {
opacity: 1;
text-decoration: none;
opacity: 1;
text-decoration: none;
}
.Hello {
display: flex;
justify-content: center;
align-items: center;
margin: 20px 0;
display: flex;
justify-content: center;
align-items: center;
margin: 20px 0;
}
div::-webkit-scrollbar,
main::-webkit-scrollbar {
width: 8px;
height: 5px !important;
-webkit-app-region: no-drag;
}
div::-webkit-scrollbar-track,
main::-webkit-scrollbar-track {
background-color: #fff;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
-webkit-app-region: no-drag;
}
div::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb {
background-color: #d8d8d8;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
height: 5px !important;
-webkit-app-region: no-drag;
}
import { HashRouter as Router, Route, Switch, Routes } from 'react-router-dom';
import { Switch } from 'react-router-dom';
import { createBrowserHistory } from 'history';
import './App.css';
import path from 'path';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import indexRoutes from '../commons/routes/index';
import { Provider } from 'react-redux';
import store from '../commons/reduxs/store';
const rootPath = require('electron-root-path').rootPath;
const { shell } = require('electron');
const location = path.join(
rootPath.substring(0, rootPath.length - 8),
'./assets/script/start.vbs'
);
const hist = createBrowserHistory();
const theme = createTheme({
typography: {
fontFamily: [
'Roboto',
'Helvetica',
'Tahoma',
'Arial',
'"PingFang SC"',
'"Hiragino Sans GB"',
'"Heiti SC"',
'"WenQuanYi Micro Hei"',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
].join(','),
},
palette: {
primary: { main: '#136EFA' },
secondary: { main: '#F44335' },
},
});
export default function App() {
return (
<Provider store={store}>
<ThemeProvider theme={theme}>
<Router history={hist} basename={'/'}>
<Routes>
{indexRoutes.map((prop, key) => {
return (
<Route
exact={prop.exact}
path={prop.path}
element={prop.component}
key={key}
/>
);
})}
</Routes>
</Router>
</ThemeProvider>
</Provider>
);
}
import { MemoryRouter as Router, Routes, Route } from 'react-router-dom';
import icon from '../../assets/icon.svg';
import './App.css';
import path from 'path';
import { Button } from '@mui/material';
const rootPath = require('electron-root-path').rootPath;
const { shell } = require('electron');
const location = path.join(
rootPath.substring(0, rootPath.length - 8),
'./assets/script/start.vbs'
);
const Hello = () => {
return (
<div>
<div className="Hello">
<img width="200" alt="icon" src={icon} />
</div>
<h1>electron-react</h1>
<div className="Hello">
<Button
variant="contained"
onClick={() => {
shell.openPath(location);
}}
>
挂载
</Button>
</div>
</div>
);
};
export default function App() {
return (
<Router>
<Routes>
<Route path="/" element={<Hello />} />
</Routes>
</Router>
);
}
import React, { useState } from 'react';
//ui
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
import { Grid } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
import allDown from '../../commons/assets/img/allDown.svg';
import fileIcon from '../../commons/assets/img/fileData.svg';
import suc from '../../commons/assets/img/suc.svg';
const useStyles = makeStyles()((theme) => {
return {
bottomBox: {
width: '350px',
height: '44px',
borderTop: '1px solid #EDEFF2',
display: 'flex',
alignItems: 'center',
paddingLeft: '25px',
bottom: '0',
position: 'fixed',
},
};
});
export default (props) => {
const { classes } = useStyles();
return (
<Grid className={classes.bottomBox}>
<img src={allDown} alt="" />
<Grid
sx={{ fontSize: '12px', color: '#1E2633', marginLeft: '8px' }}
>
所有文件已同步到最新版
</Grid>
</Grid>
);
};
import React, { useState } from 'react';
import { shell } from 'electron';
//js
import public from 'commons/public';
import { getUserInfo } from '../../commons/utils/publicMethod';
import { Constants } from '../../commons/utils/constants';
//ui
import TextField from '@mui/material/TextField';
import { Grid } from '@mui/material';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import { makeStyles } from 'tss-react/mui';
import Radio from '@mui/material/Radio';
import RadioGroup from '@mui/material/RadioGroup';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
import MenuItem from '@mui/material/MenuItem';
import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
import Tooltip from '@mui/material/Tooltip';
import avatar from '../../commons/assets/img/avatar.svg';
import fileIcon from '../../commons/assets/img/fileIcon.svg';
import appIcon from '../../commons/assets/img/appIcon.svg';
import commandIcon from '../../commons/assets/img/commandIcon.svg';
import homeIcon from '../../commons/assets/img/homeIcon.svg';
import siteIcon from '../../commons/assets/img/siteIcon.svg';
const { ipcRenderer } = require('electron');
const electron = window.require('electron');
const useStyles = makeStyles()((theme) => {
return {
headBody: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
width: '300px',
margin: '0 auto',
marginTop: '4%',
},
leftBox: {
display: 'flex',
alignItems: 'end',
height: '38px',
cursor: 'pointer',
},
name: {
fontSize: '14px',
fontWeight: '500',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
width: '110px',
},
leftBox2: {
display: 'flex',
alignItems: 'center',
height: '38px',
},
rightBox: {
display: 'flex',
},
siteBox: {
width: '176px',
height: '116px',
background: '#FFFFFF',
boxShadow: '0px 4px 10px 0px rgba(25,37,61,0.24)',
borderRadius: '8px',
border: '2px solid rgba(255,255,255,0.65)',
position: 'absolute',
top: '40px',
right: '20px',
zIndex: '100',
},
siteText: {
fontSize: '14px',
color: '#1E2633',
cursor: 'pointer',
padding: '0 16px',
// marginTop: '12px',
display: 'flex',
alignItems: 'center',
height: '24px',
'&:hover': {
background: '#F0F2F5',
},
},
};
});
const list = [
{ id: '1', value: fileIcon, lable: '云文件' },
{ id: '2', value: appIcon, lable: '云应用' },
{ id: '3', value: commandIcon, lable: '云终端' },
{ id: '4', value: homeIcon, lable: '控制台' },
{ id: '5', value: siteIcon, lable: '设置' },
];
export default (props) => {
const { classes } = useStyles();
const { render, navigate, ipcSend } = public();
const [level, setLevel] = useState(props.level);
const [hover, setHover] = useState(false);
const [open, setOpen] = useState(false);
const iconClick = (e) => {
console.log('e: ', e);
switch (e) {
case '1':
return;
case '2':
ipcSend('asynchronous-message', '11111');
return;
case '4':
let Token =
localStorage.getItem(Constants.TOKEN_KEY) &&
JSON.parse(localStorage.getItem(Constants.TOKEN_KEY));
shell.openExternal(
`http://47.57.4.97/v2/console/cloude-dashboard?access_token=${Token['access_token']}&expires_in=${Token['expires_in']}&refresh_token=${Token['refresh_token']}`
);
return;
case '5':
setOpen(true);
return;
default:
return;
}
};
return (
<Grid className={classes.headBody}>
{!level ? (
<Grid
className={classes.leftBox}
onClick={() => {
setLevel(true);
navigate('/details');
}}
onMouseEnter={() => {
setHover(true);
}}
onMouseLeave={() => {
setHover(false);
}}
>
<img src={avatar} alt="" />
<Grid sx={{ marginLeft: '8px' }}>
<Grid
className={classes.name}
sx={{ color: hover ? '#1370FF' : '#1E2633' }}
>
{getUserInfo().name}
{/* yaojierui100@gamil.com */}
</Grid>
<Grid sx={{ fontSize: '12px', color: '#B7B9BD' }}>
已用200TB
</Grid>
</Grid>
</Grid>
) : (
<Grid className={classes.leftBox2}>
<KeyboardArrowLeftIcon
onClick={() => {
setLevel(false);
navigate('/home');
}}
style={{ cursor: 'pointer' }}
/>
<Grid
sx={{
fontSize: '14px',
color: '#1E2633',
marginLeft: '5px',
fontWeight: '600',
}}
>
账号详情
</Grid>
</Grid>
)}
<Grid className={classes.rightBox}>
{list.map((e, key) => {
return (
<Tooltip title={e.lable} arrow key={key}>
<img
src={e.value}
alt={e.id}
style={{
marginLeft: '14px',
cursor: 'pointer',
}}
onClick={() => {
iconClick(e.id);
}}
/>
</Tooltip>
);
})}
<Grid
sx={{ display: open ? 'block' : 'none' }}
onMouseLeave={(e) => setOpen(false)}
className={classes.siteBox}
>
<Grid
className={classes.siteText}
sx={{ margin: '8px 0px 6px 0px' }}
onClick={() => {
ipcSend('createNewWindow-site');
localStorage.setItem('site_init', '1');
}}
>
云盘设置
</Grid>
<Grid
className={classes.siteText}
onClick={() => {
ipcSend('createNewWindow-site');
localStorage.setItem('site_init', '2');
}}
>
偏好设置
</Grid>
<Grid
sx={{
width: '176px',
height: '1px',
border: '1px solid #EDEFF2',
margin: '10px 0px 8px 0px',
}}
></Grid>
<Grid
className={classes.siteText}
onClick={() => {
ipcSend('window-close');
}}
>
退出应用
</Grid>
</Grid>
</Grid>
</Grid>
);
};
import React, { useEffect, useState, useRef } from 'react';
//ui
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
import { Grid } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
import no_message from '../../commons/assets/img/no_message.svg';
import fileIcon from '../../commons/assets/img/fileData.svg';
import suc from '../../commons/assets/img/suc.svg';
import CloseIcon from '@mui/icons-material/Close';
import CircularProgress from '@mui/material/CircularProgress';
// js
import Axios from '../../commons/axios/Axios';
import API from '../../commons/utils/api_manager';
import { messageData } from '../../commons/utils/ajaxOption';
import { convert_timer } from '../../commons/utils/publicMethod';
const useStyles = makeStyles()((theme) => {
return {
no_data: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '30px',
},
listBox: {
display: 'flex',
flexDirection: 'column',
paddingTop: '16px',
overflow: 'auto',
overflowX: 'hidden',
height: '274px',
alignItems: 'center',
},
messageBox: {
width: '322px',
// height: '122px',
background: '#FFFFFF',
boxShadow: '0px 1px 5px 0px rgba(0,20,46,0.18)',
// border: '1px solid',
borderRadius: '8px',
padding: '16px 20px',
marginBottom: '16px',
// minHeight: '122px',
},
messageTitle: {
color: '#1E2633',
fontSize: '14px',
fontWeight: '600',
},
messageTime: {
fontSize: '12px',
color: '#C2C6CC',
marginRight: '18px',
},
boxHead: {
display: 'flex',
justifyContent: 'space-between',
},
boxBody: {
marginTop: '8px',
},
fold: {
overflow: 'hidden',
textOverflow: 'ellipsis',
display: '-webkit-box',
position: 'relative',
'-webkit-line-clamp': '3',
'-webkit-box-orient': 'vertical',
},
open: {
// overflow: 'hidden',
textOverflow: 'ellipsis',
display: '-webkit-box',
position: 'relative',
paddingBottom: '20px',
'-webkit-box-orient': 'vertical',
},
messageText: {
color: '#565C66',
fontSize: '12px',
lineHeight: '20px',
},
messageOpen: {
whiteSpace: 'nowrap',
color: '#1370FF',
fontSize: '12px',
cursor: 'pointer',
position: 'absolute',
bottom: '0px',
right: '0px',
lineHeight: '20px',
background:
'linear-gradient(90deg, transparent 10%, rgba(255, 255, 255) 70%)',
paddingLeft: '60px',
},
};
});
export default (props) => {
const { classes } = useStyles();
const refs = useRef([]);
const [domOver, setDomOver] = useState(false);
const [fold, isFold] = useState(true);
const [page, setPage] = useState(0);
const [list, setList] = useState([]);
useEffect(() => {
getMessage(0);
}, []);
useEffect(() => {
if (list.length > 0) {
setDomOver(true);
}
}, [list]);
const getMessage = async (page) => {
let data = await Axios.request(messageData(page, 10));
if (data && data.code === 200) {
let arr = [...list];
let newarr = [];
data.res.content.map((item, index) => {
newarr.push(Object.assign(item, { view: false }));
});
arr.push(...newarr);
setList(arr);
}
};
const isOverflow = (id) => {
let height = refs.current[id].scrollHeight;
if (height > 60) {
return true;
} else {
return false;
}
};
const viewCallBack = (e) => {
setList((p) => {
let prev = [...p];
prev.filter((item) => item.id === e.id)[0]['view'] = e.view
? false
: true;
return prev;
});
};
const scrollEvent = (e) => {
if (
e.target.clientHeight + e.target.scrollTop ===
e.target.scrollHeight - 0.5 ||
e.target.clientHeight + e.target.scrollTop === e.target.scrollHeight
) {
setPage(page + 1);
getMessage(page + 1);
setDomOver(false);
}
};
return (
<Grid sx={{ width: '100%' }}>
{list.length === 0 && (
<Grid className={classes.no_data}>
<img src={no_message} alt="" />
<Grid sx={{ fontSize: '14px', color: '#B7B9BD' }}>
暂无消息
</Grid>
</Grid>
)}
<Grid className={classes.listBox} onScroll={scrollEvent}>
{list.map((e, key) => {
return (
<Grid
className={classes.messageBox}
key={key}
style={{
marginLeft: list.length > 3 ? '8px' : '0px',
}}
>
<Grid className={classes.boxHead}>
<Grid className={classes.messageTitle}>
{e.title}
</Grid>
<Grid
sx={{
display: 'flex',
alignItems: 'center',
}}
>
<Grid className={classes.messageTime}>
{convert_timer(e.msgConsumerAt)}
</Grid>
<CloseIcon
style={{
color: '#979797',
fontSize: '20px',
cursor: 'pointer',
}}
/>
</Grid>
</Grid>
<Grid className={classes.boxBody}>
<Grid
className={
e.view ? classes.open : classes.fold
}
>
<Grid
className={classes.messageText}
ref={(element) => {
refs.current[key] = element;
}}
>
{e.text}
</Grid>
{domOver && isOverflow(key) && (
<span
className={classes.messageOpen}
onClick={() => {
viewCallBack(e);
}}
>
{e.view ? '收起' : '展开'}
</span>
)}
</Grid>
</Grid>
</Grid>
);
})}
<Grid
sx={{
padding: '4px 0px 20px 0px',
display: list.length > 0 ? 'flex' : 'none',
alignItems: 'center',
}}
>
<CircularProgress
style={{
color: '#1370FF',
width: '12px',
height: '12px',
}}
/>
<Grid
sx={{
fontSize: '12px',
color: '#565C66',
marginLeft: '8px',
}}
>
加载更多…
</Grid>
</Grid>
</Grid>
</Grid>
);
};
import React, { useEffect, useState } from 'react';
//js
import public from 'commons/public';
//ui
import TextField from '@mui/material/TextField';
import { Grid, Button } from '@mui/material';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import { makeStyles } from 'tss-react/mui';
import Radio from '@mui/material/Radio';
import RadioGroup from '@mui/material/RadioGroup';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
import MenuItem from '@mui/material/MenuItem';
import file from '../../commons/assets/img/file.svg';
import getAllDrive from '../../commons/utils/getAllDrive';
import { UNSAFE_DataRouterStateContext } from 'react-router-dom';
const { ipcRenderer } = require('electron');
const electron = window.require('electron');
const { dialog } = require('electron');
console.log('dialog: ', dialog);
console.log('ipcRenderer: ', ipcRenderer);
console.log('electron: ', electron);
const useStyles = makeStyles()((theme) => {
return {
mountBody: {
display: 'flex',
alignItems: 'flex-start',
flexDirection: 'column',
width: '100%',
borderRadius: '4px',
border: '1px solid #EBEDF0',
marginLeft: '24px',
marginRight: '24px',
},
title: {
fontSize: '16px',
fontWeight: '600',
color: '#1E2633',
marginBottom: '16px',
},
root: {
height: '36px',
width: '252px',
},
input: {
padding: '6.5px 14px',
},
buttonGroup: {
borderTop: '1px solid #EBEDF0',
height: '63px',
display: 'flex',
alignItems: 'center',
width: '100%',
justifyContent: 'space-between',
},
rootButton: {
backgroundColor: '#1370FF',
boxShadow: 'none !important',
color: '#ffffff',
'&:hover': { backgroundColor: '#0055D9', transform: 'inherit' },
},
rootButton2: {
backgroundColor: '#F0F2F5',
boxShadow: 'none !important',
color: '#1E2633',
'&:hover': { backgroundColor: '#F0F2F5', transform: 'inherit' },
},
};
});
const currencies = [
{
value: 'USD',
label: '$',
},
{
value: 'EUR',
label: '€',
},
{
value: 'BTC',
label: '฿',
},
{
value: 'JPY',
label: '¥',
},
];
export default (props) => {
const { classes } = useStyles();
const { render, navigate } = public();
const [mountValue, setMountValue] = useState('localDisk');
const [currency, setCurrency] = useState('EUR');
const [change, setChange] = useState(false);
useEffect(() => {
console.log(dialog, '1111111111');
}, []);
const handleChange = (event) => {
setChange(true);
event.stopPropagation();
setMountValue(event.target.value);
getAllDrive().then((res) => {
console.log(res);
});
};
const handleSelectChange = (event) => {
setChange(true);
setCurrency(event.target.value);
};
return (
<Grid className={classes.mountBody}>
<Grid sx={{ padding: '16px 24px' }}>
<Grid className={classes.title}>挂载位置</Grid>
<RadioGroup
value={mountValue}
onChange={handleChange}
sx={{ marginBottom: '29px' }}
>
<FormControlLabel
value="localDisk"
control={<Radio size="small" />}
sx={{ alignItems: 'flex-start', display: 'flex' }}
label={
<Grid sx={{ marginTop: '8px' }}>
<Grid
sx={{
color: '#1E2633',
fontSize: '14px',
marginBottom: '10px',
}}
>
将云文件挂载到本地磁盘
</Grid>
<TextField
select
value={currency}
onChange={handleSelectChange}
InputProps={{
classes: {
root: classes.root,
input: classes.input,
},
}}
>
{currencies.map((option) => (
<MenuItem
key={option.value}
value={option.value}
>
{option.label}
</MenuItem>
))}
</TextField>
</Grid>
}
/>
<FormControlLabel
value="localFolder"
control={<Radio size="small" />}
sx={{
alignItems: 'flex-start',
display: 'flex',
marginTop: '20px',
}}
label={
<Grid
sx={{ marginTop: '8px' }}
onClick={(event) => {
event.stopPropagation();
}}
>
<Grid
sx={{
color: '#1E2633',
fontSize: '14px',
marginBottom: '10px',
}}
>
将云文件挂载到本地文件夹
</Grid>
<Grid
sx={{
display: 'flex',
alignItems: 'center',
}}
>
<img src={file} alt="" />
<Grid
sx={{
color: '#8A9099',
fontSize: '14px',
marginLeft: '10px',
}}
>
C:\Users\…\Desktopopsjw
</Grid>
<Grid
sx={{
color: '#1370FF',
fontSize: '14px',
marginLeft: '16px',
cursor: 'pointer',
}}
onClick={(event) => {
event.stopPropagation();
dialog.showOpenDialog();
}}
>
更改
</Grid>
</Grid>
</Grid>
}
/>
</RadioGroup>
<Grid className={classes.title}>缓存位置</Grid>
<Grid>
<Grid
sx={{
color: '#1E2633',
fontSize: '14px',
marginBottom: '10px',
}}
>
本地缓存的文件目录
</Grid>
<Grid
sx={{
display: 'flex',
alignItems: 'center',
}}
>
<img src={file} alt="" />
<Grid
sx={{
color: '#8A9099',
fontSize: '14px',
marginLeft: '10px',
}}
>
C:\Users\…\Desktopopsjw
</Grid>
<Grid
sx={{
color: '#1370FF',
fontSize: '14px',
marginLeft: '16px',
cursor: 'pointer',
}}
onClick={(event) => {
event.stopPropagation();
console.log('222222222');
}}
>
更改
</Grid>
<Grid
sx={{
color: '#1370FF',
fontSize: '14px',
marginLeft: '16px',
cursor: 'pointer',
}}
onClick={(event) => {
event.stopPropagation();
console.log('222222222');
}}
>
清除
</Grid>
</Grid>
</Grid>
</Grid>
<Grid className={classes.buttonGroup}>
<Grid
sx={{
fontSize: '14px',
color: '#8A9099',
marginLeft: '24px',
opacity: change ? '1' : '0',
}}
>
未保存修改
</Grid>
<Grid sx={{ display: 'flex' }}>
<Button
variant="contained"
sx={{ width: '68px' }}
disabled={!change}
classes={{
root: classes.rootButton2,
}}
onClick={() => {
setChange(false);
}}
>
取消
</Button>
<Button
variant="contained"
sx={{ width: '68px', margin: '0px 24px 0px 12px' }}
disabled={!change}
classes={{
root: classes.rootButton,
}}
onClick={() => {}}
>
保存
</Button>
</Grid>
</Grid>
</Grid>
);
};
import React, { useState } from 'react';
//js
import public from 'commons/public';
//ui
import TextField from '@mui/material/TextField';
import { Grid } from '@mui/material';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import { makeStyles } from 'tss-react/mui';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
import file from '../../commons/assets/img/file.svg';
const { ipcRenderer } = require('electron');
const electron = window.require('electron');
const useStyles = makeStyles()((theme) => {
return {
preferenceBody: {
display: 'flex',
alignItems: 'flex-start',
flexDirection: 'column',
width: '100%',
borderRadius: '4px',
border: '1px solid #EBEDF0',
marginLeft: '24px',
marginRight: '24px',
height: '100%',
},
title: {
fontSize: '16px',
fontWeight: '600',
color: '#1E2633',
marginBottom: '16px',
},
};
});
export default (props) => {
const { classes } = useStyles();
const { render, navigate, ipcSend } = public();
const [selfStart, setSelfStart] = useState(
localStorage.getItem('Preferences') &&
JSON.parse(localStorage.getItem('Preferences'))['selfStart']
);
const handleChange = (event) => {
setSelfStart(event.target.checked);
localStorage.setItem(
'Preferences',
JSON.stringify({ selfStart: event.target.checked })
);
event.target.checked
? ipcSend('openAtLogin-true')
: ipcSend('openAtLogin-false');
};
return (
<Grid className={classes.preferenceBody}>
<Grid sx={{ padding: '16px 24px' }}>
<Grid className={classes.title}>偏好设置</Grid>
<FormControlLabel
control={
<Checkbox
checked={selfStart}
onChange={handleChange}
size="small"
/>
}
label={
<Grid sx={{ color: '#1E2633', fontSize: '14px' }}>
开机时运行北鲲云盘
</Grid>
}
/>
</Grid>
</Grid>
);
};
import React, { useState } from 'react';
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
import { Grid } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
const useStyles = makeStyles()((theme) => {
return {
indicator: {
height: '3px',
},
tabRoot: {
opacity: '1',
minWidth: '50%',
boxShadow: 'none',
'&:hover': {
transform: 'inherit',
backgroundColor: '#F5F6F7',
},
},
flexContainer: {
// justifyContent: 'space-around',
},
line: {
width: '100%',
height: '1px',
border: '1px solid #EDEFF2',
},
};
});
export default (props) => {
const { classes } = useStyles();
const { handleChange, value } = props;
return (
<Grid sx={{ width: '100%', marginTop: '5px' }}>
<Tabs
value={value}
onChange={handleChange}
classes={{
indicator: classes.indicator,
flexContainer: classes.flexContainer,
}}
>
<Tab
value="one"
label={<Grid>传输</Grid>}
classes={{
root: classes.tabRoot,
}}
/>
<Tab
value="two"
label={<Grid>通知</Grid>}
classes={{
root: classes.tabRoot,
}}
/>
</Tabs>
<Grid className={classes.line}></Grid>
</Grid>
);
};
import React, { useState } from 'react';
//ui
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
import { Grid } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
import no_trans from '../../commons/assets/img/trans.svg';
import fileIcon from '../../commons/assets/img/fileData.svg';
import suc from '../../commons/assets/img/suc.svg';
const useStyles = makeStyles()((theme) => {
return {
no_data: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '30px',
},
fileBox: {
height: '40px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
width: '300px',
marginTop: '12px',
},
};
});
const list = [
{ name: '传输文件更新版.ppt' },
{ name: '1111.ppt' },
{ name: '22222.ppt' },
{ name: '333333.ppt' },
{ name: '444444.ppt' },
{ name: '传输文件更新版.ppt' },
{ name: 'fggggggg.ppt' },
{ name: '传输文件更新版.ppt' },
{ name: 'dddddd.ppt' },
{ name: 'zzzzzzzz.ppt' },
{ name: '传输文件更新版.ppt' },
{ name: '传输文件更新版.ppt' },
{ name: 'ddddd.ppt' },
{ name: '传输文件更新版.ppt' },
{ name: 'fffffff.ppt' },
];
export default (props) => {
const { classes } = useStyles();
return (
<Grid sx={{ width: '100%' }}>
{list.length === 0 && (
<Grid className={classes.no_data}>
<img src={no_trans} alt="" />
<Grid sx={{ fontSize: '14px', color: '#B7B9BD' }}>
暂无传输任务
</Grid>
</Grid>
)}
{list.length > 0 && (
<Grid
sx={{
overflow: 'hidden',
overflowY: 'scroll',
height: '275px',
padding: '0px 18px',
}}
>
{list.map((e, key) => {
return (
<Grid className={classes.fileBox} key={key}>
<Grid
sx={{
display: 'flex',
alignItems: 'center',
}}
>
<img
src={fileIcon}
alt=""
style={{ marginTop: '4px' }}
/>
<Grid sx={{ marginLeft: '16px' }}>
<Grid
sx={{
fontSize: '12px',
color: '#1E2633',
fontWeight: '600',
}}
>
{e.name}
</Grid>
<Grid
sx={{
fontSize: '12px',
color: '#B7B9BD',
}}
>
下载进度:25%
</Grid>
</Grid>
</Grid>
<img src={suc} alt="" />
</Grid>
);
})}
</Grid>
)}
</Grid>
);
};
import React, { useState } from 'react';
import public from 'commons/public';
import Head from '../components/head';
import Trans from '../components/trans';
import Tab from '../components/tab';
import BottomTip from '../components/buttomTip.jsx';
import Message from '../components/message.jsx';
import { Button, Grid } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
const useStyles = makeStyles()((theme) => {
return {
initBody: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
},
};
});
export default (props) => {
const { classes } = useStyles();
const { render, navigate } = public();
const [value, setValue] = useState('one');
const handleChange = (event, newValue) => {
setValue(newValue);
};
return (
<Grid className={classes.initBody}>
<Head />
<Tab level={false} value={value} handleChange={handleChange} />
{value === 'one' && <Trans />}
{value === 'two' && <Message />}
<BottomTip />
</Grid>
);
};
import React, { useEffect, useState } from 'react';
import { shell } from 'electron';
//js
import { createBrowserHistory } from 'history';
import public from 'commons/public';
import API from '../../commons/utils/api_manager';
import axios from 'axios';
import qs from 'qs';
import { Constants } from '../../commons/utils/constants';
import Axios from '../../commons/axios/Axios';
import { userInfo } from '../../commons/utils/ajaxOption';
//ui
import TextField from '@mui/material/TextField';
import { Button, Grid } from '@mui/material';
import logo from '../../commons/assets/img/logo.svg';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import { makeStyles } from 'tss-react/mui';
const useStyles = makeStyles()((theme) => {
return {
loginBody: {
display: 'flex',
alignItems: 'center',
flexDirection: 'column',
width: '300px',
margin: '0 auto',
paddingTop: '10%',
'-webkit-app-region': 'drag',
},
root: {
height: '40px',
width: '300px',
},
input: {
padding: '7.5px 14px',
},
label: {
fontSize: '14px',
overflow: 'inherit',
lineHeight: '8px',
},
label2: {
fontSize: '14px',
},
rootButton: {
backgroundColor: '#1370FF',
boxShadow: 'none !important',
color: '#ffffff',
'&:hover': { backgroundColor: '#0055D9', transform: 'inherit' },
},
};
});
export default (props) => {
const { classes } = useStyles();
const { render, navigate, setMessages, ipcSend } = public();
const [username, setUsername] = useState('');
const [usernameError, setUsernameError] = useState(false);
const [password, setPassword] = useState('');
const [passwordError, setPasswordError] = useState(false);
useEffect(() => {
if (localStorage.getItem(Constants.TOKEN_KEY)) {
getUserData();
} else {
ipcSend('openLogin-windown');
}
if (!localStorage.getItem('Preferences')) {
localStorage.setItem(
'Preferences',
JSON.stringify({ selfStart: true })
);
}
}, []);
const login = async () => {
if (username.length === 0) {
setUsernameError(true);
return;
} else if (password.length === 0) {
setPasswordError(true);
return;
}
const options = {
method: 'post',
url: API.API_USER_LOGIN,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: 'Basic YnJvd3Nlcjo=',
'Accept-Language': 'zh-CN,zh;q=0.5',
},
data: qs.stringify({
scope: 'ui',
username: username,
password: password,
grant_type: 'password',
}),
};
axios(options)
.then(function (response) {
localStorage.setItem(
Constants.TOKEN_KEY,
JSON.stringify(response.data)
);
getUserData();
})
.catch(function (error) {
setMessages({
message: error.response.data.message,
messagetype: 'error',
});
localStorage.removeItem(Constants.TOKEN_KEY);
localStorage.removeItem(Constants.USER_INFO_TOKEN_KEY);
localStorage.removeItem(Constants.RAYSYNC_ADDR_TOKEN_KEY);
localStorage.removeItem(Constants.CURRENT_REGION_SELECT_KEY);
localStorage.removeItem('site_init');
});
};
const getUserData = async () => {
let data = await Axios.request(userInfo());
if (data && data.code === 200) {
localStorage.setItem(
Constants.USER_INFO_TOKEN_KEY,
JSON.stringify(data.res)
);
navigate('/home');
ipcSend('resize-home');
} else {
ipcSend('openLogin-windown');
}
};
return render(
<Grid className={classes.loginBody}>
<img
src={logo}
alt=""
style={{ width: '187px', marginBottom: '50px' }}
/>
<Grid sx={{ marginBottom: '16px' }}>
<TextField
id="username"
label="用户名/手机号"
variant="outlined"
onChange={(e) => {
setUsernameError(false);
setUsername(e.target.value);
}}
error={usernameError}
helperText={usernameError ? '请输入您的用户名' : ''}
InputLabelProps={{
classes: {
outlined: classes.label,
},
}}
InputProps={{
classes: {
root: classes.root,
input: classes.input,
},
}}
/>
</Grid>
<Grid sx={{ marginBottom: '16px' }}>
<TextField
id="username"
label="密码"
variant="outlined"
type={'password'}
onChange={(e) => {
setPasswordError(false);
setPassword(e.target.value);
}}
onKeyPress={(event) => {
if (event.key === 'Enter') {
login();
event.preventDefault();
}
}}
error={passwordError}
helperText={passwordError ? '请输入您的密码' : ''}
InputLabelProps={{
classes: {
outlined: classes.label,
},
}}
InputProps={{
classes: {
root: classes.root,
input: classes.input,
},
}}
/>
</Grid>
<Grid
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
width: '100%',
marginBottom: '20px',
}}
>
{/* <FormControlLabel
classes={{
label: classes.label2,
}}
control={
<Checkbox checked={checked} onChange={handleChange} />
}
label="记住登录状态"
/> */}
<Grid
sx={{
fontSize: '14px',
color: '#1370FF',
cursor: 'pointer',
}}
onClick={() => {
shell.openExternal(
'https://www.bkunyun.com/v2/pages/forgot-password-page'
);
}}
>
忘记密码
</Grid>
</Grid>
<Button
variant="contained"
sx={{ width: '300px' }}
classes={{
root: classes.rootButton,
}}
onClick={() => {
login();
// navigate('/test');
// ipcSend('resize-init');
}}
>
登录
</Button>
<Grid sx={{ display: 'flex', fontSize: '14px', marginTop: '44px' }}>
新用户?
<span
style={{ color: '#1370FF', cursor: 'pointer' }}
onClick={() => {
// ipcSend('test');
shell.openExternal(
'https://www.bkunyun.com/v2/pages/register-page'
);
}}
>
创建帐号
</span>
</Grid>
</Grid>
);
};
import React, { useState } from 'react';
import public from 'commons/public';
import Mount from '../components/mount';
import Preference from '../components/preference';
import { Button, Grid } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
const { ipcRenderer } = require('electron');
const electron = window.require('electron');
const useStyles = makeStyles()((theme) => {
return {
siteBody: {
display: 'flex',
marginLeft: '-8px',
marginTop: '23px',
// flexDirection: 'column',
// alignItems: 'center',
},
text: {
display: 'flex',
alignItems: 'center',
color: '#1E2633',
width: '126px',
height: '36px',
// background: '#E8F0FE',
// borderRadius: '0px 100px 100px 0px',
fontSize: '14px',
paddingLeft: '20px',
cursor: 'pointer',
},
checkText: {
display: 'flex',
alignItems: 'center',
color: '#1370FF',
width: '138px',
height: '36px',
background: '#E8F0FE',
borderRadius: '0px 100px 100px 0px',
fontSize: '14px',
paddingLeft: '20px',
cursor: 'pointer',
},
};
});
export default (props) => {
const { classes } = useStyles();
const { render, navigate } = public();
const [check, setChecked] = useState(localStorage.getItem('site_init'));
return (
<Grid className={classes.siteBody}>
<Grid>
<Grid
className={check === '1' ? classes.checkText : classes.text}
onClick={() => {
setChecked('1');
}}
>
云盘设置
</Grid>
<Grid
className={check === '2' ? classes.checkText : classes.text}
onClick={() => {
setChecked('2');
}}
>
偏好设置
</Grid>
</Grid>
{check === '1' && <Mount />}
{check === '2' && <Preference />}
</Grid>
);
};
import React, { useEffect, useState } from 'react';
import Head from '../components/head';
import { shell } from 'electron';
//js
import { getUserInfo } from '../../commons/utils/publicMethod';
import public from 'commons/public';
import Axios from '../../commons/axios/Axios';
import API from '../../commons/utils/api_manager';
import { Constants } from '../../commons/utils/constants';
import { logout, getAccountBalance } from '../../commons/utils/ajaxOption';
//ui
import { Button, Grid } from '@mui/material';
import { makeStyles } from 'tss-react/mui';
import avatar from '../../commons/assets/img/avatar.svg';
const useStyles = makeStyles()((theme) => {
return {
initBody: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
},
leftBox: {
display: 'flex',
alignItems: 'end',
height: '38px',
cursor: 'pointer',
},
rootButton: {
backgroundColor: '#1370FF',
boxShadow: 'none !important',
color: '#ffffff',
'&:hover': { backgroundColor: '#0055D9', transform: 'inherit' },
},
userBox: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
width: '300px',
marginTop: '10px',
},
signOutTetx: {
fontSize: '14px',
color: '#AAB1BD',
cursor: 'pointer',
},
bar: {
display: 'flex',
alignContent: 'center',
width: '300px',
marginTop: '16px',
marginLeft: '0px',
},
linebody: {
height: '20px',
color: '#FFFFFF',
fontWeight: '600',
fontSize: '11px',
display: 'flex',
paddingLeft: '8px',
alignItems: 'center',
},
zoneList: {
display: 'flex',
flexWrap: 'wrap',
width: '300px',
marginTop: '10px',
},
zoneRound: {
width: '8px',
height: '8px',
minWidth: '8px',
borderRadius: '50%',
},
zoneLable: {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
color: '#1E2633',
fontSize: '12px',
marginLeft: '4px',
},
accountBox: {
width: '300px',
background: '#F4F5F7',
borderRadius: '8px',
padding: '16px 20px',
marginTop: '16px',
},
otherTitle: {
color: '#B7B9BD',
fontSize: '12px',
},
otherValue: {
color: '#565C66',
marginTop: '2px',
},
line: {
width: '1px',
height: '20px',
border: '1px solid #DDE1E6',
margin: '0px 20px',
},
};
});
const zoneStorageList = [
{ id: 'ce-1', lable: '通用计算区', value: '5', color: '#1370FF' },
{
id: 'ce-2',
lable: '网络增强计算区',
value: '3',
color: '#4AB4F8',
},
{ id: 'ce-3', lable: 'GPU计算区', value: '2', color: '#0DD09B' },
{ id: 'ce-4', lable: 'EDA计算区', value: '2', color: '#FF9742' },
// { id: 'ce-3', lable: 'GPU111计算区', value: '2', color: '#0DD09B' },
// { id: 'ce-4', lable: 'EDA222计算区', value: '2', color: '#FF9742' },
// { id: 'ce-3', lable: 'GPU22计算区', value: '2', color: '#0DD09B' },
// { id: 'ce-4', lable: 'EDA计算区', value: '2', color: '#FF9742' },
// { id: 'ce-3', lable: 'GPU计算区', value: '2', color: '#0DD09B' },
// { id: 'ce-4', lable: 'EDA计算区', value: '2', color: '#FF9742' },
// {
// id: 'ce-5',
// lable: 'roco超级无敌极限计算区',
// value: '1',
// color: '#FFB919',
// },
];
export default (props) => {
const { classes } = useStyles();
const { render, navigate } = public();
const [balanceData, setBalanceValue] = useState({});
const getBalance = async () => {
let data = await Axios.request(getAccountBalance());
if (data && data.code === 200) {
setBalanceValue(data.res.data);
}
};
const sigout = async () => {
let data = await Axios.request(logout());
if (data && data.code === 200) {
navigate('/');
localStorage.removeItem(Constants.TOKEN_KEY);
localStorage.removeItem(Constants.USER_INFO_TOKEN_KEY);
// localStorage.removeItem(Constants.CURRENT_REGION_SELECT_KEY);
// localStorage.removeItem(Constants.RAYSYNC_ADDR_TOKEN_KEY);
}
};
console.log(getUserInfo(), 'tttttttt');
useEffect(() => {
getBalance();
}, []);
return (
<Grid className={classes.initBody}>
<Head level={true} />
<Grid className={classes.userBox}>
<Grid className={classes.leftBox}>
<img src={avatar} alt="" />
<Grid sx={{ marginLeft: '8px' }}>
<Grid sx={{ fontSize: '14px', color: '#1E2633' }}>
{getUserInfo().name}
</Grid>
<Grid sx={{ fontSize: '12px', color: '#B7B9BD' }}>
云空间:已用200TB
</Grid>
</Grid>
</Grid>
<Grid className={classes.signOutTetx} onClick={() => sigout()}>
退出账号
</Grid>
</Grid>
<Grid
className={classes.bar}
container
spacing={zoneStorageList.length}
>
{zoneStorageList.map((e, key) => {
console.log('key: ', key);
return (
<Grid
xs={e.value}
key={key}
className={classes.linebody}
sx={{
background: e.color,
// marginRight: `${-0.1 - key * 0.1}rem`,
// zIndex: `${100 - key}`,
// borderRadius: key ? '0px 4px 4px 0px' : '4px',
}}
>
{e.value}TB
</Grid>
);
})}
</Grid>
<Grid className={classes.zoneList}>
{zoneStorageList.map((e, key) => {
return (
<Grid
sx={{
display: 'flex',
alignItems: 'center',
width: '100px',
}}
key={key}
>
<Grid
className={classes.zoneRound}
sx={{ background: e.color }}
></Grid>
<Grid className={classes.zoneLable}>{e.lable}</Grid>
</Grid>
);
})}
</Grid>
<Grid className={classes.accountBox}>
<Grid sx={{ fontSize: '12px', color: '#8A9099' }}>
账户余额
</Grid>
<Grid
sx={{
display: 'flex',
justifyContent: 'space-between',
marginTop: '10px',
}}
>
<Grid sx={{ display: 'flex', alignItems: 'end' }}>
<Grid
sx={{
fontWeight: '600',
color: '#1E2633',
fontSize: '16px',
marginRight: '10px',
}}
>
¥
</Grid>
<Grid
sx={{
color: '#1E2633',
fontSize: '30px',
fontWeight: '600',
lineHeight: '30px',
}}
>
{balanceData.balance}
</Grid>
</Grid>
<Button
variant="contained"
sx={{ width: '68px', height: '30px' }}
classes={{
root: classes.rootButton,
}}
onClick={() => {
let Token =
localStorage.getItem(Constants.TOKEN_KEY) &&
JSON.parse(
localStorage.getItem(Constants.TOKEN_KEY)
);
shell.openExternal(
`http://47.57.4.97/v2/console/cloude-dashboard?access_token=${Token['access_token']}&expires_in=${Token['expires_in']}&refresh_token=${Token['refresh_token']}&recharge=true`
);
}}
>
充值
</Button>
</Grid>
<Grid
sx={{
display: 'flex',
marginTop: '16px',
alignItems: 'center',
}}
>
<Grid
sx={{ display: balanceData.coupon ? 'block' : 'none' }}
>
<Grid className={classes.otherTitle}>体验金</Grid>
<Grid className={classes.otherValue}>
¥{balanceData.coupon}
</Grid>
</Grid>
<Grid
sx={{
display: balanceData.creditLimit ? 'block' : 'none',
}}
className={classes.line}
></Grid>
<Grid
sx={{
display: balanceData.creditLimit ? 'block' : 'none',
}}
>
<Grid className={classes.otherTitle}>信用额度</Grid>
<Grid className={classes.otherValue}>
¥{balanceData.creditLimit}
</Grid>
</Grid>
<Grid
sx={{
display: balanceData.daysLimit ? 'block' : 'none',
}}
className={classes.line}
></Grid>
<Grid
sx={{
display: balanceData.daysLimit ? 'block' : 'none',
}}
>
<Grid className={classes.otherTitle}>可透支天数</Grid>
<Grid className={classes.otherValue}>
{balanceData.daysLimit}
</Grid>
</Grid>
</Grid>
</Grid>
</Grid>
);
};
......@@ -6,7 +6,7 @@
http-equiv="Content-Security-Policy"
content="script-src 'self' 'unsafe-inline'"
/>
<title>Hello Electron React!</title>
<title>北鲲云盘</title>
</head>
<body>
<div id="root"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment