Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
526b4e93
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
526b4e93
编写于
3月 01, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bring back extension loading indicator
上级
5f545975
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
100 addition
and
22 deletion
+100
-22
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
+20
-22
src/vs/workbench/parts/extensions/browser/media/extensionEditor.css
...kbench/parts/extensions/browser/media/extensionEditor.css
+4
-0
src/vs/workbench/parts/extensions/browser/media/loading.svg
src/vs/workbench/parts/extensions/browser/media/loading.svg
+36
-0
src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css
...s/extensions/electron-browser/media/extensionsViewlet.css
+4
-0
src/vs/workbench/parts/extensions/electron-browser/media/loading.svg
...bench/parts/extensions/electron-browser/media/loading.svg
+36
-0
未找到文件。
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
浏览文件 @
526b4e93
...
...
@@ -380,31 +380,29 @@ export class ExtensionEditor extends BaseEditor {
append
(
this
.
content
,
$
(
'
p.nocontent
'
)).
textContent
=
localize
(
'
noDependencies
'
,
"
No Dependencies
"
);
return
;
}
addClass
(
this
.
content
,
'
loading
'
);
this
.
extensionDependencies
.
get
().
then
(
extensionDependencies
=>
{
removeClass
(
this
.
content
,
'
loading
'
);
const
content
=
$
(
'
div
'
,
{
class
:
'
subcontent
'
});
const
scrollableContent
=
new
DomScrollableElement
(
content
,
{
canUseTranslate3d
:
false
});
append
(
this
.
content
,
scrollableContent
.
getDomNode
());
this
.
contentDisposables
.
push
(
scrollableContent
);
return
this
.
loadContents
(()
=>
{
return
this
.
extensionDependencies
.
get
().
then
(
extensionDependencies
=>
{
const
content
=
$
(
'
div
'
,
{
class
:
'
subcontent
'
});
const
scrollableContent
=
new
DomScrollableElement
(
content
,
{
canUseTranslate3d
:
false
});
append
(
this
.
content
,
scrollableContent
.
getDomNode
());
this
.
contentDisposables
.
push
(
scrollableContent
);
const
tree
=
this
.
renderDependencies
(
content
,
extensionDependencies
);
const
layout
=
()
=>
{
scrollableContent
.
scanDomNode
();
const
scrollState
=
scrollableContent
.
getScrollState
();
tree
.
layout
(
scrollState
.
height
);
};
const
removeLayoutParticipant
=
arrays
.
insert
(
this
.
layoutParticipants
,
{
layout
});
this
.
contentDisposables
.
push
(
toDisposable
(
removeLayoutParticipant
));
const
tree
=
this
.
renderDependencies
(
content
,
extensionDependencies
);
const
layout
=
()
=>
{
this
.
contentDisposables
.
push
(
tree
);
scrollableContent
.
scanDomNode
();
const
scrollState
=
scrollableContent
.
getScrollState
();
tree
.
layout
(
scrollState
.
height
);
};
const
removeLayoutParticipant
=
arrays
.
insert
(
this
.
layoutParticipants
,
{
layout
});
this
.
contentDisposables
.
push
(
toDisposable
(
removeLayoutParticipant
));
this
.
contentDisposables
.
push
(
tree
);
scrollableContent
.
scanDomNode
();
},
error
=>
{
removeClass
(
this
.
content
,
'
loading
'
);
append
(
this
.
content
,
$
(
'
p.nocontent
'
)).
textContent
=
error
;
this
.
messageService
.
show
(
Severity
.
Error
,
error
);
return
;
},
error
=>
{
append
(
this
.
content
,
$
(
'
p.nocontent
'
)).
textContent
=
error
;
this
.
messageService
.
show
(
Severity
.
Error
,
error
);
});
});
}
...
...
src/vs/workbench/parts/extensions/browser/media/extensionEditor.css
浏览文件 @
526b4e93
...
...
@@ -151,6 +151,10 @@
height
:
calc
(
100%
-
36px
);
}
.extension-editor
>
.body
>
.content.loading
{
background
:
url('loading.svg')
center
center
no-repeat
;
}
.extension-editor
>
.body
>
.content
>
.monaco-scrollable-element
{
height
:
100%
;
}
...
...
src/vs/workbench/parts/extensions/browser/media/loading.svg
0 → 100644
浏览文件 @
526b4e93
<svg
xmlns=
"http://www.w3.org/2000/svg"
version=
"1.1"
width=
"575"
height=
"6px"
>
<style>
circle {
animation: ball 2.5s cubic-bezier(0.000, 1.000, 1.000, 0.000) infinite;
fill: #bbb;
}
#balls {
animation: balls 2.5s linear infinite;
}
#circle2 { animation-delay: 0.1s; }
#circle3 { animation-delay: 0.2s; }
#circle4 { animation-delay: 0.3s; }
#circle5 { animation-delay: 0.4s; }
@keyframes ball {
from { transform: none; }
20% { transform: none; }
80% { transform: translateX(864px); }
to { transform: translateX(864px); }
}
@keyframes balls {
from { transform: translateX(-40px); }
to { transform: translateX(30px); }
}
</style>
<g
id=
"balls"
>
<circle
class=
"circle"
id=
"circle1"
cx=
"-115"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle2"
cx=
"-130"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle3"
cx=
"-145"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle4"
cx=
"-160"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle5"
cx=
"-175"
cy=
"3"
r=
"3"
/>
</g>
</svg>
\ No newline at end of file
src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css
浏览文件 @
526b4e93
...
...
@@ -47,6 +47,10 @@
display
:
flex
;
}
.extensions-viewlet
>
.extensions
.extension.loading
{
background
:
url('loading.svg')
center
center
no-repeat
;
}
.extensions-viewlet
>
.extensions
.extension
>
.icon
{
width
:
42px
;
height
:
42px
;
...
...
src/vs/workbench/parts/extensions/electron-browser/media/loading.svg
0 → 100644
浏览文件 @
526b4e93
<svg
xmlns=
"http://www.w3.org/2000/svg"
version=
"1.1"
width=
"575"
height=
"6px"
>
<style>
circle {
animation: ball 2.5s cubic-bezier(0.000, 1.000, 1.000, 0.000) infinite;
fill: #bbb;
}
#balls {
animation: balls 2.5s linear infinite;
}
#circle2 { animation-delay: 0.1s; }
#circle3 { animation-delay: 0.2s; }
#circle4 { animation-delay: 0.3s; }
#circle5 { animation-delay: 0.4s; }
@keyframes ball {
from { transform: none; }
20% { transform: none; }
80% { transform: translateX(864px); }
to { transform: translateX(864px); }
}
@keyframes balls {
from { transform: translateX(-40px); }
to { transform: translateX(30px); }
}
</style>
<g
id=
"balls"
>
<circle
class=
"circle"
id=
"circle1"
cx=
"-115"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle2"
cx=
"-130"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle3"
cx=
"-145"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle4"
cx=
"-160"
cy=
"3"
r=
"3"
/>
<circle
class=
"circle"
id=
"circle5"
cx=
"-175"
cy=
"3"
r=
"3"
/>
</g>
</svg>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录