Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d24b279a
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,发现更多精彩内容 >>
提交
d24b279a
编写于
5月 24, 2017
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
language surveys: add surveyID
上级
9e977732
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
11 deletion
+12
-11
src/vs/platform/node/product.ts
src/vs/platform/node/product.ts
+1
-0
src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts
.../surveys/electron-browser/languageSurveys.contribution.ts
+11
-11
未找到文件。
src/vs/platform/node/product.ts
浏览文件 @
d24b279a
...
...
@@ -66,6 +66,7 @@ export interface IProductConfiguration {
}
export
interface
ISurveyData
{
surveyId
:
string
;
surveyUrl
:
string
;
languageId
:
string
;
editCount
:
number
;
...
...
src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts
浏览文件 @
d24b279a
...
...
@@ -31,12 +31,12 @@ class LanguageSurvey {
fileService
:
IFileService
,
modelService
:
IModelService
)
{
const
SESSION_COUNT_KEY
=
`
${
data
.
language
Id
}
.sessionCount`
;
const
LAST_SESSION_DATE_KEY
=
`
${
data
.
language
Id
}
.lastSessionDate`
;
const
SKIP_VERSION_KEY
=
`
${
data
.
language
Id
}
.skipVersion`
;
const
IS_CANDIDATE_KEY
=
`
${
data
.
language
Id
}
.isCandidate`
;
const
EDITED_LANGUAGE_COUNT_KEY
=
`
${
data
.
language
Id
}
.editedCount`
;
const
EDITED_LANGUAGE_DATE_KEY
=
`
${
data
.
language
Id
}
.editedDate`
;
const
SESSION_COUNT_KEY
=
`
${
data
.
survey
Id
}
.sessionCount`
;
const
LAST_SESSION_DATE_KEY
=
`
${
data
.
survey
Id
}
.lastSessionDate`
;
const
SKIP_VERSION_KEY
=
`
${
data
.
survey
Id
}
.skipVersion`
;
const
IS_CANDIDATE_KEY
=
`
${
data
.
survey
Id
}
.isCandidate`
;
const
EDITED_LANGUAGE_COUNT_KEY
=
`
${
data
.
survey
Id
}
.editedCount`
;
const
EDITED_LANGUAGE_DATE_KEY
=
`
${
data
.
survey
Id
}
.editedDate`
;
const
skipVersion
=
storageService
.
get
(
SKIP_VERSION_KEY
,
StorageScope
.
GLOBAL
,
''
);
if
(
skipVersion
)
{
...
...
@@ -88,7 +88,7 @@ class LanguageSurvey {
const
message
=
nls
.
localize
(
'
helpUs
'
,
"
Help us improve our support for {0}
"
,
data
.
languageId
);
const
takeSurveyAction
=
new
Action
(
'
takeSurvey
'
,
nls
.
localize
(
'
takeShortSurvey
'
,
"
Take Short Survey
"
),
''
,
true
,
()
=>
{
telemetryService
.
publicLog
(
`
${
data
.
language
Id
}
.survey/takeShortSurvey`
);
telemetryService
.
publicLog
(
`
${
data
.
survey
Id
}
.survey/takeShortSurvey`
);
return
telemetryService
.
getTelemetryInfo
().
then
(
info
=>
{
window
.
open
(
`
${
data
.
surveyUrl
}
?o=
${
encodeURIComponent
(
process
.
platform
)}
&v=
${
encodeURIComponent
(
pkg
.
version
)}
&m=
${
encodeURIComponent
(
info
.
machineId
)}
`
);
storageService
.
store
(
IS_CANDIDATE_KEY
,
false
,
StorageScope
.
GLOBAL
);
...
...
@@ -97,20 +97,20 @@ class LanguageSurvey {
});
const
remindMeLaterAction
=
new
Action
(
'
later
'
,
nls
.
localize
(
'
remindLater
'
,
"
Remind Me later
"
),
''
,
true
,
()
=>
{
telemetryService
.
publicLog
(
`
${
data
.
language
Id
}
.survey/remindMeLater`
);
telemetryService
.
publicLog
(
`
${
data
.
survey
Id
}
.survey/remindMeLater`
);
storageService
.
store
(
SESSION_COUNT_KEY
,
sessionCount
-
3
,
StorageScope
.
GLOBAL
);
return
TPromise
.
as
(
null
);
});
const
neverAgainAction
=
new
Action
(
'
never
'
,
nls
.
localize
(
'
neverAgain
'
,
"
Don't Show Again
"
),
''
,
true
,
()
=>
{
telemetryService
.
publicLog
(
`
${
data
.
language
Id
}
.survey/dontShowAgain`
);
telemetryService
.
publicLog
(
`
${
data
.
survey
Id
}
.survey/dontShowAgain`
);
storageService
.
store
(
IS_CANDIDATE_KEY
,
false
,
StorageScope
.
GLOBAL
);
storageService
.
store
(
SKIP_VERSION_KEY
,
pkg
.
version
,
StorageScope
.
GLOBAL
);
return
TPromise
.
as
(
null
);
});
const
actions
=
[
neverAgainAction
,
remindMeLaterAction
,
takeSurveyAction
];
telemetryService
.
publicLog
(
`
${
data
.
language
Id
}
.survey/userAsked`
);
telemetryService
.
publicLog
(
`
${
data
.
survey
Id
}
.survey/userAsked`
);
messageService
.
show
(
Severity
.
Info
,
{
message
,
actions
});
}
...
...
@@ -128,7 +128,7 @@ class LanguageSurveysContribution implements IWorkbenchContribution {
@
IFileService
fileService
:
IFileService
,
@
IModelService
modelService
:
IModelService
)
{
this
.
surveys
=
product
.
surveys
.
filter
(
surveyData
=>
surveyData
.
editCount
&&
surveyData
.
languageId
&&
surveyData
.
surveyUrl
&&
surveyData
.
userProbability
).
map
(
surveyData
=>
this
.
surveys
=
product
.
surveys
.
filter
(
surveyData
=>
surveyData
.
surveyId
&&
surveyData
.
editCount
&&
surveyData
.
languageId
&&
surveyData
.
surveyUrl
&&
surveyData
.
userProbability
).
map
(
surveyData
=>
new
LanguageSurvey
(
surveyData
,
instantiationService
,
storageService
,
messageService
,
telemetryService
,
fileService
,
modelService
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录