diff --git a/app/model/ServiceList.js b/app/model/ServiceList.js index 2e85d19b..a53a5d93 100644 --- a/app/model/ServiceList.js +++ b/app/model/ServiceList.js @@ -13,5 +13,8 @@ Ext.define('Rambox.model.ServiceList', { },{ name: 'url' ,type: 'string' + },{ + name: 'type' + ,type: 'string' }] }); diff --git a/app/store/ServicesList.js b/app/store/ServicesList.js index ee457b4f..9b5b52e9 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -21,102 +21,140 @@ Ext.define('Rambox.store.ServicesList', { ,logo: 'whatsapp.png' ,name: 'WhatsApp' ,url: 'https://web.whatsapp.com/' + ,type: 'messaging' }, { id: 'slack' ,logo: 'slack.png' ,name: 'Slack' ,url: 'https://___.slack.com/' + ,type: 'messaging' }, { id: 'noysi' ,logo: 'noysi.png' ,name: 'Noysi' ,url: 'https://noysi.com/#/identity/sign-in' + ,type: 'messaging' }, { id: 'messenger' ,logo: 'messenger.png' ,name: 'Messenger' ,url: 'https://www.messenger.com/login/' + ,type: 'messaging' }, { id: 'skype' ,logo: 'skype.png' ,name: 'Skype' ,url: 'https://web.skype.com/' + ,type: 'messaging' }, { id: 'hangouts' ,logo: 'hangouts.png' ,name: 'Hangouts' ,url: 'https://hangouts.google.com/' + ,type: 'messaging' }, { id: 'hipchat' ,logo: 'hipchat.png' ,name: 'HipChat' ,url: 'https://www.hipchat.com/sign_in/' + ,type: 'messaging' }, { id: 'telegram' ,logo: 'telegram.png' ,name: 'Telegram' ,url: 'https://web.telegram.org/#/login' + ,type: 'messaging' }, { id: 'wechat' ,logo: 'wechat.png' ,name: 'WeChat' ,url: 'https://web.wechat.com/' + ,type: 'messaging' }, { id: 'gmail' ,logo: 'gmail.png' ,name: 'Gmail' ,url: 'https://mail.google.com/mail/' + ,type: 'email' }, { id: 'inbox' ,logo: 'inbox.png' ,name: 'Inbox' ,url: 'http://inbox.google.com/?cid=imp' + ,type: 'email' }, { id: 'chatwork' ,logo: 'chatwork.png' ,name: 'ChatWork' ,url: 'https://www.chatwork.com/login.php' + ,type: 'messaging' }, { id: 'groupme' ,logo: 'groupme.png' ,name: 'GroupMe' ,url: 'https://web.groupme.com/signin' + ,type: 'messaging' }, { id: 'grape' ,logo: 'grape.png' ,name: 'Grape' ,url: 'https://chatgrape.com/accounts/login/' + ,type: 'messaging' }, { id: 'gitter' ,logo: 'gitter.png' ,name: 'Gitter' ,url: 'https://gitter.im/login' + ,type: 'messaging' }, { id: 'steam' ,logo: 'steam.png' ,name: 'Steam Chat' ,url: 'https://steamcommunity.com/chat' + ,type: 'messaging' }, { id: 'discord' ,logo: 'discord.png' ,name: 'Discord' ,url: 'https://discordapp.com/login' + ,type: 'messaging' + }, + { + id: 'protonmail' + ,logo: 'protonmail.png' + ,name: 'ProtonMail' + ,url: 'https://mail.protonmail.com/inbox' + ,type: 'email' + }, + { + id: 'tutanota' + ,logo: 'tutanota.png' + ,name: 'Tutanota' + ,url: 'https://app.tutanota.de/' + ,type: 'email' + }, + { + id: 'hushmail' + ,logo: 'hushmail.png' + ,name: 'Hushmail' + ,url: 'https://www.hushmail.com/hushmail/index.php' + ,type: 'email' } ] }); diff --git a/app/view/main/Main.js b/app/view/main/Main.js index 42eda7d1..d29fb56a 100644 --- a/app/view/main/Main.js +++ b/app/view/main/Main.js @@ -85,6 +85,31 @@ Ext.define('Rambox.view.main.Main', { ,margin: '50 0 0 0' ,tools: [ { + xtype: 'checkboxgroup' + ,items: [ + { + xtype: 'checkbox' + ,boxLabel: 'Messaging' + ,name: 'messaging' + ,checked: true + ,uncheckedValue: false + ,inputValue: true + } + ,{ + xtype: 'checkbox' + ,boxLabel: 'Email' + ,margin: '0 10 0 10' + ,name: 'email' + ,checked: true + ,uncheckedValue: false + ,inputValue: true + } + ] + ,listeners: { + change: 'doFilter' + } + } + ,{ type: 'plus' ,tooltip: 'Add a custom service (soon...)' } diff --git a/app/view/main/MainController.js b/app/view/main/MainController.js index 51b5b424..e7931e43 100644 --- a/app/view/main/MainController.js +++ b/app/view/main/MainController.js @@ -227,4 +227,13 @@ Ext.define('Rambox.view.main.MainController', { } }); } + + ,doFilter: function( cg, newValue, oldValue ) { + var values = Ext.cq1('checkboxgroup').getValue(); + Ext.getStore('ServicesList').getFilters().replaceAll({ + fn: function(record) { + return Ext.Array.contains(Ext.Object.getKeys(values), record.get('type')); + } + }); + } }); diff --git a/resources/icons/hushmail.png b/resources/icons/hushmail.png new file mode 100644 index 00000000..a22643cd Binary files /dev/null and b/resources/icons/hushmail.png differ diff --git a/resources/icons/outlook.png b/resources/icons/outlook.png new file mode 100644 index 00000000..9477f695 Binary files /dev/null and b/resources/icons/outlook.png differ diff --git a/resources/icons/protonmail.png b/resources/icons/protonmail.png new file mode 100644 index 00000000..19fb052b Binary files /dev/null and b/resources/icons/protonmail.png differ diff --git a/resources/icons/tutanota.png b/resources/icons/tutanota.png new file mode 100644 index 00000000..9e526c85 Binary files /dev/null and b/resources/icons/tutanota.png differ