Merge pull request #1252 from thelounge/bews/username-template
Move nickname rendering to a single template
This commit is contained in:
commit
aee518365d
@ -1,2 +1,2 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
<span class="action-text">{{{parse text}}}</span>
|
||||
|
@ -1,2 +1,2 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
<b>{{ctcpType}}</b> {{{parse ctcpMessage}}}
|
||||
|
@ -1,9 +1,9 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
invited
|
||||
{{#if invitedYou}}
|
||||
you
|
||||
{{else}}
|
||||
<span role="button" class="user {{colorClass invited}}" data-name="{{invited}}">{{invited}}</span>
|
||||
{{> ../user_name nick=invited}}
|
||||
{{/if}}
|
||||
to
|
||||
{{{parse channel}}}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
<i class="hostmask">({{hostmask}})</i>
|
||||
has joined the channel
|
||||
|
@ -1,6 +1,6 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
has kicked
|
||||
<span role="button" class="user {{colorClass target}}" data-name="{{target}}">{{target}}</span>
|
||||
{{> ../user_name nick=target}}
|
||||
{{#if text}}
|
||||
<i class="part-reason">({{{parse text}}})</i>
|
||||
{{/if}}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
sets mode
|
||||
{{{parse text}}}
|
||||
|
@ -1,3 +1,3 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
is now known as
|
||||
<span role="button" class="user {{colorClass new_nick}}" data-name="{{new_nick}}">{{mode}}{{new_nick}}</span>
|
||||
{{> ../user_name nick=new_nick}}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
<i class="hostmask">({{hostmask}})</i>
|
||||
has left the channel
|
||||
{{#if text}}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
<i class="hostmask">({{hostmask}})</i>
|
||||
has quit
|
||||
{{#if text}}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{#if from}}
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> ../user_name nick=from}}
|
||||
has changed the topic to:
|
||||
{{else}}
|
||||
The topic is:
|
||||
|
@ -1,3 +1,3 @@
|
||||
Topic set by
|
||||
<span role="button" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</span>
|
||||
{{> ../user_name}}
|
||||
on {{localetime when}}
|
||||
|
@ -1,41 +1,41 @@
|
||||
<div>
|
||||
<span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
|
||||
{{> ../user_name nick=whois.nick}}
|
||||
<i class="hostmask">({{whois.user}}@{{whois.host}})</i>:
|
||||
<b>{{whois.real_name}}</b>
|
||||
</div>
|
||||
{{#if whois.account}}
|
||||
<div>
|
||||
<span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
|
||||
{{> ../user_name nick=whois.nick}}
|
||||
is logged in as <b>{{whois.account}}</b>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if whois.channels}}
|
||||
<div>
|
||||
<span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
|
||||
{{> ../user_name nick=whois.nick}}
|
||||
is on the following channels: {{{parse whois.channels}}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if whois.server}}
|
||||
<div>
|
||||
<span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
|
||||
{{> ../user_name nick=whois.nick}}
|
||||
is connected to {{whois.server}} <i>({{whois.server_info}})</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if whois.secure}}
|
||||
<div>
|
||||
<span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
|
||||
{{> ../user_name nick=whois.nick}}
|
||||
is using a secure connection
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if whois.away}}
|
||||
<div>
|
||||
<span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
|
||||
{{> ../user_name nick=whois.nick}}
|
||||
is away <i>({{whois.away}})</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if whois.idle}}
|
||||
<div>
|
||||
<span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
|
||||
{{> ../user_name nick=whois.nick}}
|
||||
has been idle since {{localetime whois.idleTime}}.
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -31,4 +31,5 @@ module.exports = {
|
||||
unread_marker: require("./unread_marker.tpl"),
|
||||
user: require("./user.tpl"),
|
||||
user_filtered: require("./user_filtered.tpl"),
|
||||
user_name: require("./user_name.tpl"),
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
</span>
|
||||
<span class="from">
|
||||
{{#if from}}
|
||||
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
|
||||
{{> user_name nick=from}}
|
||||
{{/if}}
|
||||
</span>
|
||||
{{#equal type "toggle"}}
|
||||
|
@ -6,6 +6,6 @@
|
||||
{{/unless}}
|
||||
<div class="user-mode {{modes mode}}">
|
||||
{{/diff}}
|
||||
<span role="button" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</span>
|
||||
{{> user_name}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
1
client/views/user_name.tpl
Normal file
1
client/views/user_name.tpl
Normal file
@ -0,0 +1 @@
|
||||
<span role="button" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</span>
|
Loading…
Reference in New Issue
Block a user