loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use redesigned switch on commit graph page (#6545)

[skip ci] no related tests (covered by visual testing only)

Followup to https://codeberg.org/forgejo/forgejo/pulls/5214 and https://codeberg.org/forgejo/forgejo/pulls/6459.

Resolves https://codeberg.org/forgejo/forgejo/issues/2852.

## Preview

|Before|After|
|-|-|
|![](/attachments/c871bcdd-f60c-460f-93d8-33550b409d25)|![](/attachments/e97e63d8-2917-408d-87ce-37ee31dedc93)|

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6545
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>

authored by

0ko
0ko
and committed by
Otto
4e6f8dd5 03fe21d0

+17 -3
+9 -3
templates/repo/graph.tmpl
··· 46 46 </div> 47 47 </div> 48 48 </div> 49 - <div class="ui icon buttons small"> 50 - <button id="flow-color-monochrome" class="ui icon button{{if eq .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}">{{svg "material-invert-colors" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}</button> 51 - <button id="flow-color-colored" class="ui icon button{{if ne .Mode "monochrome"}} active{{end}}" title="{{ctx.Locale.Tr "repo.commit_graph.color"}}">{{svg "material-palette" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.commit_graph.color"}}</button> 49 + <div class="switch"> 50 + <button id="flow-color-monochrome" class="{{if eq .Mode "monochrome"}}active {{end}}item" title="{{ctx.Locale.Tr "repo.commit_graph.monochrome"}}"> 51 + {{svg "material-invert-colors" 16 "tw-mr-1"}} 52 + {{ctx.Locale.Tr "repo.commit_graph.monochrome"}} 53 + </button> 54 + <button id="flow-color-colored" class="{{if ne .Mode "monochrome"}}active {{end}}item" title="{{ctx.Locale.Tr "repo.commit_graph.color"}}"> 55 + {{svg "material-palette" 16 "tw-mr-1"}} 56 + {{ctx.Locale.Tr "repo.commit_graph.color"}} 57 + </button> 52 58 </div> 53 59 </div> 54 60 <div id="git-graph-content">
+8
web_src/css/modules/switch.css
··· 22 22 background: var(--color-active); 23 23 outline: 1px solid var(--color-input-border); 24 24 } 25 + 26 + .switch .item svg { 27 + vertical-align: sub; 28 + } 29 + 30 + .switch button.item { 31 + background: transparent; 32 + }