Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b6a40fd7
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,发现更多精彩内容 >>
提交
b6a40fd7
编写于
7月 09, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
web - remove deprecated command property for home indicator
上级
3db1eb51
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
35 deletion
+6
-35
src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
...workbench/browser/parts/activitybar/activitybarActions.ts
+0
-20
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+6
-10
src/vs/workbench/workbench.web.api.ts
src/vs/workbench/workbench.web.api.ts
+0
-5
未找到文件。
src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
浏览文件 @
b6a40fd7
...
...
@@ -26,7 +26,6 @@ import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/bro
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
createAndFillInActionBarActions
}
from
'
vs/platform/actions/browser/menuEntryActionViewItem
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
Codicon
}
from
'
vs/base/common/codicons
'
;
import
{
ActionViewItem
,
Separator
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
isMacintosh
}
from
'
vs/base/common/platform
'
;
...
...
@@ -370,25 +369,6 @@ export class HomeActionViewItem extends ActionViewItem {
}
}
/**
* @deprecated TODO@ben remove me eventually
*/
export
class
DeprecatedHomeAction
extends
Action
{
constructor
(
private
readonly
command
:
string
,
name
:
string
,
icon
:
Codicon
,
@
ICommandService
private
readonly
commandService
:
ICommandService
)
{
super
(
'
workbench.action.home
'
,
name
,
icon
.
classNames
);
}
async
run
():
Promise
<
void
>
{
this
.
commandService
.
executeCommand
(
this
.
command
);
}
}
registerThemingParticipant
((
theme
:
IColorTheme
,
collector
:
ICssStyleCollector
)
=>
{
const
activityBarBackgroundColor
=
theme
.
getColor
(
ACTIVITY_BAR_BACKGROUND
);
if
(
activityBarBackgroundColor
)
{
...
...
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
b6a40fd7
...
...
@@ -8,7 +8,7 @@ import * as nls from 'vs/nls';
import
{
ActionsOrientation
,
ActionBar
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
GLOBAL_ACTIVITY_ID
,
IActivity
,
ACCOUNTS_ACTIIVTY_ID
}
from
'
vs/workbench/common/activity
'
;
import
{
Part
}
from
'
vs/workbench/browser/part
'
;
import
{
GlobalActivityActionViewItem
,
ViewContainerActivityAction
,
PlaceHolderToggleCompositePinnedAction
,
PlaceHolderViewContainerActivityAction
,
AccountsActionViewItem
,
HomeAction
,
HomeActionViewItem
,
DeprecatedHomeAction
}
from
'
vs/workbench/browser/parts/activitybar/activitybarActions
'
;
import
{
GlobalActivityActionViewItem
,
ViewContainerActivityAction
,
PlaceHolderToggleCompositePinnedAction
,
PlaceHolderViewContainerActivityAction
,
AccountsActionViewItem
,
HomeAction
,
HomeActionViewItem
}
from
'
vs/workbench/browser/parts/activitybar/activitybarActions
'
;
import
{
IBadge
,
NumberBadge
}
from
'
vs/workbench/services/activity/common/activity
'
;
import
{
IWorkbenchLayoutService
,
Parts
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -400,7 +400,8 @@ export class ActivitybarPart extends Part implements IActivityBarService {
console
.
warn
(
`Unknown home indicator icon
${
homeIndicator
.
icon
}
`
);
codicon
=
Codicon
.
code
;
}
this
.
createHomeBar
(
homeIndicator
.
href
,
homeIndicator
.
command
,
homeIndicator
.
title
,
codicon
);
this
.
createHomeBar
(
homeIndicator
.
href
,
homeIndicator
.
title
,
codicon
);
this
.
onDidChangeHomeBarVisibility
();
}
...
...
@@ -422,7 +423,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
return
this
.
content
;
}
private
createHomeBar
(
href
:
string
,
command
:
string
|
undefined
,
title
:
string
,
icon
:
Codicon
):
void
{
private
createHomeBar
(
href
:
string
,
title
:
string
,
icon
:
Codicon
):
void
{
this
.
homeBarContainer
=
document
.
createElement
(
'
div
'
);
this
.
homeBarContainer
.
setAttribute
(
'
aria-label
'
,
nls
.
localize
(
'
homeIndicator
'
,
"
Home
"
));
this
.
homeBarContainer
.
setAttribute
(
'
role
'
,
'
toolbar
'
);
...
...
@@ -432,19 +433,14 @@ export class ActivitybarPart extends Part implements IActivityBarService {
orientation
:
ActionsOrientation
.
VERTICAL
,
animated
:
false
,
ariaLabel
:
nls
.
localize
(
'
home
'
,
"
Home
"
),
actionViewItemProvider
:
command
?
undefined
:
action
=>
new
HomeActionViewItem
(
action
),
actionViewItemProvider
:
action
=>
new
HomeActionViewItem
(
action
),
allowContextMenu
:
true
}));
const
homeBarIconBadge
=
document
.
createElement
(
'
div
'
);
addClass
(
homeBarIconBadge
,
'
home-bar-icon-badge
'
);
this
.
homeBarContainer
.
appendChild
(
homeBarIconBadge
);
if
(
command
)
{
this
.
homeBar
.
push
(
this
.
_register
(
this
.
instantiationService
.
createInstance
(
DeprecatedHomeAction
,
command
,
title
,
icon
)),
{
icon
:
true
,
label
:
false
});
}
else
{
this
.
homeBar
.
push
(
this
.
_register
(
this
.
instantiationService
.
createInstance
(
HomeAction
,
href
,
title
,
icon
)));
}
this
.
homeBar
.
push
(
this
.
_register
(
this
.
instantiationService
.
createInstance
(
HomeAction
,
href
,
title
,
icon
)));
const
content
=
assertIsDefined
(
this
.
content
);
content
.
prepend
(
this
.
homeBarContainer
);
...
...
src/vs/workbench/workbench.web.api.ts
浏览文件 @
b6a40fd7
...
...
@@ -106,11 +106,6 @@ interface IHomeIndicator {
*/
href
:
string
;
/**
* @deprecated use `href` instead.
*/
command
?:
string
;
/**
* The icon name for the home indicator. This needs to be one of the existing
* icons from our Codicon icon set. For example `sync`.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录