aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/diff
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-09-19 00:05:31 +0200
committerGitHub <noreply@github.com>2023-09-18 22:05:31 +0000
commit8099238618f6573f1eb5cfeeb0902b641e7121ab (patch)
tree34b6425a3838f52d56c052f10eb2b2328c680c37 /templates/repo/diff
parente644cc9448a9271bba9789507dcef0984ac02d7f (diff)
downloadgitea-8099238618f6573f1eb5cfeeb0902b641e7121ab.tar.gz
gitea-8099238618f6573f1eb5cfeeb0902b641e7121ab.zip
Change green buttons to primary color (#27099)
I think it's better if the primary actions have primary color instead of green which fits better into the overall single-color UI design. This PR currently replaces every green button with primary: <img width="141" alt="Screenshot 2023-09-16 at 14 07 59" src="https://github.com/go-gitea/gitea/assets/115237/843c1e50-4fb2-4ec6-84ba-0efb9472dcbe"> <img width="161" alt="Screenshot 2023-09-16 at 14 07 51" src="https://github.com/go-gitea/gitea/assets/115237/9442195a-a3b2-4a42-b262-8377d6f5c0d1"> Modal actions now use uncolored/primary instead of previous green/red colors. I also removed the box-shadow on all basic buttons: <img width="259" alt="Screenshot 2023-09-16 at 14 16 39" src="https://github.com/go-gitea/gitea/assets/115237/5beea529-127a-44b0-8d4c-afa7b034a490"> <img width="261" alt="Screenshot 2023-09-16 at 14 17 42" src="https://github.com/go-gitea/gitea/assets/115237/4757f7b2-4d46-49bc-a797-38bb28437b88"> The change currently includes the "Merge PR" button, for which we might want to make an exception to match the icon color there: <img width="442" alt="Screenshot 2023-09-16 at 14 33 53" src="https://github.com/go-gitea/gitea/assets/115237/993ac1a5-c94d-4895-b76c-0d872181a70b">
Diffstat (limited to 'templates/repo/diff')
-rw-r--r--templates/repo/diff/box.tmpl4
-rw-r--r--templates/repo/diff/comment_form.tmpl6
-rw-r--r--templates/repo/diff/compare.tmpl6
-rw-r--r--templates/repo/diff/conversation.tmpl2
-rw-r--r--templates/repo/diff/new_review.tmpl6
5 files changed, 12 insertions, 12 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 0b5bf86371..2e1461226a 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -232,8 +232,8 @@
"DropzoneParentContainer" ".ui.form"
)}}
<div class="text right edit buttons">
- <button class="ui basic primary cancel button" tabindex="3">{{.locale.Tr "repo.issues.cancel"}}</button>
- <button class="ui green save button" tabindex="2">{{.locale.Tr "repo.issues.save"}}</button>
+ <button class="ui cancel button" tabindex="3">{{.locale.Tr "repo.issues.cancel"}}</button>
+ <button class="ui primary save button" tabindex="2">{{.locale.Tr "repo.issues.save"}}</button>
</div>
</div>
</template>
diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl
index 5aad8d9590..dff030a0b4 100644
--- a/templates/repo/diff/comment_form.tmpl
+++ b/templates/repo/diff/comment_form.tmpl
@@ -24,14 +24,14 @@
<span class="markup-info">{{svg "octicon-markup"}} {{$.root.locale.Tr "repo.diff.comment.markdown_info"}}</span>
<div class="gt-text-right">
{{if $.reply}}
- <button class="ui submit green tiny button btn-reply" type="submit">{{$.root.locale.Tr "repo.diff.comment.reply"}}</button>
+ <button class="ui submit primary tiny button btn-reply" type="submit">{{$.root.locale.Tr "repo.diff.comment.reply"}}</button>
<input type="hidden" name="reply" value="{{$.reply}}">
<input type="hidden" name="single_review" value="true">
{{else}}
{{if $.root.CurrentReview}}
- <button name="pending_review" type="submit" class="ui submit green tiny button btn-add-comment">{{$.root.locale.Tr "repo.diff.comment.add_review_comment"}}</button>
+ <button name="pending_review" type="submit" class="ui submit primary tiny button btn-add-comment">{{$.root.locale.Tr "repo.diff.comment.add_review_comment"}}</button>
{{else}}
- <button name="pending_review" type="submit" class="ui submit green tiny button btn-start-review">{{$.root.locale.Tr "repo.diff.comment.start_review"}}</button>
+ <button name="pending_review" type="submit" class="ui submit primary tiny button btn-start-review">{{$.root.locale.Tr "repo.diff.comment.start_review"}}</button>
<button name="single_review" value="true" type="submit" class="ui submit tiny basic button btn-add-single">{{$.root.locale.Tr "repo.diff.comment.add_single_comment"}}</button>
{{end}}
{{end}}
diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl
index e4ae7d4dc8..4d57fd6148 100644
--- a/templates/repo/diff/compare.tmpl
+++ b/templates/repo/diff/compare.tmpl
@@ -180,7 +180,7 @@
{{if and $.IsSigned $.AllowEmptyPr (not .Repository.IsArchived)}}
<div class="ui segment">{{.locale.Tr "repo.pulls.nothing_to_compare_and_allow_empty_pr"}}</div>
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
- <button class="ui button green show-form">{{.locale.Tr "repo.pulls.new"}}</button>
+ <button class="ui button primary show-form">{{.locale.Tr "repo.pulls.new"}}</button>
</div>
<div class="pullrequest-form {{if not .Flash}}gt-hidden{{end}}">
{{template "repo/issue/new_form" .}}
@@ -204,14 +204,14 @@
{{else if .Issue.IsClosed}}
<a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button red show-form">{{svg "octicon-issue-closed" 16}} {{.locale.Tr "repo.pulls.view"}}</a>
{{else}}
- <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button green show-form">{{svg "octicon-git-pull-request" 16}} {{.locale.Tr "repo.pulls.view"}}</a>
+ <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button primary show-form">{{svg "octicon-git-pull-request" 16}} {{.locale.Tr "repo.pulls.view"}}</a>
{{end}}
</div>
</div>
{{else}}
{{if and $.IsSigned (not .Repository.IsArchived)}}
<div class="ui info message show-form-container {{if .Flash}}gt-hidden{{end}}">
- <button class="ui button green show-form">{{.locale.Tr "repo.pulls.new"}}</button>
+ <button class="ui button primary show-form">{{.locale.Tr "repo.pulls.new"}}</button>
</div>
{{else if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl
index 639dd9cd04..c6ada10caf 100644
--- a/templates/repo/diff/conversation.tmpl
+++ b/templates/repo/diff/conversation.tmpl
@@ -56,7 +56,7 @@
</button>
{{end}}
{{if and $.SignedUserID (not $.Repository.IsArchived)}}
- <button class="comment-form-reply ui green tiny labeled icon button gt-ml-2 gt-mr-0">
+ <button class="comment-form-reply ui primary tiny labeled icon button gt-ml-2 gt-mr-0">
{{svg "octicon-reply" 16 "reply icon gt-mr-2"}}{{$.locale.Tr "repo.diff.comment.reply"}}
</button>
{{end}}
diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl
index 6a3fa7a823..908f488975 100644
--- a/templates/repo/diff/new_review.tmpl
+++ b/templates/repo/diff/new_review.tmpl
@@ -1,5 +1,5 @@
<div id="review-box">
- <button class="ui tiny green button gt-pr-2 gt-df js-btn-review {{if not $.IsShowingAllCommits}}disabled{{end}}" {{if not $.IsShowingAllCommits}}data-tooltip-content="{{$.locale.Tr "repo.pulls.review_only_possible_for_full_diff"}}"{{end}}>
+ <button class="ui tiny primary button gt-pr-2 gt-df js-btn-review {{if not $.IsShowingAllCommits}}disabled{{end}}" {{if not $.IsShowingAllCommits}}data-tooltip-content="{{$.locale.Tr "repo.pulls.review_only_possible_for_full_diff"}}"{{end}}>
{{.locale.Tr "repo.diff.review"}}
<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
@@ -33,10 +33,10 @@
{{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}}
{{if $showSelfTooltip}}
<span class="gt-dib" data-tooltip-content="{{$.locale.Tr "repo.diff.review.self_approve"}}">
- <button type="submit" name="type" value="approve" disabled class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
+ <button type="submit" name="type" value="approve" disabled class="ui submit primary tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
</span>
{{else}}
- <button type="submit" name="type" value="approve" class="ui submit green tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
+ <button type="submit" name="type" value="approve" class="ui submit primary tiny button btn-submit">{{$.locale.Tr "repo.diff.review.approve"}}</button>
{{end}}
<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{$.locale.Tr "repo.diff.review.comment"}}</button>
{{if $showSelfTooltip}}