From 40340a303826bf4b968631266305c6f901103098 Mon Sep 17 00:00:00 2001 From: phischdev Date: Tue, 6 Jun 2017 13:16:44 +0200 Subject: [PATCH] Sachen --- app/Application.js | 36 ++++++++++++++++++------------------ app/store/ServicesList.js | 3 ++- app/ux/WebView.js | 2 +- app/view/add/Add.js | 2 +- package.json | 23 ++++++++++++++++++++--- 5 files changed, 42 insertions(+), 24 deletions(-) diff --git a/app/Application.js b/app/Application.js index 36d62207..b4804c37 100644 --- a/app/Application.js +++ b/app/Application.js @@ -144,23 +144,6 @@ Ext.define('Rambox.Application', { "zoomLevel": 0, "id": 20 }, - { - "position": 7, - "type": "roundcube", - "logo": "roundcube.png", - "name": "Mail", - "url": "https://webmail.diehumanisten.de", - "align": "right", - "notifications": true, - "muted": false, - "displayTabUnreadCounter": true, - "includeInGlobalUnreadCounter": true, - "trust": false, - "enabled": false, - "js_unread": "", - "zoomLevel": 0, - "id": 3 - }, { "position": 8, "type": "wordpress", @@ -179,7 +162,24 @@ Ext.define('Rambox.Application', { "removable": true, "id": 23 }, - { + { + "position": 7, + "type": "roundcube", + "logo": "roundcube.png", + "name": "Mail", + "url": "https://webmail.df.eu/roundcube", + "align": "right", + "notifications": true, + "muted": false, + "displayTabUnreadCounter": true, + "includeInGlobalUnreadCounter": true, + "trust": false, + "enabled": false, + "js_unread": "Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var e=this.length-1;e>=0;e--)this[e]&&this[e].parentElement&&this[e].parentElement.removeChild(this[e])},document.getElementsByClassName('owa-banner').remove(),document.getElementsByTagName('footer').remove(),document.getElementsByTagName('aside').remove(),document.getElementsByTagName('h1').remove(),document.getElementsByTagName('table')[1].remove(),document.getElementsByTagName('dd')[0].remove(),document.getElementsByTagName('dl')[0].getElementsByTagName('dt')[0].remove(),document.getElementsByTagName('dl')[0].style.background='none',document.getElementsByTagName('dl')[0].style.padding='inherit',document.getElementsByTagName('article')[0].style.width='initial';", + "zoomLevel": 0, + "id": 3 + }, + { "position": 9, "type": "hangouts", "logo": "hangouts.png", diff --git a/app/store/ServicesList.js b/app/store/ServicesList.js index b256b5cc..306fc9a7 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -112,10 +112,11 @@ Ext.define('Rambox.store.ServicesList', { { id: 'roundcube' ,logo: 'roundcube.png' - ,name: 'Roundcube' + ,name: 'Webmail' ,description: 'Free and open source webmail software for the masses, written in PHP.' ,url: '___' ,type: 'mitarbeiter' + ,js_unread: 'Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var e=this.length-1;e>=0;e--)this[e]&&this[e].parentElement&&this[e].parentElement.removeChild(this[e])},document.getElementsByClassName("owa-banner").remove(),document.getElementsByTagName("footer").remove(),document.getElementsByTagName("aside").remove(),document.getElementsByTagName("h1").remove();' }, { id: 'hootsuite' diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 53225054..578e33d2 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -365,7 +365,7 @@ Ext.define('Rambox.ux.WebView',{ //console.log("EXTERN", e); var selectType = undefined; - if (e.url.match('https?:\/\/www.facebook.com\/')) + if (e.url.match('https?:\/\/(www)?(m)?.facebook.com\/')) selectType = "facebook"; else if (e.url.match('https?:\/\/pgs-diehumanisten.slack.com\/')) selectType = "slack"; diff --git a/app/view/add/Add.js b/app/view/add/Add.js index 51d699e7..04ed86a1 100644 --- a/app/view/add/Add.js +++ b/app/view/add/Add.js @@ -211,7 +211,7 @@ Ext.define('Rambox.view.add.Add',{ ,value: me.edit ? me.record.get('js_unread') : '' ,anchor: '100%' ,height: 120 - ,disabled: function(view, rowIndex, colIndex, item, record) {return !record.get('editable'); } + ,disabled: removable } ] diff --git a/package.json b/package.json index 066c1011..981137ba 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,15 @@ "start": "electron electron/main.js", "start:debug": "electron electron/main.js --enable-logging", "test": "./node_modules/.bin/mocha test/tests/**/*.spec.js", + "sencha:clean": "rm -rf ./build/production", "sencha:compile": "sencha app build && cp app/package.json build/production/Rambox/ && npm --prefix ./build/production/Rambox/ install ./build/production/Rambox/", "sencha:compile:build": "sencha app build && cp app/package.json build/production/Rambox/ && cp -R build/production/Rambox/* ../rambox-build", + "clean": "rm -rf ./dist", "clean:osx": "rm -rf ./dist/Rambox-darwin-*", "clean:win": "rm -rf ./dist/Rambox-win32-*", + "pack": "npm run pack:osx && npm run pack:win && npm run pack:linux", "pack:osx": "electron-packager \"./build/production/Rambox/\" \"HumanistenBox\" --out=dist --platform=darwin --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.icns --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Die Humanisten\" --version-string.ProductName=\"pdhBox\" --asar --prune --overwrite", "pack:win": "npm run pack:win32 && npm run pack:win64", @@ -18,6 +21,7 @@ "pack:linux": "npm run pack:linux32 && npm run pack:linux64", "pack:linux32": "electron-packager \"./build/production/Rambox/\" \"HumanistenBox\" --out=dist --platform=linux --arch=ia32 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Die Humanisten\" --version-string.ProductName=\"pdhBox\" --asar --prune --overwrite", "pack:linux64": "electron-packager \"./build/production/Rambox/\" \"HumanistenBox\" --out=dist --platform=linux --arch=x64 --version=1.3.4 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Die Humanisten\" --version-string.ProductName=\"pdhBox\" --asar --prune --overwrite", + "build": "npm run build:linux && npm run build:osx && npm run build:win && npm run build:linux ", "build:osx": "build --macos", "build:linux": "npm run build:linux32 && npm run build:linux64", @@ -25,10 +29,23 @@ "build:linux64": "build --linux --x64", "build:win32": "build --win --ia32", "build:win64": "build --win --x64", - "setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run clean:osx && npm run pack:osx && npm run build:osx", + + "setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run clean:osx && npm run pack:osx && npm run build:osx", "setup:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run build:win", - "all:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run zip:win32 && npm run zip:win64 && npm run build:win", - "all:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux" + + "all:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run zip:win32 && npm run zip:win64 && npm run build:win", + "all:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux", + + "zip:osx": "zip -qr HumanistenBox-darwin-x64.zip HumanistenBox-darwin-x64/", + "zip:win32": "zip -qr HumanistenBox-win32-ia32.zip HumanistenBox-win32-ia32/", + "zip:win64": "zip -qr HumanistenBox-win32-x64.zip HumanistenBox-win32-x64/", + "zip:win": "npm run zip:win32 && npm run zip:win64", + "zip:linux32": "zip -qr HumanistenBox-linux-ia32.zip HumanistenBox-linux-ia32/", + "zip:linux64": "zip -qr HumanistenBox-linux-x64.zip HumanistenBox-linux-x64/", + "zip:linux": "npm run zip:linux32 && npm run zip:linux64", + "zip": "cd dist && npm run zip:osx && npm run zip:win && npm run zip:linux", + + "fixi": "npm run sencha:clean && npm run sencha:compile && npm run clean && npm run pack && npm run zip" }, "build": { "productName": "HumanistenBox",