Skip to content

Commit 8099238

Browse files
authored
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">
1 parent e644cc9 commit 8099238

File tree

108 files changed

+183
-176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+183
-176
lines changed

templates/admin/auth/edit.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@
428428
</div>
429429

430430
<div class="field">
431-
<button class="ui green button">{{.locale.Tr "admin.auths.update"}}</button>
431+
<button class="ui primary button">{{.locale.Tr "admin.auths.update"}}</button>
432432
<button class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.locale.Tr "admin.auths.delete"}}</button>
433433
</div>
434434
</form>

templates/admin/auth/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</div>
7474

7575
<div class="field">
76-
<button class="ui green button">{{.locale.Tr "admin.auths.new"}}</button>
76+
<button class="ui primary button">{{.locale.Tr "admin.auths.new"}}</button>
7777
</div>
7878
</form>
7979
</div>

templates/admin/config.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
<div class="ui tiny input">
239239
<input type="email" name="email" placeholder="{{.locale.Tr "admin.config.test_email_placeholder"}}" size="29" required>
240240
</div>
241-
<button class="ui tiny green button">{{.locale.Tr "admin.config.send_test_mail_submit"}}</button>
241+
<button class="ui tiny primary button">{{.locale.Tr "admin.config.send_test_mail_submit"}}</button>
242242
</form>
243243
</dd>
244244
{{end}}

