mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-21 21:32:59 +00:00
Add settings to change contact list ordering by label/lastmsg and reverse/sort
This commit is contained in:
+24
-14
@@ -9,7 +9,7 @@ use \OCA\OcSms\Lib\CountryCodes;
|
||||
<div class="ng-scope" id="app" ng-app="OcSms" ng-controller="OcSmsController">
|
||||
<div id="app-mailbox-peers">
|
||||
<ul class="contact-list">
|
||||
<li ng-repeat="contact in contacts | orderBy:'-lastmsg'" peer-label="{{ contact.label }}" ng-click="loadConversation(contact);" href="#">
|
||||
<li ng-repeat="contact in contacts | orderBy:setting_contactOrder:setting_contactOrderReverse" peer-label="{{ contact.label }}" ng-click="loadConversation(contact);" href="#">
|
||||
<img class="ocsms-plavatar" ng-src="{{ contact.avatar }}" ng-show="contact.avatar !== undefined" />
|
||||
<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 }}">{{ contact.label }}{{ contact.unread > 0 ? ' (' + contact.unread + ') ' : '' }}</a>
|
||||
@@ -22,25 +22,35 @@ use \OCA\OcSms\Lib\CountryCodes;
|
||||
</div>
|
||||
<div id="app-settings-content">
|
||||
<div><label for="setting_msg_per_page">Max messages on tab loading</label>
|
||||
<input type="number" min="10" max="10000" name="setting_msg_per_page" ng-model="setting_msgLimit" ng-change="setMessageLimit()" />
|
||||
<span class="label-invalid-input" ng-if="setting_msgLimit == null || setting_msgLimit == undefined">Invalid message limit</span>
|
||||
<input type="number" min="10" max="10000" name="setting_msg_per_page" ng-model="setting_msgLimit" ng-change="setMessageLimit()" to-int />
|
||||
<span class="label-invalid-input" ng-if="setting_msgLimit == null || setting_msgLimit == undefined">Invalid message limit</span>
|
||||
</div>
|
||||
|
||||
<div><label for="intl_phone">Country code</label>
|
||||
<select name="intl_phone" id="sel_intl_phone">
|
||||
<?php foreach (CountryCodes::$codes as $code => $cval) { ?>
|
||||
<option><?php p($code); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<button class="new-button primary icon-checkmark-white" ng-click="sendCountry();"></button>
|
||||
<select name="intl_phone" id="sel_intl_phone">
|
||||
<?php foreach (CountryCodes::$codes as $code => $cval) { ?>
|
||||
<option><?php p($code); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<button class="new-button primary icon-checkmark-white" ng-click="sendCountry();"></button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for"setting_notif">Notification settings</label>
|
||||
<select name="setting_notif" ng-model="setting_enableNotifications" ng-change="setNotificationSetting()">
|
||||
<option value="1">Enable</option>
|
||||
<option value="0">Disable</option>
|
||||
</select>
|
||||
<label for="setting_contact_order">Contact ordering</label>
|
||||
<select name="setting_contact_order" ng-model="setting_contactOrder" ng-change="setContactOrderSetting()">
|
||||
<option value="lastmsg">Last message</option>
|
||||
<option value="label">Label</option>
|
||||
</select>
|
||||
<label for "setting_contact_order_reverse">Reverse ?</label>
|
||||
<input type="checkbox" ng-model="setting_contactOrderReverse" ng-change="setContactOrderSetting()" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for"setting_notif">Notification settings</label>
|
||||
<select name="setting_notif" ng-model="setting_enableNotifications" ng-change="setNotificationSetting()">
|
||||
<option value="1">Enable</option>
|
||||
<option value="0">Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> <!-- app-settings-content -->
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user