Skip to content

Commit 4ce64a1

Browse files
authored
Fix MergeConflict relicts and fronted Lint (go-gitea#6)
* some fixes clectecd from conflict resolve and so on * Fix Frontend LINT errors
1 parent a87c8ca commit 4ce64a1

File tree

3 files changed

+30
-35
lines changed

3 files changed

+30
-35
lines changed

templates/repo/issue/view_content/comments.tmpl

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
88
18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
99
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
10-
26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST
11-
28 = DELETE_TIME_MANUAL, 29 = PROJECT_CHANGED, 30 = Project_Board_CHANGED -->
10+
26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = PROJECT_CHANGED,
11+
29 = Project_Board_CHANGED -->
1212
{{if eq .Type 0}}
1313
<div class="timeline-item comment" id="{{.HashTag}}">
1414
{{if .OriginalAuthor }}
@@ -510,27 +510,23 @@
510510
{{end}}
511511
</span>
512512
</div>
513-
514-
515-
{{ else if eq .Type 28 }}
513+
{{else if eq .Type 28}}
516514
<div class="event">
517-
<span class="octicon octicon-primitive-dot"></span>
518-
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
519-
<img src="{{.Poster.RelAvatarLink}}">
520-
</a>
521-
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
522-
{{if gt .OldProjectID 0}}
523-
{{if gt .ProjectID 0}}
524-
{{$.i18n.Tr "repo.issues.change_project_at" (.OldProject.Title|Escape) (.Project.Title|Escape) $createdStr | Safe}}
525-
526-
{{else}}
527-
{{$.i18n.Tr "repo.issues.remove_project_at" (.OldProject.Title|Escape) $createdStr | Safe}}
528-
{{end}}
529-
{{else if gt .ProjectID 0}}
530-
{{$.i18n.Tr "repo.issues.add_project_at" (.Project.Title|Escape) $createdStr | Safe}}
531-
{{end}}
532-
</span>
533-
</div>
534-
515+
<span class="octicon octicon-primitive-dot"></span>
516+
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
517+
<img src="{{.Poster.RelAvatarLink}}">
518+
</a>
519+
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
520+
{{if gt .OldProjectID 0}}
521+
{{if gt .ProjectID 0}}
522+
{{$.i18n.Tr "repo.issues.change_project_at" (.OldProject.Title|Escape) (.Project.Title|Escape) $createdStr | Safe}}
523+
{{else}}
524+
{{$.i18n.Tr "repo.issues.remove_project_at" (.OldProject.Title|Escape) $createdStr | Safe}}
525+
{{end}}
526+
{{else if gt .ProjectID 0}}
527+
{{$.i18n.Tr "repo.issues.add_project_at" (.Project.Title|Escape) $createdStr | Safe}}
528+
{{end}}
529+
</span>
530+
</div>
535531
{{end}}
536532
{{end}}

templates/repo/issue/view_content/sidebar.tmpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,10 @@
142142

143143
<div class="ui divider"></div>
144144

145-
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
145+
<div class="ui {{if or (not .IsIssueWriter) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
146146
<span class="text">
147147
<strong>{{.i18n.Tr "repo.issues.new.projects"}}</strong>
148-
{{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
149-
{{svg "octicon-gear" 16}}
150-
{{end}}
148+
<span class="octicon octicon-gear"></span>
151149
</span>
152150
<div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects">
153151
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_projects"}}</div>

web_src/js/features/projects.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default async function initProject(csrf) {
33
return;
44
}
55

6-
const { Sortable } = await import(
6+
const {Sortable} = await import(
77
/* webpackChunkName: "sortable" */ 'sortablejs'
88
);
99

@@ -17,7 +17,7 @@ export default async function initProject(csrf) {
1717
{
1818
group: 'shared',
1919
animation: 150,
20-
onAdd: e => {
20+
onAdd: (e) => {
2121
$.ajax(`${e.to.dataset.url}/${e.item.dataset.issue}`, {
2222
headers: {
2323
'X-Csrf-Token': csrf,
@@ -34,7 +34,7 @@ export default async function initProject(csrf) {
3434
);
3535
}
3636

37-
$('.edit-project-board').each(function() {
37+
$('.edit-project-board').each(function () {
3838
// const modal = $(this);
3939

4040
const projectTitle = $(this).find(
@@ -43,26 +43,27 @@ export default async function initProject(csrf) {
4343

4444
$(this)
4545
.find('.content > .form > .actions > .red')
46-
.click(function(e) {
46+
.click(function (e) {
4747
e.preventDefault();
4848
$.ajax({
4949
url: $(this).data('url'),
50-
data: JSON.stringify({ title: projectTitle.val() }),
50+
data: JSON.stringify({title: projectTitle.val()}),
5151
headers: {
5252
'X-Csrf-Token': csrf,
5353
'X-Remote': true,
5454
},
5555
contentType: 'application/json',
5656
method: 'PUT',
57-
}).done(res => {
57+
// eslint-disable-next-line no-unused-vars
58+
}).done((res) => {
5859
// modal.modal('hide');
5960
setTimeout(window.location.reload(true), 2000);
6061
});
6162
});
6263
});
6364

64-
$('.delete-project-board').each(function() {
65-
$(this).click(function(e) {
65+
$('.delete-project-board').each(function () {
66+
$(this).click(function (e) {
6667
e.preventDefault();
6768

6869
$.ajax({

0 commit comments

Comments
 (0)