Better RTL languages support:

- Fixed text alignment in RTL messages.
- Added support for search box.
- Added support for conversation name.
- Added support for contact name.
- Added support for last message timestamp and last message preview.

//FREEBIE
This commit is contained in:
bitim 2016-07-05 03:54:02 +03:00 committed by lilia
parent 61e7b685e6
commit a1eccc2c49
2 changed files with 14 additions and 11 deletions

View file

@ -20,7 +20,7 @@
</div> </div>
<h1>Signal</h1> <h1>Signal</h1>
<div class='tool-bar clearfix'> <div class='tool-bar clearfix'>
<input type='search' class='search' placeholder='{{ searchForPeopleOrGroups }}'> <input type='search' class='search' placeholder='{{ searchForPeopleOrGroups }}' dir='auto'>
<span class='search-icon'></span> <span class='search-icon'></span>
</div> </div>
</div> </div>
@ -80,7 +80,7 @@
</div> </div>
<span class='conversation-title'> <span class='conversation-title'>
{{ #name }} {{ #name }}
<span class='conversation-name'>{{ name }}</span> <span class='conversation-name' dir='auto'>{{ name }}</span>
{{ /name }} {{ /name }}
{{ #number }} {{ #number }}
<span class='conversation-number'>{{ number }}</span> <span class='conversation-number'>{{ number }}</span>
@ -136,7 +136,7 @@
<script type='text/x-tmpl-mustache' id='message'> <script type='text/x-tmpl-mustache' id='message'>
{{> avatar }} {{> avatar }}
<div class='bubble' style='background-color: {{ avatar.color }};'> <div class='bubble' style='background-color: {{ avatar.color }};'>
<div class='sender'>{{ sender }}</div> <div class='sender' dir='auto'>{{ sender }}</div>
<div class='attachments'></div> <div class='attachments'></div>
<p class='content' dir='auto'>{{ message }}</p> <p class='content' dir='auto'>{{ message }}</p>
<div class='meta'> <div class='meta'>
@ -179,7 +179,7 @@
<span>{{ name }}</span><span class='remove'>x</span> <span>{{ name }}</span><span class='remove'>x</span>
</script> </script>
<script type='text/x-tmpl-mustache' id='contact_name_and_number'> <script type='text/x-tmpl-mustache' id='contact_name_and_number'>
<h3 class='name'> {{ title }} </h3> <h3 class='name' dir='auto'> {{ title }} </h3>
<div class='number'>{{ number }}</div> <div class='number'>{{ number }}</div>
</script> </script>
<script type='text/x-tmpl-mustache' id='contact'> <script type='text/x-tmpl-mustache' id='contact'>
@ -195,13 +195,13 @@
<script type='text/x-tmpl-mustache' id='conversation-preview'> <script type='text/x-tmpl-mustache' id='conversation-preview'>
{{> avatar }} {{> avatar }}
<div class='contact-details'> <div class='contact-details'>
<span class='last-timestamp' data-timestamp={{ last_message_timestamp }}> </span> <span class='last-timestamp' data-timestamp={{ last_message_timestamp }} dir='auto'> </span>
{{> contact_name_and_number }} {{> contact_name_and_number }}
{{ #unreadCount }} {{ #unreadCount }}
<span class='unread-count'>{{ unreadCount }}</span> <span class='unread-count'>{{ unreadCount }}</span>
{{ /unreadCount }} {{ /unreadCount }}
{{ #last_message }} {{ #last_message }}
<p class='last-message'> {{ last_message }} </p> <p class='last-message' dir='auto'> {{ last_message }} </p>
{{ /last_message }} {{ /last_message }}
</div> </div>
</script> </script>
@ -304,7 +304,7 @@
<script type='text/x-tmpl-mustache' id='recipients-input'> <script type='text/x-tmpl-mustache' id='recipients-input'>
<div class='recipients-container'> <div class='recipients-container'>
<span class='recipients'></span> <span class='recipients'></span>
<input type='text' class='search' placeholder='{{ placeholder }}' /> <input type='text' class='search' placeholder='{{ placeholder }}' dir='auto' />
</div> </div>
<div class='results'> <div class='results'>
<div class='new-contact contact hide'></div> <div class='new-contact contact hide'></div>
@ -330,7 +330,7 @@
<span class='error-icon'></span> <span class='error-icon'></span>
</div> </div>
{{ /errors }} {{ /errors }}
<span class='name'>{{ name }}</span> <span class='name' dir='auto'>{{ name }}</span>
{{ #errors }} {{ #errors }}
{{ #message }} {{ #message }}
<p class='error-message'>{{message}}</p> <p class='error-message'>{{message}}</p>

View file

@ -276,7 +276,8 @@ img.emoji {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
margin: 0 0 0 8px; margin: 0 0 0 8px;
width: calc(100% - 44px - 8px - 4px); } width: calc(100% - 44px - 8px - 4px);
text-align: left; }
.contact-details p { .contact-details p {
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; } text-overflow: ellipsis; }
@ -286,7 +287,8 @@ img.emoji {
font-size: 1em; font-size: 1em;
font-weight: 400; font-weight: 400;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow-x: hidden; } overflow-x: hidden;
text-align: left; }
.contact-details .number { .contact-details .number {
color: #616161; color: #616161;
font-size: small; } font-size: small; }
@ -977,7 +979,8 @@ li.entry .error-icon-container {
box-shadow: 0 3px 3px -4px black; box-shadow: 0 3px 3px -4px black;
word-wrap: break-word; word-wrap: break-word;
margin-left: 8px; margin-left: 8px;
max-width: 30em; } max-width: 30em;
text-align: -webkit-auto; }
@media (max-width: 899px) { @media (max-width: 899px) {
.message-container .bubble, .message-container .bubble,
.message-list .bubble { .message-list .bubble {