Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
ad2d7155
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,发现更多精彩内容 >>
提交
ad2d7155
编写于
6月 20, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
extension viewlet: images
上级
56593a73
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
6 deletion
+24
-6
src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts
...ench/parts/extensions/electron-browser/extensionEditor.ts
+8
-1
src/vs/workbench/parts/extensions/electron-browser/extensionsList.ts
...bench/parts/extensions/electron-browser/extensionsList.ts
+4
-4
src/vs/workbench/parts/extensions/electron-browser/media/extensionEditor.css
...rts/extensions/electron-browser/media/extensionEditor.css
+9
-1
src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css
...s/extensions/electron-browser/media/extensionsViewlet.css
+3
-0
未找到文件。
src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts
浏览文件 @
ad2d7155
...
...
@@ -26,6 +26,7 @@ export class ExtensionEditor extends BaseEditor {
static
ID
:
string
=
'
workbench.editor.extension
'
;
private
icon
:
HTMLElement
;
private
body
:
HTMLElement
;
private
_highlight
:
ITemplateData
;
...
...
@@ -52,7 +53,11 @@ export class ExtensionEditor extends BaseEditor {
const
root
=
append
(
container
,
$
(
'
.extension-editor
'
));
const
header
=
append
(
root
,
$
(
'
.header
'
));
header
.
innerText
=
'
here goes description, author name, links, ratings, install buttons, etc
'
;
this
.
icon
=
append
(
header
,
$
(
'
.icon
'
));
// const details = append(header, $('.details'));
// header.innerText = 'here goes description, author name, links, ratings, install buttons, etc';
this
.
body
=
append
(
root
,
$
(
'
.body
'
));
}
...
...
@@ -64,6 +69,8 @@ export class ExtensionEditor extends BaseEditor {
let
promise
=
TPromise
.
as
<
void
>
(
null
);
const
extension
=
input
.
extension
;
this
.
icon
.
style
.
backgroundImage
=
`url("
${
extension
.
iconUrl
}
")`
;
if
(
!
extension
.
readmeUrl
)
{
this
.
body
.
innerHTML
=
'
no readme :(
'
;
}
else
{
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsList.ts
浏览文件 @
ad2d7155
...
...
@@ -17,7 +17,7 @@ import { CombinedInstallAction } from './extensionsActions';
export
interface
ITemplateData
{
extension
:
IExtension
;
element
:
HTMLElement
;
icon
:
HTML
Image
Element
;
icon
:
HTMLElement
;
name
:
HTMLElement
;
version
:
HTMLElement
;
author
:
HTMLElement
;
...
...
@@ -49,7 +49,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
renderTemplate
(
root
:
HTMLElement
):
ITemplateData
{
const
element
=
append
(
root
,
$
(
'
.extension
'
));
const
icon
=
append
(
element
,
$
<
HTMLImageElement
>
(
'
img
.icon
'
));
const
icon
=
append
(
element
,
$
(
'
.icon
'
));
const
details
=
append
(
element
,
$
(
'
.details
'
));
const
header
=
append
(
details
,
$
(
'
.header
'
));
const
name
=
append
(
header
,
$
(
'
span.name.ellipsis
'
));
...
...
@@ -69,7 +69,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
addClass
(
data
.
element
,
'
loading
'
);
data
.
extension
=
null
;
data
.
icon
.
s
rc
=
''
;
data
.
icon
.
s
tyle
.
backgroundImage
=
''
;
data
.
name
.
textContent
=
''
;
data
.
version
.
textContent
=
''
;
data
.
author
.
textContent
=
''
;
...
...
@@ -82,7 +82,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
removeClass
(
data
.
element
,
'
loading
'
);
data
.
extension
=
extension
;
data
.
icon
.
s
rc
=
extension
.
iconUrl
;
data
.
icon
.
s
tyle
.
backgroundImage
=
`url("
${
extension
.
iconUrl
}
")`
;
data
.
name
.
textContent
=
extension
.
displayName
;
data
.
version
.
textContent
=
extension
.
version
;
data
.
author
.
textContent
=
extension
.
publisherDisplayName
;
...
...
src/vs/workbench/parts/extensions/electron-browser/media/extensionEditor.css
浏览文件 @
ad2d7155
...
...
@@ -12,11 +12,19 @@
}
.extension-editor
>
.header
{
height
:
40
px
;
height
:
128
px
;
background
:
rgba
(
128
,
128
,
128
,
0.15
);
/* TODO */
padding
:
20px
;
}
.extension-editor
>
.header
>
.icon
{
height
:
128px
;
width
:
128px
;
background-size
:
128px
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
}
.extension-editor
>
.body
{
flex
:
1
;
overflow-y
:
scroll
;
...
...
src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css
浏览文件 @
ad2d7155
...
...
@@ -44,6 +44,9 @@
height
:
42px
;
padding
:
10px
14px
10px
0
;
flex-shrink
:
0
;
background-repeat
:
no-repeat
;
background-size
:
42px
;
background-position
:
left
center
;
}
.extensions-viewlet
>
.extensions
.extension.loading
>
.icon
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录