Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
dff65580
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dff65580
编写于
5月 04, 2018
作者:
R
Rachel Macfarlane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use button widget
上级
316e3d32
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
31 deletion
+11
-31
extensions/git-extended/src/prView/prProvider.ts
extensions/git-extended/src/prView/prProvider.ts
+1
-1
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
...s/comments/electron-browser/commentsEditorContribution.ts
+7
-4
src/vs/workbench/parts/comments/electron-browser/media/review.css
...orkbench/parts/comments/electron-browser/media/review.css
+3
-26
未找到文件。
extensions/git-extended/src/prView/prProvider.ts
浏览文件 @
dff65580
...
...
@@ -150,7 +150,7 @@ export class PRProvider implements vscode.TreeDataProvider<PRGroupTreeItem | Pul
});
let
reply
=
{
command
:
'
diff-
'
+
element
.
prItem
.
number
+
'
-post
'
,
title
:
'
Add
single
comment
'
title
:
'
Add comment
'
};
const
_onDidChangeCommentThreads
=
new
vscode
.
EventEmitter
<
vscode
.
CommentThreadChangedEvent
>
();
...
...
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
浏览文件 @
dff65580
...
...
@@ -36,6 +36,8 @@ import { ZoneWidget, IOptions } from 'vs/editor/contrib/zoneWidget/zoneWidget';
import
{
ReviewModel
}
from
'
vs/workbench/parts/comments/common/reviewModel
'
;
import
{
ICommentService
}
from
'
../../../services/comments/electron-browser/commentService
'
;
import
{
CommentThreadCollapsibleState
}
from
'
../../../api/node/extHostTypes
'
;
import
{
Button
}
from
'
vs/base/browser/ui/button/button
'
;
import
{
attachButtonStyler
}
from
'
vs/platform/theme/common/styler
'
;
export
const
ctxReviewPanelVisible
=
new
RawContextKey
<
boolean
>
(
'
reviewPanelVisible
'
,
false
);
export
const
ID
=
'
editor.contrib.review
'
;
...
...
@@ -334,8 +336,10 @@ export class ReviewZoneWidget extends ZoneWidget {
const
formActions
=
$
(
'
.form-actions
'
).
appendTo
(
commentForm
).
getHTMLElement
();
const
button
=
$
(
'
button
'
).
appendTo
(
formActions
).
getHTMLElement
();
button
.
onclick
=
async
()
=>
{
const
button
=
new
Button
(
formActions
);
attachButtonStyler
(
button
,
this
.
themeService
);
button
.
label
=
this
.
commentThread
.
reply
.
title
;
button
.
onDidClick
(
async
()
=>
{
let
newComment
=
await
this
.
commandService
.
executeCommand
(
this
.
_replyCommand
.
id
,
this
.
editor
.
getModel
().
uri
,
{
start
:
{
line
:
lineNumber
,
column
:
1
},
end
:
{
line
:
lineNumber
,
column
:
1
}
...
...
@@ -349,8 +353,7 @@ export class ReviewZoneWidget extends ZoneWidget {
let
secondaryHeading
=
this
.
_commentThread
.
comments
.
filter
(
arrays
.
uniqueFilter
(
comment
=>
comment
.
userName
)).
map
(
comment
=>
`@
${
comment
.
userName
}
`
).
join
(
'
,
'
);
$
(
this
.
_secondaryHeading
).
safeInnerHtml
(
secondaryHeading
);
}
};
button
.
textContent
=
this
.
commentThread
.
reply
.
title
;
});
}
this
.
_resizeObserver
=
new
ResizeObserver
(
entries
=>
{
...
...
src/vs/workbench/parts/comments/electron-browser/media/review.css
浏览文件 @
dff65580
...
...
@@ -150,33 +150,10 @@
display
:
none
;
}
.monaco-editor
.review-widget
.body
.comment-form
.form-actions
button
{
.monaco-editor
.review-widget
.body
.comment-form
.monaco-text-button
{
width
:
auto
;
padding
:
4px
10px
;
float
:
right
;
box-sizing
:
content-box
;
margin-right
:
5px
;
position
:
relative
;
padding
:
6px
12px
;
font-size
:
14px
;
font-weight
:
600
;
line-height
:
20px
;
white-space
:
nowrap
;
vertical-align
:
middle
;
cursor
:
pointer
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
background-repeat
:
repeat-x
;
background-position
:
-1px
-1px
;
background-size
:
110%
110%
;
border
:
1px
solid
rgba
(
27
,
31
,
35
,
0.2
);
border-radius
:
0.25em
;
}
.monaco-editor
.review-widget
.body
.comment-form
.form-actions
button
:hover
{
background-color
:
#e6ebf1
;
background-image
:
linear-gradient
(
-180deg
,
#f0f3f6
0%
,
#e6ebf1
90%
);
background-position
:
-.5em
;
}
.monaco-editor
.review-widget
.head
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录