Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
596887a3
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,发现更多精彩内容 >>
提交
596887a3
编写于
3月 15, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
show updated license terms after 1.0.0
fixes #3704
上级
f19bbe27
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
15 deletion
+37
-15
src/vs/platform/workspace/common/workspace.ts
src/vs/platform/workspace/common/workspace.ts
+1
-0
src/vs/workbench/electron-main/window.ts
src/vs/workbench/electron-main/window.ts
+1
-0
src/vs/workbench/electron-main/windows.ts
src/vs/workbench/electron-main/windows.ts
+1
-0
src/vs/workbench/parts/update/electron-browser/update.contribution.ts
...ench/parts/update/electron-browser/update.contribution.ts
+33
-14
src/vs/workbench/workbench.main.js
src/vs/workbench/workbench.main.js
+1
-1
未找到文件。
src/vs/platform/workspace/common/workspace.ts
浏览文件 @
596887a3
...
...
@@ -108,6 +108,7 @@ export interface IEnvironment {
};
releaseNotesUrl
:
string
;
licenseUrl
:
string
;
productDownloadUrl
:
string
;
welcomePage
:
string
;
...
...
src/vs/workbench/electron-main/window.ts
浏览文件 @
596887a3
...
...
@@ -117,6 +117,7 @@ export interface IWindowConfiguration extends env.ICommandLineArguments {
};
welcomePage
:
string
;
releaseNotesUrl
:
string
;
licenseUrl
:
string
;
productDownloadUrl
:
string
;
enableTelemetry
:
boolean
;
userEnv
:
env
.
IProcessEnvironment
;
...
...
src/vs/workbench/electron-main/windows.ts
浏览文件 @
596887a3
...
...
@@ -675,6 +675,7 @@ export class WindowsManager {
configuration
.
welcomePage
=
env
.
product
.
welcomePage
;
configuration
.
productDownloadUrl
=
env
.
product
.
downloadUrl
;
configuration
.
releaseNotesUrl
=
env
.
product
.
releaseNotesUrl
;
configuration
.
licenseUrl
=
env
.
product
.
licenseUrl
;
configuration
.
updateFeedUrl
=
UpdateManager
.
feedUrl
;
configuration
.
updateChannel
=
UpdateManager
.
channel
;
configuration
.
recentPaths
=
this
.
getRecentlyOpenedPaths
(
workspacePath
,
filesToOpen
);
...
...
src/vs/workbench/parts/
releaseNotes/electron-browser/releaseNotes
.contribution.ts
→
src/vs/workbench/parts/
update/electron-browser/update
.contribution.ts
浏览文件 @
596887a3
...
...
@@ -7,6 +7,7 @@
import
*
as
nls
from
'
vs/nls
'
;
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
}
from
'
vs/workbench/common/contributions
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
...
...
@@ -15,10 +16,23 @@ import { IMessageService } from 'vs/platform/message/common/message';
import
Severity
from
'
vs/base/common/severity
'
;
import
{
ShowReleaseNotesAction
}
from
'
vs/workbench/electron-browser/update
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
shell
}
from
'
electron
'
;
import
*
as
semver
from
'
semver
'
;
export
class
ReleaseNotesContribution
implements
IWorkbenchContribution
{
const
CloseAction
=
new
Action
(
'
close
'
,
nls
.
localize
(
'
close
'
,
"
Close
"
),
''
,
true
,
()
=>
null
);
const
ShowLicenseAction
=
(
licenseUrl
:
string
)
=>
new
Action
(
'
update.showLicense
'
,
nls
.
localize
(
'
license
'
,
"
Read License
"
),
null
,
true
,
()
=>
{
shell
.
openExternal
(
licenseUrl
);
return
TPromise
.
as
(
null
);
}
);
export
class
UpdateContribution
implements
IWorkbenchContribution
{
private
static
KEY
=
'
releaseNotes/lastVersion
'
;
getId
()
{
return
'
vs.update
'
;
}
constructor
(
@
IStorageService
storageService
:
IStorageService
,
...
...
@@ -26,20 +40,15 @@ export class ReleaseNotesContribution implements IWorkbenchContribution {
@
IMessageService
messageService
:
IMessageService
)
{
const
env
=
contextService
.
getConfiguration
().
env
;
if
(
!
env
.
releaseNotesUrl
)
{
return
;
}
const
lastVersion
=
storageService
.
get
(
ReleaseNotesContribution
.
KEY
,
StorageScope
.
GLOBAL
,
''
);
const
lastVersion
=
storageService
.
get
(
UpdateContribution
.
KEY
,
StorageScope
.
GLOBAL
,
''
);
// was there an update?
if
(
lastVersion
&&
env
.
version
!==
lastVersion
)
{
if
(
env
.
releaseNotesUrl
&&
lastVersion
&&
env
.
version
!==
lastVersion
)
{
setTimeout
(()
=>
{
messageService
.
show
(
Severity
.
Info
,
{
message
:
nls
.
localize
(
'
releaseNotes
'
,
"
Welcome to {0} v{1}! Would you like to read the Release Notes?
"
,
env
.
appName
,
env
.
version
),
actions
:
[
new
Action
(
'
close
'
,
nls
.
localize
(
'
close
'
,
"
Close
"
),
''
,
true
,
()
=>
null
)
,
CloseAction
,
ShowReleaseNotesAction
(
env
.
releaseNotesUrl
,
true
)
]
});
...
...
@@ -47,13 +56,23 @@ export class ReleaseNotesContribution implements IWorkbenchContribution {
},
0
);
}
storageService
.
store
(
ReleaseNotesContribution
.
KEY
,
env
.
version
,
StorageScope
.
GLOBAL
);
}
// should we show the new license?
if
(
env
.
licenseUrl
&&
lastVersion
&&
semver
.
satisfies
(
lastVersion
,
'
<1.0.0
'
)
&&
semver
.
satisfies
(
env
.
version
,
'
>=1.0.0
'
))
{
setTimeout
(()
=>
{
messageService
.
show
(
Severity
.
Info
,
{
message
:
nls
.
localize
(
'
licenseChanged
'
,
"
Our license terms have changed, please go through them.
"
,
env
.
appName
,
env
.
version
),
actions
:
[
CloseAction
,
ShowLicenseAction
(
env
.
licenseUrl
)
]
});
},
0
);
}
getId
()
{
return
'
vs.releaseNotes
'
;
storageService
.
store
(
UpdateContribution
.
KEY
,
env
.
version
,
StorageScope
.
GLOBAL
);
}
}
Registry
.
as
<
IWorkbenchContributionsRegistry
>
(
WorkbenchExtensions
.
Workbench
)
.
registerWorkbenchContribution
(
ReleaseNotesContribution
);
\ No newline at end of file
.
registerWorkbenchContribution
(
UpdateContribution
);
\ No newline at end of file
src/vs/workbench/workbench.main.js
浏览文件 @
596887a3
...
...
@@ -81,7 +81,7 @@ define([
'
vs/workbench/parts/gettingStarted/electron-browser/electronGettingStarted.contribution
'
,
'
vs/workbench/parts/
releaseNotes/electron-browser/releaseNotes
.contribution
'
,
'
vs/workbench/parts/
update/electron-browser/update
.contribution
'
,
'
vs/workbench/electron-browser/darwin/cli.contribution
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录