Skip to content

Commit 27d0a55

Browse files
CirnoTzeripath
andauthored
Hide command line instructions when merge form is visible (#13956)
* Hide commandline instructions when merge form is visible * As per @silverwind Co-authored-by: zeripath <[email protected]>
1 parent c3fc190 commit 27d0a55

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-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-toggle 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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,8 @@ async function initRepository() {
11201120
e.preventDefault();
11211121
$(`.${$(this).data('do')}-fields`).show();
11221122
$(this).parent().hide();
1123+
$('.instruct-toggle').hide();
1124+
$('.instruct-content').hide();
11231125
});
11241126
$('.merge-button > .dropdown').dropdown({
11251127
onChange(_text, _value, $choice) {
@@ -1133,6 +1135,7 @@ async function initRepository() {
11331135
e.preventDefault();
11341136
$(this).closest('.form').hide();
11351137
$mergeButton.parent().show();
1138+
$('.instruct-toggle').show();
11361139
});
11371140
initReactionSelector();
11381141
}
@@ -1199,7 +1202,7 @@ async function initRepository() {
11991202

12001203
function initPullRequestMergeInstruction() {
12011204
$('.show-instruction').on('click', () => {
1202-
$('.instruct').toggle();
1205+
$('.instruct-content').toggle();
12031206
});
12041207
}
12051208

web_src/less/_repository.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,10 @@
593593
}
594594

595595
&.view.issue {
596+
.instruct-toggle {
597+
display: inline-block;
598+
}
599+
596600
.title {
597601
padding-bottom: 0 !important;
598602

0 commit comments

Comments
 (0)