Skip to content

Commit 9a66f50

Browse files
authored
Merge branch 'dashboard' into global-disabled
2 parents b0b05b7 + ed491d4 commit 9a66f50

File tree

45 files changed

+6148
-1544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+6148
-1544
lines changed

404.html

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-cn">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1,minimum-scale=1, maximum-scale=1"
8+
/>
9+
<title>404 Page</title>
10+
<meta
11+
name="Keywords"
12+
content="Coding.net,Coding,WebIDE,Web IDE,IDE,Git,代码托管,在线开发,在线调试,Terminal,开发环境分享,软件团队协作,Cloud Studio"
13+
/>
14+
<meta
15+
name="Description"
16+
content="Cloud Studio 是Coding自主研发的在线集成开发环境。用户可以通过 Cloud Studio 创建项目的工作空间,进行在线开发,调试等操作。与此同时,Cloud Studio 还提供了可分享的开发环境功能,用户可以保存当前的 Terminal 环境,分享给团队的其他成员。"
17+
/>
18+
</head>
19+
<style>
20+
body {
21+
width: 100%;
22+
min-width: 300px;
23+
height: auto;
24+
margin: 0;
25+
background: rgb(242, 244, 246);
26+
font-family: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB",
27+
"Segoe UI", "Microsoft YaHei", "微软雅黑", "sans-serif";
28+
-webkit-font-smoothing: antialiased;
29+
}
30+
.container {
31+
width: 782px;
32+
height: 289px;
33+
margin: auto;
34+
margin-top: 220px;
35+
}
36+
.container .tips {
37+
position: relative;
38+
float: left;
39+
min-width: 372px;
40+
min-height: 289px;
41+
margin-top: 20px;
42+
}
43+
.container .tips .title {
44+
width: 372px;
45+
height: 101px;
46+
line-height: 101px;
47+
font-size: 120px;
48+
color: #4f565f;
49+
}
50+
.container .tips .introTips {
51+
width: 372px;
52+
height: 44px;
53+
line-height: 40px;
54+
font-size: 24px;
55+
color: #76808e;
56+
}
57+
.container .tips .closeBtn {
58+
position: absolute;
59+
width: 132px;
60+
height: 48px;
61+
left: 0px;
62+
top: 220px;
63+
line-height: 48px;
64+
font-size: 18px;
65+
color: #ffffff;
66+
text-align: center;
67+
background: #323a45;
68+
border-radius: 4px;
69+
outline: none;
70+
cursor: pointer;
71+
text-decoration: none;
72+
}
73+
.monkey {
74+
float: right;
75+
min-width: 330px;
76+
min-height: 270px;
77+
background: url("https://cs-res.codehub.cn/error-page/404.png") no-repeat
78+
center;
79+
}
80+
</style>
81+
<body>
82+
<div class="container">
83+
<div class="tips">
84+
<div class="title">404!</div>
85+
<div class="introTips"><p>页面,我找不到你,我找不到你啊 ~</p></div>
86+
<a class="closeBtn" href="https://studio.dev.tencent.com/">返回首页</a>
87+
</div>
88+
<div class="monkey"></div>
89+
</div>
90+
</body>
91+
</html>

500.html

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-cn">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1,minimum-scale=1, maximum-scale=1"
8+
/>
9+
<title>500 Page</title>
10+
<meta
11+
name="Keywords"
12+
content="Coding.net,Coding,WebIDE,Web IDE,IDE,Git,代码托管,在线开发,在线调试,Terminal,开发环境分享,软件团队协作,Cloud Studio"
13+
/>
14+
<meta
15+
name="Description"
16+
content="Cloud Studio 是Coding自主研发的在线集成开发环境。用户可以通过 Cloud Studio 创建项目的工作空间,进行在线开发,调试等操作。与此同时,Cloud Studio 还提供了可分享的开发环境功能,用户可以保存当前的 Terminal 环境,分享给团队的其他成员。"
17+
/>
18+
</head>
19+
<style>
20+
body {
21+
width: 100%;
22+
min-width: 300px;
23+
height: auto;
24+
margin: 0;
25+
background: rgb(242, 244, 246);
26+
font-family: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB",
27+
"Segoe UI", "Microsoft YaHei", "微软雅黑", "sans-serif";
28+
-webkit-font-smoothing: antialiased;
29+
}
30+
.container {
31+
width: 816px;
32+
height: 165px;
33+
margin: auto;
34+
margin-top: 209px;
35+
}
36+
.container .tips {
37+
position: relative;
38+
float: left;
39+
min-width: 466px;
40+
min-height: 165px;
41+
margin-top: 40px;
42+
}
43+
.container .tips .title {
44+
width: 466px;
45+
height: 101px;
46+
line-height: 101px;
47+
font-size: 120px;
48+
color: #4f565f;
49+
}
50+
.container .tips .introTips {
51+
width: 323px;
52+
height: 44px;
53+
line-height: 40px;
54+
font-size: 24px;
55+
color: #76808e;
56+
}
57+
.container .tips .closeBtn {
58+
position: absolute;
59+
width: 132px;
60+
height: 48px;
61+
left: 0px;
62+
top: 230px;
63+
line-height: 48px;
64+
font-size: 18px;
65+
color: #ffffff;
66+
text-align: center;
67+
background: #323a45;
68+
border-radius: 4px;
69+
outline: none;
70+
cursor: pointer;
71+
text-decoration: none;
72+
}
73+
.monkey {
74+
float: right;
75+
min-width: 300px;
76+
min-height: 325px;
77+
background: url("https://cs-res.codehub.cn/error-page/500.png") no-repeat
78+
center;
79+
}
80+
</style>
81+
<body>
82+
<div class="container">
83+
<div class="tips">
84+
<div class="title">500!</div>
85+
<div class="introTips"><p>抱歉,系统出错,正在抢修中~</p></div>
86+
<a class="closeBtn" href="https://studio.dev.tencent.com/">返回首页</a>
87+
</div>
88+
<div class="monkey"></div>
89+
</div>
90+
</body>
91+
</html>

