快速设为私有笔记按钮

林一二2023年03月05日 00:41

Code
\whitespace trim

<$list filter="[<currentTiddler>!in-tagtree-of:inclusive[APrivateContent]]" variable="ignore">
  <$button tooltip="设为私有笔记" aria-label="设为私有笔记" class=<<tv-config-toolbar-class>> >
    <$action-listops $tags="APrivateContent" />
    <$list filter="[<tv-config-toolbar-icons>match[yes]]">
      {{$:/core/images/preview-closed}}
    </$list>
    <$list filter="[<tv-config-toolbar-text>match[yes]]">
      <span class="tc-btn-text">
        <$text text="设为私有笔记"/>
      </span>
    </$list>
  </$button>
</$list>
<$list filter="[<currentTiddler>in-tagtree-of:inclusive[APrivateContent]]" variable="ignore">
  <$button tooltip="设为公开笔记" aria-label="设为公开笔记" class=<<tv-config-toolbar-class>> >
    <$action-listops $tags="+[!match[APrivateContent]]" />
    <$list filter="[<tv-config-toolbar-icons>match[yes]]">
      {{$:/core/images/preview-open}}
    </$list>
    <$list filter="[<tv-config-toolbar-text>match[yes]]">
      <span class="tc-btn-text">
        <$text text="设为公开笔记"/>
      </span>
    </$list>
  </$button>
</$list>