Skip to content

Commit 1e6a46b

Browse files
committed
Hide commandline instructions when merge form is visible
1 parent 3285bab commit 1e6a46b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

templates/repo/issue/view_content/pull.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@
363363
{{end}}
364364
</div>
365365
</div>
366-
<div class="dib ml-3">{{$.i18n.Tr "repo.pulls.merge_instruction_hint" | Safe}}</div>
367-
<div class="instruct" style="display:none">
366+
<div class="instruct dib ml-3">{{$.i18n.Tr "repo.pulls.merge_instruction_hint" | Safe}}</div>
367+
<div class="instruct content" style="display:none">
368368
<div class="ui divider"></div>
369369
<div><h3 class="di">{{$.i18n.Tr "step1"}} </h3>{{$.i18n.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
370370
<div class="ui secondary segment">

web_src/js/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,7 @@ async function initRepository() {
11231123
e.preventDefault();
11241124
$(`.${$(this).data('do')}-fields`).show();
11251125
$(this).parent().hide();
1126+
$('.instruct').hide();
11261127
});
11271128
$('.merge-button > .dropdown').dropdown({
11281129
onChange(_text, _value, $choice) {
@@ -1136,6 +1137,7 @@ async function initRepository() {
11361137
e.preventDefault();
11371138
$(this).closest('.form').hide();
11381139
$mergeButton.parent().show();
1140+
$('.instruct.dib').show();
11391141
});
11401142
initReactionSelector();
11411143
}
@@ -1202,7 +1204,7 @@ async function initRepository() {
12021204

12031205
function initPullRequestMergeInstruction() {
12041206
$('.show-instruction').on('click', () => {
1205-
$('.instruct').toggle();
1207+
$('.instruct.content').toggle();
12061208
});
12071209
}
12081210

0 commit comments

Comments
 (0)