mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 16:06:15 +00:00
Add first character to no photo mode. If no number # is the character
This commit is contained in:
parent
42272c9164
commit
cbb02de464
@ -50,6 +50,17 @@ app.filter('peerColor', function() {
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('firstCharacter', function() {
|
||||
return function(input) {
|
||||
if (input.charAt(0) == '+') {
|
||||
return '#';
|
||||
}
|
||||
|
||||
return input.charAt(0);
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
app.controller('OcSmsController', ['$scope', '$interval', '$timeout', '$compile',
|
||||
function ($scope, $interval, $timeout, $compile) {
|
||||
$scope.buttons = [
|
||||
|
@ -11,7 +11,7 @@ use \OCA\OcSms\Lib\CountryCodes;
|
||||
<ul class="contact-list">
|
||||
<li ng-repeat="contact in contacts" peer-label="{{ contact.label }}">
|
||||
<div class="ocsms-plavatar" style="background-image: url('{{ contact.avatar }}');" ng-show="contact.avatar !== undefined"></div>
|
||||
<div class="ocsms-plavatar" ng-show="contact.avatar === undefined" ng-style="{'background-color': (contact.label | peerColor)}"></div>
|
||||
<div class="ocsms-plavatar" ng-show="contact.avatar === undefined" ng-style="{'background-color': (contact.label | peerColor)}">{{ contact.label | firstCharacter }}</div>
|
||||
<a class="ocsms-plname" style="{{ contact.unread > 0 ? 'font-weight:bold;' : ''}}" mailbox-label="{{ contact.label }}" mailbox-navigation="{{ contact.nav }}" ng-click="loadConversation(contact);" href="#">{{ contact.label }}{{ contact.unread > 0 ? ' (' + contact.unread + ') ' : '' }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user