502.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-cn">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1,minimum-scale=1, maximum-scale=1"
8+
/>
9+
<title>502 Page</title>
10+
<meta
11+
name="Keywords"
12+
content="Coding.net,Coding,WebIDE,Web IDE,IDE,Git,代码托管,在线开发,在线调试,Terminal,开发环境分享,软件团队协作,Cloud Studio"
13+
/>
14+
<meta
15+
name="Description"
16+
content="Cloud Studio 是Coding自主研发的在线集成开发环境。用户可以通过 Cloud Studio 创建项目的工作空间,进行在线开发,调试等操作。与此同时,Cloud Studio 还提供了可分享的开发环境功能,用户可以保存当前的 Terminal 环境,分享给团队的其他成员。"
17+
/>
18+
</head>
19+
<style>
20+
body {
21+
width: 100%;
22+
min-width: 300px;
23+
height: auto;
24+
margin: 0;
25+
background: rgb(242, 244, 246);
26+
font-family: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB",
27+
"Segoe UI", "Microsoft YaHei", "微软雅黑", "sans-serif";
28+
-webkit-font-smoothing: antialiased;
29+
}
30+
.container {
31+
width: 816px;
32+
height: 418px;
33+
margin: auto;
34+
margin-top: 196px;
35+
}
36+
.container .tips {
37+
position: relative;
38+
float: left;
39+
min-width: 466px;
40+
min-height: 418px;
41+
}
42+
.container .tips .title {
43+
width: 466px;
44+
height: 101px;
45+
line-height: 101px;
46+
font-size: 120px;
47+
color: #4f565f;
48+
}
49+
.container .tips .introTips {
50+
width: 466px;
51+
height: 317px;
52+
line-height: 24px;
53+
font-size: 24px;
54+
color: #76808e;
55+
}
56+
.monkey {
57+
float: right;
58+
min-width: 300px;
59+
min-height: 300px;
60+
background: url("https://cs-res.codehub.cn/error-page/502.png") no-repeat
61+
center;
62+
}
63+
</style>
64+
<body>
65+
<div class="container">
66+
<div class="tips">
67+
<div class="title">502!</div>
68+
<div class="introTips">
69+
<p style="line-height: 80px;">后端,我连不上你啊,我连不上你~</p>
70+
<p>请在 Cloud Studio 中检查:</p>
71+
<p>1、应用有没有监听访问链接生成的端口号。</p>
72+
<p>2、您生成的链接是否已经是否。</p>
73+
</div>
74+
</div>
75+
<div class="monkey"></div>
76+
</div>
77+
</body>
78+
</html>

app/backendAPI/websocketClients.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import emitter, * as E from 'utils/emitter'
55
import config from 'config'
66
import { autorun, runInAction } from 'mobx'
77
import { notify, NOTIFY_TYPE } from '../components/Notification/actions'
8-
import * as searchAPI from 'backendAPI/searchAPI'
98

