1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

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 <art27@cantab.net>
This commit is contained in:
Cirno the Strongest 2020-12-15 07:09:24 +01:00 committed by GitHub
parent c3fc190372
commit 27d0a5554f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -363,8 +363,8 @@
{{end}} {{end}}
</div> </div>
</div> </div>
<div class="dib ml-3">{{$.i18n.Tr "repo.pulls.merge_instruction_hint" | Safe}}</div> <div class="instruct-toggle ml-3">{{$.i18n.Tr "repo.pulls.merge_instruction_hint" | Safe}}</div>
<div class="instruct" style="display:none"> <div class="instruct-content" style="display:none">
<div class="ui divider"></div> <div class="ui divider"></div>
<div><h3 class="di">{{$.i18n.Tr "step1"}} </h3>{{$.i18n.Tr "repo.pulls.merge_instruction_step1_desc"}}</div> <div><h3 class="di">{{$.i18n.Tr "step1"}} </h3>{{$.i18n.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
<div class="ui secondary segment"> <div class="ui secondary segment">

View File

@ -1120,6 +1120,8 @@ async function initRepository() {
e.preventDefault(); e.preventDefault();
$(`.${$(this).data('do')}-fields`).show(); $(`.${$(this).data('do')}-fields`).show();
$(this).parent().hide(); $(this).parent().hide();
$('.instruct-toggle').hide();
$('.instruct-content').hide();
}); });
$('.merge-button > .dropdown').dropdown({ $('.merge-button > .dropdown').dropdown({
onChange(_text, _value, $choice) { onChange(_text, _value, $choice) {
@ -1133,6 +1135,7 @@ async function initRepository() {
e.preventDefault(); e.preventDefault();
$(this).closest('.form').hide(); $(this).closest('.form').hide();
$mergeButton.parent().show(); $mergeButton.parent().show();
$('.instruct-toggle').show();
}); });
initReactionSelector(); initReactionSelector();
} }
@ -1199,7 +1202,7 @@ async function initRepository() {
function initPullRequestMergeInstruction() { function initPullRequestMergeInstruction() {
$('.show-instruction').on('click', () => { $('.show-instruction').on('click', () => {
$('.instruct').toggle(); $('.instruct-content').toggle();
}); });
} }

View File

@ -593,6 +593,10 @@
} }
&.view.issue { &.view.issue {
.instruct-toggle {
display: inline-block;
}
.title { .title {
padding-bottom: 0 !important; padding-bottom: 0 !important;