mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-11 16:32:55 +00:00
Prepare contactlist with vue
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014-2017
|
||||
* @copyright Loic Blot 2014-2018
|
||||
*/
|
||||
|
||||
var Sms = {
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Nextcloud - Phone Sync
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014-2018
|
||||
*/
|
||||
|
||||
var ContactList = new Vue({
|
||||
el: '#app-mailbox-peers',
|
||||
data: {
|
||||
isContactsLoading: true,
|
||||
contacts: []
|
||||
},
|
||||
created: function () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// Conversations
|
||||
loadConversation: function (contact) {
|
||||
OC.Util.History.pushState('phonenumber=' + contact.nav);
|
||||
|
||||
// phoneNumber must exist
|
||||
if (contact.nav !== null) {
|
||||
this.fetchConversation(contact);
|
||||
Sms.selectConversation($("a[mailbox-navigation='" + contact.nav + "']"));
|
||||
}
|
||||
},
|
||||
fetchConversation: function (contact) {
|
||||
// @TODO
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
orderedContacts: function () {
|
||||
return _.orderBy(this.contacts, SmsSettings.contactOrderBy, SmsSettings.reverseContactOrder)
|
||||
}
|
||||
}
|
||||
});
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014-2017
|
||||
* @copyright Loic Blot 2014-2018
|
||||
*/
|
||||
|
||||
function inArray(val, arr) {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014-2017
|
||||
* @copyright Loic Blot 2014-2018
|
||||
*/
|
||||
|
||||
var app = angular.module('OcSms', []);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014-2017
|
||||
* @copyright Loic Blot 2014-2018
|
||||
*/
|
||||
|
||||
var SmsNotifications = {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014-2017
|
||||
* @copyright Loic Blot 2014-2018
|
||||
*/
|
||||
|
||||
var SmsSettings = new Vue({
|
||||
|
||||
Reference in New Issue
Block a user