Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
513807b0
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,发现更多精彩内容 >>
提交
513807b0
编写于
8月 28, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
web - improve window indicator
上级
0ffdb5ac
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
25 deletion
+11
-25
resources/web/code-web.js
resources/web/code-web.js
+1
-1
src/vs/code/browser/workbench/workbench.ts
src/vs/code/browser/workbench/workbench.ts
+10
-24
未找到文件。
resources/web/code-web.js
浏览文件 @
513807b0
...
@@ -27,7 +27,7 @@ const BUILTIN_MARKETPLACE_EXTENSIONS_ROOT = path.join(APP_ROOT, '.build', 'built
...
@@ -27,7 +27,7 @@ const BUILTIN_MARKETPLACE_EXTENSIONS_ROOT = path.join(APP_ROOT, '.build', 'built
const
WEB_DEV_EXTENSIONS_ROOT
=
path
.
join
(
APP_ROOT
,
'
.build
'
,
'
builtInWebDevExtensions
'
);
const
WEB_DEV_EXTENSIONS_ROOT
=
path
.
join
(
APP_ROOT
,
'
.build
'
,
'
builtInWebDevExtensions
'
);
const
WEB_MAIN
=
path
.
join
(
APP_ROOT
,
'
src
'
,
'
vs
'
,
'
code
'
,
'
browser
'
,
'
workbench
'
,
'
workbench-dev.html
'
);
const
WEB_MAIN
=
path
.
join
(
APP_ROOT
,
'
src
'
,
'
vs
'
,
'
code
'
,
'
browser
'
,
'
workbench
'
,
'
workbench-dev.html
'
);
const
WEB_PLAYGROUND_VERSION
=
'
0.0.
4
'
;
const
WEB_PLAYGROUND_VERSION
=
'
0.0.
5
'
;
const
args
=
minimist
(
process
.
argv
,
{
const
args
=
minimist
(
process
.
argv
,
{
boolean
:
[
boolean
:
[
...
...
src/vs/code/browser/workbench/workbench.ts
浏览文件 @
513807b0
...
@@ -3,8 +3,7 @@
...
@@ -3,8 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
import
{
IWorkbenchConstructionOptions
,
create
,
ICredentialsProvider
,
IURLCallbackProvider
,
IWorkspaceProvider
,
IWorkspace
,
IWindowIndicator
,
ICommand
,
IHomeIndicator
,
IProductQualityChangeHandler
}
from
'
vs/workbench/workbench.web.api
'
;
import
{
IWorkbenchConstructionOptions
,
create
,
ICredentialsProvider
,
IURLCallbackProvider
,
IWorkspaceProvider
,
IWorkspace
,
IWindowIndicator
,
IHomeIndicator
,
IProductQualityChangeHandler
}
from
'
vs/workbench/workbench.web.api
'
;
import
product
from
'
vs/platform/product/common/product
'
;
import
{
URI
,
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
URI
,
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
generateUuid
}
from
'
vs/base/common/uuid
'
;
import
{
generateUuid
}
from
'
vs/base/common/uuid
'
;
...
@@ -302,8 +301,6 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -302,8 +301,6 @@ class WindowIndicator implements IWindowIndicator {
readonly
tooltip
:
string
;
readonly
tooltip
:
string
;
readonly
command
:
string
|
undefined
;
readonly
command
:
string
|
undefined
;
readonly
commandImpl
:
ICommand
|
undefined
=
undefined
;
constructor
(
workspace
:
IWorkspace
)
{
constructor
(
workspace
:
IWorkspace
)
{
let
repositoryOwner
:
string
|
undefined
=
undefined
;
let
repositoryOwner
:
string
|
undefined
=
undefined
;
let
repositoryName
:
string
|
undefined
=
undefined
;
let
repositoryName
:
string
|
undefined
=
undefined
;
...
@@ -321,20 +318,16 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -321,20 +318,16 @@ class WindowIndicator implements IWindowIndicator {
}
}
}
}
// Repo
if
(
repositoryName
&&
repositoryOwner
)
{
if
(
repositoryName
&&
repositoryOwner
)
{
this
.
label
=
localize
(
'
openInDesktopLabel
'
,
"
$(remote) Open in Desktop
"
);
this
.
label
=
localize
(
'
playgroundLabelRepository
'
,
"
$(remote) VS Code Web Playground: {0}/{1}
"
,
repositoryOwner
,
repositoryName
);
this
.
tooltip
=
localize
(
'
openInDesktopTooltip
'
,
"
Open in Desktop
"
);
this
.
tooltip
=
localize
(
'
playgroundRepositoryTooltip
'
,
"
VS Code Web Playground: {0}/{1}
"
,
repositoryOwner
,
repositoryName
);
this
.
command
=
'
_web.openInDesktop
'
;
}
this
.
commandImpl
=
{
id
:
this
.
command
,
// No Repo
handler
:
()
=>
{
else
{
const
protocol
=
product
.
quality
===
'
stable
'
?
'
vscode
'
:
'
vscode-insiders
'
;
this
.
label
=
localize
(
'
playgroundLabel
'
,
"
$(remote) VS Code Web Playground
"
);
window
.
open
(
`
${
protocol
}
://vscode.git/clone?url=
${
encodeURIComponent
(
`https://github.com/
${
repositoryOwner
}
/
${
repositoryName
}
.git`
)}
`
);
this
.
tooltip
=
localize
(
'
playgroundTooltip
'
,
"
VS Code Web Playground
"
);
}
};
}
else
{
this
.
label
=
localize
(
'
playgroundLabel
'
,
"
Web Playground
"
);
this
.
tooltip
=
this
.
label
;
}
}
}
}
}
}
...
@@ -416,16 +409,10 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -416,16 +409,10 @@ class WindowIndicator implements IWindowIndicator {
title
:
localize
(
'
home
'
,
"
Home
"
)
title
:
localize
(
'
home
'
,
"
Home
"
)
};
};
// Commands
const
commands
:
ICommand
[]
=
[];
// Window indicator (unless connected to a remote)
// Window indicator (unless connected to a remote)
let
windowIndicator
:
WindowIndicator
|
undefined
=
undefined
;
let
windowIndicator
:
WindowIndicator
|
undefined
=
undefined
;
if
(
!
workspaceProvider
.
hasRemote
())
{
if
(
!
workspaceProvider
.
hasRemote
())
{
windowIndicator
=
new
WindowIndicator
(
workspace
);
windowIndicator
=
new
WindowIndicator
(
workspace
);
if
(
windowIndicator
.
commandImpl
)
{
commands
.
push
(
windowIndicator
.
commandImpl
);
}
}
}
// Product Quality Change Handler
// Product Quality Change Handler
...
@@ -447,7 +434,6 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -447,7 +434,6 @@ class WindowIndicator implements IWindowIndicator {
create
(
document
.
body
,
{
create
(
document
.
body
,
{
...
config
,
...
config
,
homeIndicator
,
homeIndicator
,
commands
,
windowIndicator
,
windowIndicator
,
productQualityChangeHandler
,
productQualityChangeHandler
,
workspaceProvider
,
workspaceProvider
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录