8a4aa4efdd
This removes the need for `switch (obj)` in the template which is not allowed in strict mode. Additionally using a named variable speeds up rendering.
31 lines
1.6 KiB
HTML
31 lines
1.6 KiB
HTML
{[ if (o.allow_otr) { ]}
|
|
<li class="toggle-toolbar-menu toggle-otr {{{o.otr_status_class}}}" title="{{{o.otr_tooltip}}}">
|
|
<span class="chat-toolbar-text">{{{o.otr_translated_status}}}</span>
|
|
{[ if (o.otr_status == o.UNENCRYPTED) { ]}
|
|
<span class="icon-unlocked"></span>
|
|
{[ } ]}
|
|
{[ if (o.otr_status == o.UNVERIFIED) { ]}
|
|
<span class="icon-lock"></span>
|
|
{[ } ]}
|
|
{[ if (o.otr_status == o.VERIFIED) { ]}
|
|
<span class="icon-lock"></span>
|
|
{[ } ]} {[ if (o.otr_status == o.FINISHED) { ]}
|
|
<span class="icon-unlocked"></span>
|
|
{[ } ]}
|
|
<ul class="toolbar-menu collapsed">
|
|
{[ if (o.otr_status == o.UNENCRYPTED) { ]}
|
|
<li><a class="start-otr" href="#">{{{o.label_start_encrypted_conversation}}}</a></li>
|
|
{[ } ]}
|
|
{[ if (o.otr_status != o.UNENCRYPTED) { ]}
|
|
<li><a class="start-otr" href="#">{{{o.label_refresh_encrypted_conversation}}}</a></li>
|
|
<li><a class="end-otr" href="#">{{{o.label_end_encrypted_conversation}}}</a></li>
|
|
<li><a class="auth-otr" data-scheme="smp" href="#">{{{o.label_verify_with_smp}}}</a></li>
|
|
{[ } ]}
|
|
{[ if (o.otr_status == o.UNVERIFIED) { ]}
|
|
<li><a class="auth-otr" data-scheme="fingerprint" href="#">{{{o.label_verify_with_fingerprints}}}</a></li>
|
|
{[ } ]}
|
|
<li><a href="http://www.cypherpunks.ca/otr/help/3.2.0/levels.php" target="_blank" rel="noopener">{{{o.label_whats_this}}}</a></li>
|
|
</ul>
|
|
</li>
|
|
{[ } ]}
|