109
const log = console.log || (x => x)
1110
const warn = console.warn || (x => x)
@@ -263,7 +262,6 @@ class SearchSocketClient {
263262
close () {
264263
const self = this
265264
if (config.searchSocketConnected) {
266-
searchAPI.searchWorkspaceDown();
267265
self.shouldClose = true;
268266
self.socket.close();
269267
// must emit ???

app/commons/Search/subscribeToSearch.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { SearchSocketClient } from 'backendAPI/websocketClients'
32
import { autorun } from 'mobx'
43
import state from './state'

app/commons/Tab/TabBar.jsx

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import TabLabel from './TabLabel'
77
import Menu from 'components/Menu'
88
import ContextMenu from 'components/ContextMenu'
99
import i18n from 'utils/createI18n'
10-
10+
import * as SideBar from 'components/Panel/SideBar/actions'
11+
import config from 'config'
12+
import * as Panel from 'components/Panel/actions'
13+
import panelState from 'components/Panel/state'
1114

1215
@defaultProps(props => ({
1316
addTab: () => props.tabGroup.addTab(),
@@ -43,6 +46,7 @@ class TabBar extends Component {
4346
} = this.props
4447

4548
const tabBarId = `tab_bar_${tabGroup.id}`
49+
const size = panelState.panels.get('PANEL_BOTTOM').size
4650

4751
return (
4852
<div id={tabBarId}
@@ -67,12 +71,28 @@ class TabBar extends Component {
6771
</svg>
6872
</div>
6973
<div onDoubleClick={addTab} className='tab-dbclick-area' />
74+
{(!config.isPad || tabGroup.id !== 'terminalGroup')
75+
&& <div className='tab-show-list'
76+
style={{ marginBottom: '-2px' }}
77+
onClick={e => {
78+
e.stopPropagation()
79+
this.setState({ showDropdownMenu: !this.state.showDropdownMenu })
80+
}}
81+
>
82+
<i className='fa fa-ellipsis-h' />
83+
{this.renderDropdownMenu(size)}
84+
</div>}
85+
{tabGroup.id === 'terminalGroup' &&
7086
<div className='tab-show-list'
71-
onClick={(e) => { e.stopPropagation(); this.setState({ showDropdownMenu: true }) }}
87+
style={{ marginBottom: size ? '4px' : '-6px' }}
88+
onClick={e => {
89+
e.stopPropagation()
90+
!size ? Panel.expandPanel('PANEL_BOTTOM')
91+
: Panel.shrinkPanel('PANEL_BOTTOM')
92+
}}
7293
>
73-
<i className='fa fa-sort-desc' />
74-
{this.renderDropdownMenu()}
75-
</div>
94+
<i className={`fa fa-sort-${size ? 'desc' : 'asc'}`} />
95+
</div>}
7696
<ContextMenu
7797
items={contextMenuItems}
7898
isActive={this.state.showContextMenu}
@@ -88,20 +108,26 @@ class TabBar extends Component {
88108
e.stopPropagation()
89109
e.preventDefault()
90110

111+
const rects = e.target.getBoundingClientRect()
112+
const isPad = config.isPad
113+
91114
this.setState({
92115
showContextMenu: true,
93-
contextMenuPos: { x: e.clientX, y: e.clientY },
116+
contextMenuPos: {
117+
x: isPad ? rects.x : e.clientX,
118+
y: isPad ? rects.y : e.clientY
119+
},
94120
contextMenuContext: context,
95121
})
96122
}
97123

98-
renderDropdownMenu () {
124+
renderDropdownMenu (size) {
99125
if (!this.state.showDropdownMenu) return null
100126
const dropdownMenuItems = this.makeDropdownMenuItems()
101127
if (!dropdownMenuItems.length) return null
102-
return (<Menu className='top-down to-left'
128+
return (<Menu className={`${size ? 'top-down' : 'bottom-top'} to-left`}
129+
style={{ bottom: size ? 'initial' : '15px', right: '2px' }}
103130
items={dropdownMenuItems}
104-
style={{ right: '2px' }}
105131
deactivate={e => this.setState({ showDropdownMenu: false })}
106132
/>)
107133
}

app/commons/Tab/TabLabel.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as Modal from '../../components/Modal/actions'
99
import config from 'config'
1010
import dispatchCommand from 'commands/dispatchCommand'
1111
import { fileIconProviders } from 'components/FileTree/state'
12+
import { gtouchstart, gtouchend, gtouchmove } from 'utils/touch'
1213

1314
const closeFileTab = async (e, tab, removeTab, activateTab) => {
1415
e.stopPropagation()
@@ -87,7 +88,7 @@ let TabLabel = observer(({ tab, removeTab, activateTab, openContextMenu, dbClick
8788
id={tabLabelId}
8889
data-droppable='TABLABEL'
8990
draggable='true'
90-
onClick={e => activateTab(tab.id)}
91+
onClick={e => { activateTab(tab.id) }}
9192
onMouseUp={e => { e.button === 1 && removeTab(tab.id) }}
9293
onDoubleClick={() => {
9394
if (!tab.isActive) {
@@ -99,7 +100,13 @@ let TabLabel = observer(({ tab, removeTab, activateTab, openContextMenu, dbClick
99100
// Chrome 下直接执行 dragStart 会导致立即又出发了 window.dragend, 添加 timeout 以避免无法拖动的情况
100101
setTimeout(() => dnd.dragStart({ type: 'TAB', id: tab.id }), 0)
101102
}}
102-
onContextMenu={e => openContextMenu(e, tab)}
103+
onContextMenu={e => config.isPad ? '' : openContextMenu(e, tab)}
104+
onTouchStart={e => {
105+
e.persist()
106+
gtouchstart(() => { openContextMenu(e, tab) })
107+
}}
108+
onTouchEnd={gtouchend}
109+
onTouchMove={gtouchmove}
103110
>
104111
{dnd.target.id === tabLabelId ? <div className='tab-label-insert-pos'></div> : null}
105112
{tab.icon && <TabIcon fileName={tab.title} defaultIconStr={tab.icon} />}

0 commit comments

Comments
 (0)