templates: Clean up recipient_row.hbs.

This commit is contained in:
Steve Howell 2021-11-24 13:04:52 +00:00
parent d09997f32e
commit 981a8d0189
2 changed files with 15 additions and 23 deletions

View File

@ -4,17 +4,18 @@
<div class="message-header-contents"> <div class="message-header-contents">
{{! stream link }} {{! stream link }}
<a class="message_label_clickable narrows_by_recipient stream_label {{color_class}}" <a class="message_label_clickable narrows_by_recipient stream_label {{color_class}}"
style="background: {{background_color}}; border-left-color: {{background_color}};" style="background: {{background_color}}; border-left-color: {{background_color}};"
href="{{stream_url}}" href="{{stream_url}}"
title="{{#tr}}Narrow to stream &quot;{display_recipient}&quot;{{/tr}}"> title="{{#tr}}Narrow to stream &quot;{display_recipient}&quot;{{/tr}}">
{{! invite only lock }} {{! invite only lock }}
{{#if invite_only}} {{#if invite_only}}
<i class="fa fa-lock recipient-row-stream-icon" title="{{t 'This is a private stream' }}" aria-label="{{t 'This is a private stream' }}"></i> <i class="fa fa-lock recipient-row-stream-icon" title="{{t 'This is a private stream' }}" aria-label="{{t 'This is a private stream' }}"></i>
{{/if}} {{/if}}
{{#if is_web_public}} {{#if is_web_public}}
<i class="fa fa-globe recipient-row-stream-icon" title="{{t 'This is a web public stream' }}" aria-label="{{t 'This is a web public stream' }}"></i> <i class="fa fa-globe recipient-row-stream-icon" title="{{t 'This is a web public stream' }}" aria-label="{{t 'This is a web public stream' }}"></i>
{{/if}} {{/if}}
{{display_recipient}}</a> {{display_recipient}}
</a>
{{! hidden narrow icon for copy-pasting }} {{! hidden narrow icon for copy-pasting }}
<span class="copy-paste-text">&gt;</span> <span class="copy-paste-text">&gt;</span>
@ -23,16 +24,16 @@
<span class="stream_topic"> <span class="stream_topic">
{{! topic link }} {{! topic link }}
<a class="message_label_clickable narrows_by_topic" <a class="message_label_clickable narrows_by_topic"
href="{{topic_url}}" href="{{topic_url}}"
title="{{#tr}}Narrow to stream &quot;{display_recipient}&quot;, topic &quot;{topic}&quot;{{/tr}}"> title="{{#tr}}Narrow to stream &quot;{display_recipient}&quot;, topic &quot;{topic}&quot;{{/tr}}">
{{#if use_match_properties}} {{#if use_match_properties}}
{{{match_topic}}} {{{match_topic}}}
{{else}} {{else}}
{{topic}} {{topic}}
{{/if}} {{/if}}
</a> </a>
<!-- The missing whitespace on the next line is a hack; ideally, would be user-select: none. --> </span>
</span><span class="recipient_bar_controls no-select"> <span class="recipient_bar_controls no-select">
<span class="topic_edit hidden-for-spectators"> <span class="topic_edit hidden-for-spectators">
<span class="topic_edit_form" id="{{id}}"></span> <span class="topic_edit_form" id="{{id}}"></span>
</span> </span>
@ -76,8 +77,8 @@
<div class="message-header-wrapper"> <div class="message-header-wrapper">
<div class="message-header-contents"> <div class="message-header-contents">
<a class="message_label_clickable narrows_by_recipient stream_label" <a class="message_label_clickable narrows_by_recipient stream_label"
href="{{pm_with_url}}" href="{{pm_with_url}}"
title="{{#tr}}Narrow to your private messages with {display_reply_to}{{/tr}}"> title="{{#tr}}Narrow to your private messages with {display_reply_to}{{/tr}}">
{{#tr}}You and {display_reply_to}{{/tr}} {{#tr}}You and {display_reply_to}{{/tr}}
</a> </a>

View File

@ -145,19 +145,10 @@ def check_handlebar_templates(templates: Iterable[str], fix: bool) -> None:
# Check all our handlebars templates. # Check all our handlebars templates.
templates = [fn for fn in templates if fn.endswith(".hbs")] templates = [fn for fn in templates if fn.endswith(".hbs")]
IGNORE_FILES = [
# TODO: Add some exclude mechanism for the line-wrapping issue here.
"static/templates/recipient_row.hbs",
]
for fn in templates: for fn in templates:
if fn in IGNORE_FILES:
continue
validate(fn=fn, check_indent=True) validate(fn=fn, check_indent=True)
for fn in templates: for fn in templates:
if fn in IGNORE_FILES:
continue
if not validate_indent_html(fn, fix): if not validate_indent_html(fn, fix):
sys.exit(1) sys.exit(1)