Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
1351744f
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1351744f
编写于
11月 14, 2017
作者:
S
Sandeep Somavarapu
提交者:
GitHub
11月 14, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #36261 from golf1052/master
Show preview tag on extention page if extension is in preview
上级
d133edf6
76306292
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
5 deletion
+32
-5
src/vs/platform/extensionManagement/common/extensionManagement.ts
...latform/extensionManagement/common/extensionManagement.ts
+2
-1
src/vs/platform/extensionManagement/node/extensionGalleryService.ts
...tform/extensionManagement/node/extensionGalleryService.ts
+7
-1
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
+7
-0
src/vs/workbench/parts/extensions/browser/media/extensionEditor.css
...kbench/parts/extensions/browser/media/extensionEditor.css
+9
-1
src/vs/workbench/parts/extensions/common/extensions.ts
src/vs/workbench/parts/extensions/common/extensions.ts
+2
-1
src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts
...bench/parts/extensions/node/extensionsWorkbenchService.ts
+5
-1
未找到文件。
src/vs/platform/extensionManagement/common/extensionManagement.ts
浏览文件 @
1351744f
...
...
@@ -157,6 +157,7 @@ export interface IGalleryExtension {
assets
:
IGalleryExtensionAssets
;
properties
:
IGalleryExtensionProperties
;
telemetryData
:
any
;
preview
:
boolean
;
}
export
interface
IGalleryMetadata
{
...
...
@@ -324,4 +325,4 @@ export interface IExtensionTipsService {
export
const
ExtensionsLabel
=
localize
(
'
extensions
'
,
"
Extensions
"
);
export
const
ExtensionsChannelId
=
'
extensions
'
;
export
const
PreferencesLabel
=
localize
(
'
preferences
'
,
"
Preferences
"
);
\ No newline at end of file
export
const
PreferencesLabel
=
localize
(
'
preferences
'
,
"
Preferences
"
);
src/vs/platform/extensionManagement/node/extensionGalleryService.ts
浏览文件 @
1351744f
...
...
@@ -54,6 +54,7 @@ interface IRawGalleryExtension {
publisher
:
{
displayName
:
string
,
publisherId
:
string
,
publisherName
:
string
;
};
versions
:
IRawGalleryExtensionVersion
[];
statistics
:
IRawGalleryExtensionStatistics
[];
flags
:
string
;
}
interface
IRawGalleryQueryResult
{
...
...
@@ -252,6 +253,10 @@ function getEngine(version: IRawGalleryExtensionVersion): string {
return
(
values
.
length
>
0
&&
values
[
0
].
value
)
||
''
;
}
function
getIsPreview
(
flags
:
string
):
boolean
{
return
flags
.
indexOf
(
'
preview
'
)
!==
-
1
;
}
function
toExtension
(
galleryExtension
:
IRawGalleryExtension
,
extensionsGalleryUrl
:
string
,
index
:
number
,
query
:
Query
,
querySource
?:
string
):
IGalleryExtension
{
const
[
version
]
=
galleryExtension
.
versions
;
const
assets
=
{
...
...
@@ -296,7 +301,8 @@ function toExtension(galleryExtension: IRawGalleryExtension, extensionsGalleryUr
index
:
((
query
.
pageNumber
-
1
)
*
query
.
pageSize
)
+
index
,
searchText
:
query
.
searchText
,
querySource
}
},
preview
:
getIsPreview
(
galleryExtension
.
flags
)
};
}
...
...
src/vs/workbench/parts/extensions/browser/extensionEditor.ts
浏览文件 @
1351744f
...
...
@@ -153,6 +153,7 @@ export class ExtensionEditor extends BaseEditor {
private
icon
:
HTMLImageElement
;
private
name
:
HTMLElement
;
private
identifier
:
HTMLElement
;
private
preview
:
HTMLElement
;
private
license
:
HTMLElement
;
private
publisher
:
HTMLElement
;
private
installCount
:
HTMLElement
;
...
...
@@ -215,6 +216,7 @@ export class ExtensionEditor extends BaseEditor {
const
title
=
append
(
details
,
$
(
'
.title
'
));
this
.
name
=
append
(
title
,
$
(
'
span.name.clickable
'
,
{
title
:
localize
(
'
name
'
,
"
Extension name
"
)
}));
this
.
identifier
=
append
(
title
,
$
(
'
span.identifier
'
,
{
title
:
localize
(
'
extension id
'
,
"
Extension identifier
"
)
}));
this
.
preview
=
append
(
title
,
$
(
'
span.preview
'
,
{
title
:
localize
(
'
preview
'
,
"
Preview
"
)
}));
const
subtitle
=
append
(
details
,
$
(
'
.subtitle
'
));
this
.
publisher
=
append
(
subtitle
,
$
(
'
span.publisher.clickable
'
,
{
title
:
localize
(
'
publisher
'
,
"
Publisher name
"
)
}));
...
...
@@ -286,6 +288,11 @@ export class ExtensionEditor extends BaseEditor {
this
.
name
.
textContent
=
extension
.
displayName
;
this
.
identifier
.
textContent
=
extension
.
id
;
if
(
extension
.
preview
)
{
this
.
preview
.
textContent
=
localize
(
'
preview
'
,
"
Preview
"
);
}
else
{
this
.
preview
.
textContent
=
null
;
}
this
.
publisher
.
textContent
=
extension
.
publisherDisplayName
;
this
.
description
.
textContent
=
extension
.
description
;
...
...
src/vs/workbench/parts/extensions/browser/media/extensionEditor.css
浏览文件 @
1351744f
...
...
@@ -62,6 +62,14 @@
white-space
:
nowrap
;
}
.extension-editor
>
.header
>
.details
>
.title
>
.preview
{
background
:
rgb
(
214
,
63
,
38
);
font-size
:
14px
;
margin-left
:
10px
;
padding
:
0px
4px
;
border-radius
:
4px
;
}
.extension-editor
>
.header
>
.details
>
.subtitle
{
padding-top
:
6px
;
white-space
:
nowrap
;
...
...
@@ -324,4 +332,4 @@
font-size
:
90%
;
font-weight
:
600
;
opacity
:
0.6
;
}
\ No newline at end of file
}
src/vs/workbench/parts/extensions/common/extensions.ts
浏览文件 @
1351744f
...
...
@@ -48,6 +48,7 @@ export interface IExtension {
disabledForWorkspace
:
boolean
;
dependencies
:
string
[];
telemetryData
:
any
;
preview
:
boolean
;
getManifest
():
TPromise
<
IExtensionManifest
>
;
getReadme
():
TPromise
<
string
>
;
getChangelog
():
TPromise
<
string
>
;
...
...
@@ -88,4 +89,4 @@ export const AutoUpdateConfigurationKey = 'extensions.autoUpdate';
export
interface
IExtensionsConfiguration
{
autoUpdate
:
boolean
;
ignoreRecommendations
:
boolean
;
}
\ No newline at end of file
}
src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts
浏览文件 @
1351744f
...
...
@@ -179,6 +179,10 @@ class Extension implements IExtension {
}
}
get
preview
():
boolean
{
return
this
.
gallery
?
this
.
gallery
.
preview
:
false
;
}
getManifest
():
TPromise
<
IExtensionManifest
>
{
if
(
this
.
gallery
)
{
if
(
this
.
gallery
.
assets
.
manifest
)
{
...
...
@@ -935,4 +939,4 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService {
this
.
syncDelayer
.
cancel
();
this
.
disposables
=
dispose
(
this
.
disposables
);
}
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录