사용자 정의 익명 모드 버튼 추가

이것은 플러그인 아웃렛을 사용하고 일부 핸들바를 추가하여 수행할 수 있습니다(이 개념들은 Developing Discourse Themes & Theme Components 에서 다뤄집니다)

테마(관리자 > 사용자 정의 > 테마 > CSS/HTML 편집)에서 </head> 파일에 다음 내용을 추가할 수 있습니다.

<script type="text/x-handlebars"  data-template-name="/connectors/above-main-container/anon-button">
{{#if this.currentUser}}
  {{#if this.currentUser.is_anonymous}}
    {{d-button class="btn-primary" action=(route-action 'toggleAnonymous') icon="ban" label="switch_from_anon"}}
  {{else}}
    {{d-button class="btn-primary" action=(route-action 'toggleAnonymous') icon="user-secret" label="switch_to_anon"}}
  {{/if}}
{{/if}}
</script>