Skip to content

Commit 2e5ac53

Browse files
authored
Embed Matrix icon as SVG (#21890)
Embed the SVG icon directly, making further invertion unnecessary because the icon color can now follow text color. <img width="240" alt="Screenshot 2022-11-21 at 20 16 32" src="https://user-images.githubusercontent.com/115237/203142189-89f20de9-c0bd-4d05-92c0-44dadf20d78f.png"> <img width="245" alt="Screenshot 2022-11-21 at 20 16 46" src="https://user-images.githubusercontent.com/115237/203142191-658239ba-1859-49c6-91ad-10ddf14780d0.png">
1 parent 2836382 commit 2e5ac53

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

public/img/svg/gitea-matrix.svg

Lines changed: 1 addition & 0 deletions
Loading

templates/admin/hook_new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{{else if eq .HookType "feishu"}}
3232
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/feishu.png">
3333
{{else if eq .HookType "matrix"}}
34-
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/matrix.svg">
34+
{{svg "gitea-matrix" 26}}
3535
{{else if eq .HookType "wechatwork"}}
3636
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/wechatwork.png">
3737
{{else if eq .HookType "packagist"}}

templates/org/settings/hook_new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{{else if eq .HookType "feishu"}}
2727
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/feishu.png">
2828
{{else if eq .HookType "matrix"}}
29-
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/matrix.svg">
29+
{{svg "gitea-matrix" 26}}
3030
{{else if eq .HookType "wechatwork"}}
3131
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/wechatwork.png">
3232
{{else if eq .HookType "packagist"}}

templates/repo/settings/webhook/base_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<img width="20" height="20" src="{{AssetUrlPrefix}}/img/feishu.png">{{.locale.Tr "repo.settings.web_hook_name_feishu_or_larksuite"}}
3030
</a>
3131
<a class="item" href="{{.BaseLinkNew}}/matrix/new">
32-
<img width="20" height="20" src="{{AssetUrlPrefix}}/img/matrix.svg">{{.locale.Tr "repo.settings.web_hook_name_matrix"}}
32+
{{svg "gitea-matrix" 20 "img"}}{{.locale.Tr "repo.settings.web_hook_name_matrix"}}
3333
</a>
3434
<a class="item" href="{{.BaseLinkNew}}/wechatwork/new">
3535
<img width="20" height="20" src="{{AssetUrlPrefix}}/img/wechatwork.png">{{.locale.Tr "repo.settings.web_hook_name_wechatwork"}}

templates/repo/settings/webhook/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{{else if eq .HookType "feishu"}}
2525
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/feishu.png">
2626
{{else if eq .HookType "matrix"}}
27-
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/matrix.svg">
27+
{{svg "gitea-matrix" 26}}
2828
{{else if eq .HookType "wechatwork"}}
2929
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/wechatwork.png">
3030
{{else if eq .HookType "packagist"}}

web_src/less/_base.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,9 @@ a.commit-statuses-trigger {
784784
margin-top: -.25rem;
785785
margin-bottom: -.25rem;
786786
}
787+
.ui.dropdown .menu > .item > svg.img {
788+
margin-right: .78571429rem;
789+
}
787790

788791
.ui.selection.dropdown .menu > .item {
789792
border-color: var(--color-secondary);

web_src/less/themes/theme-arc-green.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,3 @@
182182
.emoji[aria-label="musical notes"] {
183183
filter: invert(100%) hue-rotate(180deg);
184184
}
185-
186-
img[src$="/img/matrix.svg"] {
187-
filter: invert(80%);
188-
}

public/img/matrix.svg renamed to web_src/svg/gitea-matrix.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)