직원 공지 아이콘을 변경할 수 있을까요?

Is it possible to change the icon used on Staff Notices, either through css or a setting that I just haven’t found? Preferably we’d like to swap it out for a custom picture rather than a FA icon.

We do not have a setting for that and I think doing it in CSS only is difficult, but you can create a theme component to replace it.

In CSS, you will hide the old icon:

.post-notice {
  .d-icon-user-shield {
    display: none;
  }
}

In JavaScript (you put this in <head> of the theme component), you will decorate the notice and add the new icon:

<script type="text/discourse-plugin" version="0.8">
  const { iconNode } = require("discourse-common/lib/icon-library");
  api.decorateWidget('post-notice:before', helper => {
    return iconNode('heart');
  });
</script>

… or if you want to replace with an image…:

<script type="text/discourse-plugin" version="0.8">
  api.decorateWidget('post-notice:before', helper => {
    return helper.h('img', {
      src: 'https://www.discourse.org/a/img/home-spot-1.png',
      style: 'margin-right: 0.65em',
      height: 30,
      width: 30
    });
  });
</script>

With themes and theme components, the sky is the limit. If you want to learn more, we have a resource for that:

방금 이걸 시도해 봤는데, 첫 번째 JS 코드 스니펫을 조금 수정해야 했습니다.

이제 이 코드는 테마 컴포넌트(또는 테마)의 JS 탭에 들어가야 합니다:

import { apiInitializer } from "discourse/lib/api";
import { iconNode } from "discourse-common/lib/icon-library";

export default apiInitializer("0.11.1", (api) => {
  api.decorateWidget("post-notice:before", () => {
    return iconNode("heart");
  });
});

이미지를 사용하는 방법은 확인하지 못해서 죄송합니다.

테마에 추가한 후, Upcoming post stream changes - How to prepare themes and plugins 링크에 언급된 내용 때문에 경고가 표시되었습니다. 그래서 곧 또 다른 업데이트가 필요할까 봐 걱정됩니다.

이는 스태프 노트에만 영향을 미치는지, 아니면 신규 및 복귀 사용자 노트에도 영향을 미치는지 궁금해서 시도해 보았습니다. 모든 게시물 알림에 영향을 주며, 위의 CSS는 방패 아이콘만 숨기게 됩니다. 따라서 신규 및 복귀 사용자 알림에는 두 개의 아이콘이 표시됩니다.

그럼 좀 불만족스럽네요!!

급하게 글을 올리다 보니 api.decorateWidget를 제거하지 않은 걸 놓쳤네요. 제 사이트에서 오류를 인식하지 못한 채 무시한 것 같습니다.

CSS를 더 정확하게 지정할 수 있을 것 같긴 하지만, Quote Callouts 를 방금 발견했는데, 제 용도에는 이쪽이 더 적합할 것 같습니다.