通知アイコンを変更できません

Hi, everybody
I want to change these icons

I did it like this

And I wrote it in the Header
image

But the icon has not changed
It works with other icons
Please help me solve this problem

「いいね!」 2

Hi Mikhail,

Please try this one :slightly_smiling_face:

<script type="text/discourse-plugin" version="0.8">
  api.replaceIcon('notification.granted_badge', 'oo-medal-badges');
</script>

You can find these replacements here :arrow_down:

「いいね!」 4

Yes, it worked. Thank you very much
image

「いいね!」 1

And where can I see what they look like?

You can easily identify it by using inspect elements.

For example.: the certificate icon notification

  1. Find the icon name with inspect elements


  1. Find the same icon in the icon-library js

Then you can replace the icon with any other icon you want. :slightly_smiling_face:

「いいね!」 1

Thanks for your reply
I figured it out. I thought there was some sort of list with standard Discourse icons

「いいね!」 1

これは将来の参照のために追加してもよろしいでしょうか。Replace Discourse's default SVG icons with custom icons in a theme - #19 の指示に従いましたが、当初気づかなかったのは、同じアイコンが異なる方法で参照される可能性があるということです。アプリ自体では、「/styleguide/atoms/icons」の下にすべてのアイコンとその参照方法のリストがあり、そのため、header.html ファイルには、封筒アイコンへの参照が 5 つあります。

    api.replaceIcon('envelope', 'fgx-air-mail');
    api.replaceIcon('far-envelope', 'fgx-air-mail');
    api.replaceIcon('notification.private_message', 'fgx-air-mail');
    api.replaceIcon('notification.read_private_message', 'fgx-air-mail');
    api.replaceIcon('notification.invited_to_private_message', 'fgx-air-mail');
「いいね!」 2