templates/admin/cron.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<tbody>
2121
{{range .Entries}}
2222
<tr>
23-
<td><button type="submit" class="ui green button" name="op" value="{{.Name}}" title="{{$.locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td>
23+
<td><button type="submit" class="ui primary button" name="op" value="{{.Name}}" title="{{$.locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td>
2424
<td>{{$.locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
2525
<td>{{.Spec}}</td>
2626
<td>{{DateTime "full" .Next}}</td>

templates/admin/dashboard.tmpl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,55 +15,55 @@
1515
<tbody>
1616
<tr>
1717
<td>{{.locale.Tr "admin.dashboard.delete_inactive_accounts"}}</td>
18-
<td class="text right"><button type="submit" class="ui green button" name="op" value="delete_inactive_accounts">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
18+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_inactive_accounts">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
1919
</tr>
2020
<tr>
2121
<td>{{.locale.Tr "admin.dashboard.delete_repo_archives"}}</td>
22-
<td class="text right"><button type="submit" class="ui green button" name="op" value="delete_repo_archives">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
22+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_repo_archives">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
2323
</tr>
2424
<tr>
2525
<td>{{.locale.Tr "admin.dashboard.delete_missing_repos"}}</td>
26-
<td class="text right"><button type="submit" class="ui green button" name="op" value="delete_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
26+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
2727
</tr>
2828
<tr>
2929
<td>{{.locale.Tr "admin.dashboard.git_gc_repos"}}</td>
30-
<td class="text right"><button type="submit" class="ui green button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
30+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
3131
</tr>
3232
{{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
3333
<tr>
3434
<td>{{.locale.Tr "admin.dashboard.resync_all_sshkeys"}}<br>
3535
{{.locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
36-
<td class="text right"><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
36+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
3737
</tr>
3838
<tr>
3939
<td>{{.locale.Tr "admin.dashboard.resync_all_sshprincipals"}}<br>
4040
{{.locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
41-
<td class="text right"><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
41+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
4242
</tr>
4343
{{end}}
4444
<tr>
4545
<td>{{.locale.Tr "admin.dashboard.resync_all_hooks"}}</td>
46-
<td class="text right"><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
46+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
4747
</tr>
4848
<tr>
4949
<td>{{.locale.Tr "admin.dashboard.reinit_missing_repos"}}</td>
50-
<td class="text right"><button type="submit" class="ui green button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
50+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
5151
</tr>
5252
<tr>
5353
<td>{{.locale.Tr "admin.dashboard.sync_external_users"}}</td>
54-
<td class="text right"><button type="submit" class="ui green button" name="op" value="sync_external_users">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
54+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_external_users">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
5555
</tr>
5656
<tr>
5757
<td>{{.locale.Tr "admin.dashboard.repo_health_check"}}</td>
58-
<td class="text right"><button type="submit" class="ui green button" name="op" value="repo_health_check">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
58+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="repo_health_check">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
5959
</tr>
6060
<tr>
6161
<td>{{.locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}</td>
62-
<td class="text right"><button type="submit" class="ui green button" name="op" value="delete_generated_repository_avatars">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
62+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_generated_repository_avatars">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
6363
</tr>
6464
<tr>
6565
<td>{{.locale.Tr "admin.dashboard.sync_repo_branches"}}</td>
66-
<td class="text right"><button type="submit" class="ui green button" name="op" value="sync_repo_branches">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
66+
<td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_repo_branches">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
6767
</tr>
6868
</tbody>
6969
</table>

templates/admin/repo/unadopted.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<div class="item gt-df gt-ac">
2424
<span class="gt-f1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span>
2525
<div>
26-
<button class="ui button green show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{$.locale.Tr "repo.adopt_preexisting_label"}}</button>
26+
<button class="ui button primary show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{$.locale.Tr "repo.adopt_preexisting_label"}}</button>
2727
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
2828
<div class="header">
2929
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>

templates/admin/user/edit.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<div class="divider"></div>
148148

149149
<div class="field">
150-
<button class="ui green button">{{.locale.Tr "admin.users.update_profile"}}</button>
150+
<button class="ui primary button">{{.locale.Tr "admin.users.update_profile"}}</button>
151151
<button class="ui red button show-modal" data-modal="#delete-user-modal">{{.locale.Tr "admin.users.delete_account"}}</button>
152152
</div>
153153
</form>
@@ -185,7 +185,7 @@
185185
</div>
186186

187187
<div class="field">
188-
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
188+
<button class="ui primary button">{{$.locale.Tr "settings.update_avatar"}}</button>
189189
<button class="ui red button link-action" data-url="./avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
190190
</div>
191191
</form>

templates/admin/user/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
{{end}}
8383

8484
<div class="field">
85-
<button class="ui green button">{{.locale.Tr "admin.users.new_account"}}</button>
85+
<button class="ui primary button">{{.locale.Tr "admin.users.new_account"}}</button>
8686
</div>
8787
</form>
8888
</div>

templates/base/modal_actions_confirm.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Template Attributes:
44

55
Two buttons (negative, positive):
66
* ModalButtonTypes: "yes" (default) or "confirm"
7-
* ModalButtonColors: "green" (default) / "blue" / "yellow"
7+
* ModalButtonColors: "primary" (default) / "blue" / "yellow"
88
* ModalButtonCancelText
99
* ModalButtonOkText
1010

@@ -26,13 +26,13 @@ The ".ok.button" and ".cancel.button" selectors are also used by Fomantic Modal
2626
{{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}}
2727
{{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}}
2828

29-
{{$stylePositive := "green"}}
29+
{{$stylePositive := "primary"}}
3030
{{if eq .ModalButtonColors "blue"}}
3131
{{$stylePositive = "blue"}}
3232
{{else if eq .ModalButtonColors "yellow"}}
3333
{{$stylePositive = "yellow"}}
3434
{{end}}
35-
<button class="ui basic cancel button">{{svg "octicon-x"}} {{$textNegitive}}</button>
35+
<button class="ui cancel button">{{svg "octicon-x"}} {{$textNegitive}}</button>
3636
<button class="ui {{$stylePositive}} ok button">{{svg "octicon-check"}} {{$textPositive}}</button>
3737
{{end}}
3838
</div>

templates/devtest/flex-list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
<button class="ui tiny red button">
2828
{{svg "octicon-warning" 14}} CJK文本测试
2929
</button>
30-
<button class="ui tiny green button">
30+
<button class="ui tiny primary button">
3131
{{svg "octicon-info" 14}} Button
3232
</button>
33-
<button class="ui tiny green button">
33+
<button class="ui tiny primary button">
3434
Button with long text
3535
</button>
3636
</div>

0 commit comments

Comments
 (0)