Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3899a50f
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,发现更多精彩内容 >>
提交
3899a50f
编写于
5月 03, 2018
作者:
R
Rachel Macfarlane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move issue reporter data section below steps to reproduce, fixes #49087
上级
bf993214
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
86 addition
and
108 deletion
+86
-108
src/vs/code/electron-browser/issue/issueReporterMain.ts
src/vs/code/electron-browser/issue/issueReporterMain.ts
+17
-4
src/vs/code/electron-browser/issue/issueReporterPage.ts
src/vs/code/electron-browser/issue/issueReporterPage.ts
+64
-80
src/vs/code/electron-browser/issue/media/issueReporter.css
src/vs/code/electron-browser/issue/media/issueReporter.css
+5
-24
未找到文件。
src/vs/code/electron-browser/issue/issueReporterMain.ts
浏览文件 @
3899a50f
...
...
@@ -318,18 +318,31 @@ export class IssueReporter extends Disposable {
label
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
e
.
stopPropagation
();
// Stop propgagation not working as expected in this case https://bugs.chromium.org/p/chromium/issues/detail?id=809801
// preventDefault does prevent outer details tag from toggling, so use that and manually toggle the checkbox
e
.
preventDefault
();
const
containingDiv
=
(
<
HTMLLabelElement
>
e
.
target
).
parentElement
;
const
checkbox
=
<
HTMLInputElement
>
containingDiv
.
firstElementChild
;
if
(
checkbox
)
{
checkbox
.
checked
=
!
checkbox
.
checked
;
this
.
issueReporterModel
.
update
({
[
checkbox
.
id
]:
!
this
.
issueReporterModel
.
getData
()[
checkbox
.
id
]
});
}
});
}
const
showInfoElements
=
document
.
getElementsByClassName
(
'
showInfo
'
);
for
(
let
i
=
0
;
i
<
showInfoElements
.
length
;
i
++
)
{
const
showInfo
=
showInfoElements
.
item
(
i
);
showInfo
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
const
label
=
(
<
HTMLDivElement
>
e
.
target
);
const
containingElement
=
label
.
parentElement
.
parentElement
;
const
info
=
containingElement
.
lastElementChild
;
if
(
info
.
classList
.
contains
(
'
hidden
'
))
{
show
(
info
);
label
.
textContent
=
localize
(
'
hide
'
,
"
hide
"
);
}
else
{
hide
(
info
);
label
.
textContent
=
localize
(
'
show
'
,
"
show
"
);
}
});
}
this
.
addEventListener
(
'
issue-source
'
,
'
change
'
,
(
event
:
Event
)
=>
{
const
fileOnExtension
=
JSON
.
parse
((
<
HTMLInputElement
>
event
.
target
).
value
);
this
.
issueReporterModel
.
update
({
fileOnExtension
:
fileOnExtension
,
includeExtensions
:
!
fileOnExtension
});
...
...
src/vs/code/electron-browser/issue/issueReporterPage.ts
浏览文件 @
3899a50f
...
...
@@ -48,98 +48,82 @@ export default (): string => `
</div>
<div class="input-group description-section">
<label for="description" id="issue-description-label">
<!-- To be dynamically filled -->
</label>
<div class="instructions" id="issue-description-subtitle">
<!-- To be dynamically filled -->
</div>
<div class="block-info-text">
<textarea name="description" id="description" placeholder="
${
escape
(
localize
(
'
details
'
,
"
Please enter details.
"
))}
" required></textarea>
</div>
</div>
<div class="system-info" id="block-container">
<div class="block block-system">
<details>
<summary>
${
escape
(
localize
(
'
systemInfo
'
,
"
My System Info
"
))}
<div class="include-data">
<input class="sendData" type="checkbox" id="includeSystemInfo" checked/>
<label class="caption" for="includeSystemInfo">
${
escape
(
localize
(
'
sendData
'
,
"
Send my data
"
))}
</label>
</div>
</summary>
<div class="block-info">
<!-- To be dynamically filled -->
</div>
</details>
<input class="sendData" type="checkbox" id="includeSystemInfo" checked/>
<label class="caption" for="includeSystemInfo">
${
escape
(
localize
({
key
:
'
sendSystemInfo
'
,
comment
:
[
'
{0} is either "show" or "hide" and is a button to toggle the visibililty of the system information
'
]
},
"
Send my system information ({0})
"
)).
replace
(
'
{0}
'
,
`<a href="#" class="showInfo">
${
escape
(
localize
(
'
show
'
,
"
show
"
))}
</a>`
)}
</label>
<div class="block-info hidden">
<!-- To be dynamically filled -->
</div>
</div>
<div class="block block-process">
<details>
<summary>
${
escape
(
localize
(
'
processes
'
,
"
Currently Running Processes
"
))}
<div class="include-data">
<input class="sendData" type="checkbox" id="includeProcessInfo" checked/>
<label class="caption" for="includeProcessInfo">
${
escape
(
localize
(
'
sendData
'
,
"
Send my data
"
))}
</label>
</div>
</summary>
<pre class="block-info">
<!-- To be dynamically filled -->
</pre>
</details>
<input class="sendData" type="checkbox" id="includeProcessInfo" checked/>
<label class="caption" for="includeProcessInfo">
${
escape
(
localize
({
key
:
'
sendProcessInfo
'
,
comment
:
[
'
{0} is either "show" or "hide" and is a button to toggle the visibililty of the process info
'
]
},
"
Send my currently running processes ({0})
"
)).
replace
(
'
{0}
'
,
`<a href="#" class="showInfo">
${
escape
(
localize
(
'
show
'
,
"
show
"
))}
</a>`
)}
</label>
<pre class="block-info hidden">
<code>
<!-- To be dynamically filled -->
</code>
</pre>
</div>
<div class="block block-workspace">
<details>
<summary>
${
escape
(
localize
(
'
workspaceStats
'
,
"
My Workspace Stats
"
))}
<div class="include-data">
<input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked/>
<label class="caption" for="includeWorkspaceInfo">
${
escape
(
localize
(
'
sendData
'
,
"
Send my data
"
))}
</label>
</div>
</summary>
<pre class="block-info">
<code>
<!-- To be dynamically filled -->
</code>
</pre>
</details>
<input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked/>
<label class="caption" for="includeWorkspaceInfo">
${
escape
(
localize
({
key
:
'
sendWorkspaceInfo
'
,
comment
:
[
'
{0} is either "show" or "hide" and is a button to toggle the visibililty of the workspace information
'
]
},
"
Send my workspace metadata ({0})
"
)).
replace
(
'
{0}
'
,
`<a href="#" class="showInfo">
${
escape
(
localize
(
'
show
'
,
"
show
"
))}
</a>`
)}
</label>
<pre id="systemInfo" class="block-info hidden">
<code>
<!-- To be dynamically filled -->
</code>
</pre>
</div>
<div class="block block-extensions">
<details>
<summary>
${
escape
(
localize
(
'
extensions
'
,
"
My Extensions
"
))}
<div class="include-data">
<input class="sendData" type="checkbox" id="includeExtensions" checked/>
<label class="caption" for="includeExtensions">
${
escape
(
localize
(
'
sendData
'
,
"
Send my data
"
))}
</label>
</div>
</summary>
<div class="block-info">
<!-- To be dynamically filled -->
</div>
</details>
<input class="sendData" type="checkbox" id="includeExtensions" checked/>
<label class="caption" for="includeExtensions">
${
escape
(
localize
({
key
:
'
sendExtensions
'
,
comment
:
[
'
{0} is either "show" or "hide" and is a button to toggle the visibililty of the enabled extensions list
'
]
},
"
Send my enabled extensions ({0})
"
)).
replace
(
'
{0}
'
,
`<a href="#" class="showInfo">
${
escape
(
localize
(
'
show
'
,
"
show
"
))}
</a>`
)}
</label>
<div id="systemInfo" class="block-info hidden">
<!-- To be dynamically filled -->
</div>
</div>
<div class="block block-searchedExtensions">
<details>
<summary>
${
escape
(
localize
(
'
searchedExtensions
'
,
"
Searched Extensions
"
))}
<div class="include-data">
<input class="sendData" type="checkbox" id="includeSearchedExtensions" checked/>
<label class="caption" for="includeSearchedExtensions">
${
escape
(
localize
(
'
sendData
'
,
"
Send my data
"
))}
</label>
</div>
</summary>
<div class="block-info">
<!-- To be dynamically filled -->
</div>
</details>
<input class="sendData" type="checkbox" id="includeSearchedExtensions" checked/>
<label class="caption" for="includeSearchedExtensions">
${
escape
(
localize
({
key
:
'
sendSearchedExtensions
'
,
comment
:
[
'
{0} is either "show" or "hide" and is a button to toggle the visibililty of the searched extensions
'
]
},
"
Send searched extensions ({0})
"
)).
replace
(
'
{0}
'
,
`<a href="#" class="showInfo">
${
escape
(
localize
(
'
show
'
,
"
show
"
))}
</a>`
)}
</label>
<div class="block-info hidden">
<!-- To be dynamically filled -->
</div>
</div>
<div class="block block-settingsSearchResults">
<details>
<summary>
${
escape
(
localize
(
'
settingsSearchDetails
'
,
"
Settings Search Details
"
))}
<div class="include-data">
<input class="sendData" type="checkbox" id="includeSettingsSearchDetails" checked/>
<label class="caption" for="includeSettingsSearchDetails">
${
escape
(
localize
(
'
sendData
'
,
"
Send my data
"
))}
</label>
</div>
</summary>
<div class="block-info">
<!-- To be dynamically filled -->
</div>
</details>
</div>
</div>
<div class="input-group description-section">
<label for="description" id="issue-description-label">
<!-- To be dynamically filled -->
</label>
<div class="instructions" id="issue-description-subtitle">
<!-- To be dynamically filled -->
</div>
<div class="block-info-text">
<textarea name="description" id="description" placeholder="
${
escape
(
localize
(
'
details
'
,
"
Please enter details.
"
))}
" required></textarea>
<input class="sendData" type="checkbox" id="includeSettingsSearchDetails" checked/>
<label class="caption" for="includeSettingsSearchDetails">
${
escape
(
localize
({
key
:
'
sendSettingsSearchDetails
'
,
comment
:
[
'
{0} is either "show" or "hide" and is a button to toggle the visibililty of the search details
'
]
},
"
Send settings search details ({0})
"
)).
replace
(
'
{0}
'
,
`<a href="#" class="showInfo">
${
escape
(
localize
(
'
show
'
,
"
show
"
))}
</a>`
)}
</label>
<div class="block-info hidden">
<!-- To be dynamically filled -->
</div>
</div>
</div>
...
...
src/vs/code/electron-browser/issue/media/issueReporter.css
浏览文件 @
3899a50f
...
...
@@ -21,7 +21,7 @@ th {
text-align
:
inherit
;
}
td
{
padding
:
.
7
5rem
;
padding
:
.
2
5rem
;
vertical-align
:
top
;
}
...
...
@@ -111,6 +111,10 @@ body {
display
:
none
;
}
.block
{
font-size
:
12px
;
}
.block
.block-info
{
width
:
100%
;
font-family
:
'Menlo'
,
'Courier New'
,
'Courier'
,
monospace
;
...
...
@@ -184,40 +188,17 @@ textarea {
margin-top
:
1em
;
}
.system-info
{
margin-bottom
:
1.25em
;
}
select
,
input
,
textarea
{
border
:
1px
solid
transparent
;
margin-top
:
10px
;
}
summary
{
border
:
1px
solid
transparent
;
padding
:
0
10px
;
margin-bottom
:
5px
;
cursor
:
pointer
;
}
.validation-error
{
font-size
:
12px
;
margin-top
:
1em
;
}
.include-data
{
display
:
inline-block
;
}
.include-data
>
.caption
{
display
:
inline-block
;
font-size
:
12px
;
cursor
:
pointer
;
}
.sendData
{
margin-left
:
1em
;
}
input
[
type
=
"checkbox"
]
{
width
:
auto
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录