diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5129a95f..bebf99c3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -8,13 +8,13 @@ Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. -[template]: https://github.com/TheGoddessInari/rambox/blob/master/.github/ISSUE_TEMPLATE.md +[template]: https://github.com/TheGoddessInari/hamsket/blob/master/.github/ISSUE_TEMPLATE.md ## Ask for help We have a great community in [Gitter][gitter] that can help you with any doubt or problem. -[gitter]: https://gitter.im/TheGoddessInari/rambox +[gitter]: https://gitter.im/TheGoddessInari/hamsket ## Contributing to Source Code diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index f573941b..14e65caa 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -18,7 +18,7 @@ -> Rambox-OS: v0.X.X +> Hamsket: v0.X.X > OS: XXXX diff --git a/.gitignore b/.gitignore index 4ec9ad13..b7243a57 100644 --- a/.gitignore +++ b/.gitignore @@ -34,5 +34,5 @@ npm-debug.log # Vagrant /.vagrant env.js -rambox_cfg.json +hamsket_cfg.json languages.js diff --git a/.vscode/launch.json b/.vscode/launch.json index 870de806..61d3b588 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,19 +5,19 @@ "version": "0.2.0", "configurations": [ { - "name": "Rambox-OS: Main", + "name": "Hamsket: Main", "type": "node", "request": "launch", "protocol": "inspector", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "args": [ "--remote-debugging-port=9223", - "build/production/Rambox" + "build/production/Hamsket" ], "outFiles": [ "${workspaceFolder}/build/production/**/*.js" ] }, { - "name": "Rambox-OS: Renderer", + "name": "Hamsket: Renderer", "type": "chrome", "request": "attach", "port": 9223, @@ -27,10 +27,10 @@ ], "compounds": [ { - "name": "Rambox-OS: All", + "name": "Hamsket: All", "configurations": [ - "Rambox-OS: Main", - "Rambox-OS: Renderer" + "Hamsket: Main", + "Hamsket: Renderer" ] } ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b04d9e1c..db610064 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ We welcome pull requests! Follow these steps to contribute: -1. Find an [issue](https://github.com/TheGoddessInari/rambox/issues) that needs assistance. +1. Find an [issue](https://github.com/TheGoddessInari/hamsket/issues) that needs assistance. 2. Let us know you are working on it by posting a comment on the issue. @@ -23,7 +23,7 @@ Working on your first Pull Request? You can learn how from this *free* series [H - [Prerequisites](#prerequisites) - [Forking the Project](#forking-the-project) - [Create a Branch](#create-a-branch) -- [Set Up Rambox-OS](#set-up-rambox-OS) +- [Set Up Hamsket](#set-up-Hamsket) ### Create @@ -67,35 +67,35 @@ If your versions are lower than the prerequisite versions, you should update. 1. Install [Git](https://git-scm.com/) or your favorite Git client. 2. (Optional) [Setup an SSH Key](https://help.github.com/articles/generating-an-ssh-key/) for GitHub. -#### Forking Rambox-OS +#### Forking Hamsket -1. Go to the top level rambox repository: +1. Go to the top level hamsket repository: 2. Click the "Fork" Button in the upper right hand corner of the interface ([More Details Here](https://help.github.com/articles/fork-a-repo/)) -3. After the repository (repo) has been forked, you will be taken to your copy of the rambox repo at +3. After the repository (repo) has been forked, you will be taken to your copy of the hamsket repo at #### Cloning Your Fork 1. Open a Terminal / Command Line / Bash Shell in your projects directory (_i.e.: `/yourprojectdirectory/`_) -2. Clone your fork of Rambox-OS +2. Clone your fork of Hamsket ```shell -$ git clone https://github.com/yourUsername/rambox.git +$ git clone https://github.com/yourUsername/hamsket.git ``` **(make sure to replace `yourUsername` with your GitHub username)** -This will download the entire Rambox-OS repo to your projects directory. +This will download the entire Hamsket repo to your projects directory. #### Setup Your Upstream -1. Change directory to the new Rambox-OS directory (`cd rambox`) -2. Add a remote to the official Rambox-OS repo: +1. Change directory to the new Hamsket directory (`cd hamsket`) +2. Add a remote to the official Hamsket repo: ```shell -$ git remote add upstream https://github.com/TheGoddessInari/rambox.git +$ git remote add upstream https://github.com/TheGoddessInari/hamsket.git ``` -Congratulations, you now have a local copy of the Rambox-OS repo! +Congratulations, you now have a local copy of the Hamsket repo! ### Create a Branch @@ -123,9 +123,9 @@ $ git push origin [name_of_your_new_branch] **If you need more help with branching, take a look at [this](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches).** -### Set Up Rambox-OS +### Set Up Hamsket -Once you have Rambox-OS cloned, before you start the application, you first need to install all of the dependencies: +Once you have Hamsket cloned, before you start the application, you first need to install all of the dependencies: ```bash # Install NPM dependencies @@ -140,7 +140,7 @@ $ npm start # in a new terminal This bit is up to you! -#### How to find the code in the Rambox-OS codebase to fix/edit +#### How to find the code in the Hamsket codebase to fix/edit The best way to find out any code you wish to change/add or remove is using the GitHub search bar at the top of the repository page. For example, you could @@ -161,10 +161,10 @@ To see these changes you'll need to stop your `npm start` , and then rerun. #### What is a Pull Request? -A pull request (PR) is a method of submitting proposed changes to the Rambox-OS +A pull request (PR) is a method of submitting proposed changes to the Hamsket repo (or any repo, for that matter). You will make changes to copies of the -files which make up Rambox-OS in a personal fork, then apply to have them -accepted by Rambox-OS proper. +files which make up Hamsket in a personal fork, then apply to have them +accepted by Hamsket proper. #### Important: ALWAYS EDIT ON A BRANCH @@ -179,9 +179,9 @@ fork and re-fork. 1. Once the edits have been committed, you will be prompted to create a pull request on your fork's GitHub Page. -2. By default, all pull requests should be against the Rambox-OS main repo, `master` +2. By default, all pull requests should be against the Hamsket main repo, `master` branch. - **Make sure that your Base Fork is set to TheGoddessInari/rambox when raising a Pull Request.** + **Make sure that your Base Fork is set to TheGoddessInari/hamsket when raising a Pull Request.** 3. Submit a pull request. diff --git a/README.md b/README.md index 2bca034a..195c3646 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,34 @@ -# Rambox-OS, soon to be renamed to Hamsket. +# Hamsket, soon to be renamed to Hamsket.

-Rambox-OS +Hamsket

#### Free, Open Source and Cross Platform messaging and emailing app that combines common web applications into one. [![GNU GPL v3][license]](https://www.gnu.org/licenses/gpl-3.0.en.html) -[![Gitter][gitter]](https://gitter.im/TheGoddessInari/rambox) -[![Release][release]](https://github.com/TheGoddessInari/rambox/releases/latest) +[![Gitter][gitter]](https://gitter.im/TheGoddessInari/hamsket) +[![Release][release]](https://github.com/TheGoddessInari/hamsket/releases/latest) -[![DevOps Build][devops-build]](https://dev.azure.com/TheGoddessInari/rambox/_build?definitionId=2) -[![DevOps Deployment][devops-deploy]](https://dev.azure.com/TheGoddessInari/rambox/_release?definitionId=1) -[![Dependencies][dependencies]](https://david-dm.org/TheGoddessInari/rambox?path=app) -[![DevDependencies][dev-dependencies]](https://david-dm.org/TheGoddessInari/rambox?type=dev) +[![DevOps Build][devops-build]](https://dev.azure.com/TheGoddessInari/hamsket/_build?definitionId=2) +[![DevOps Deployment][devops-deploy]](https://dev.azure.com/TheGoddessInari/hamsket/_release?definitionId=1) +[![Dependencies][dependencies]](https://david-dm.org/TheGoddessInari/hamsket?path=app) +[![DevDependencies][dev-dependencies]](https://david-dm.org/TheGoddessInari/hamsket?type=dev) -[license]: https://img.shields.io/github/license/TheGoddessInari/rambox.svg -[gitter]: https://img.shields.io/gitter/room/TheGoddessInari/rambox.svg -[release]: https://img.shields.io/github/release/TheGoddessInari/rambox.svg +[license]: https://img.shields.io/github/license/TheGoddessInari/hamsket.svg +[gitter]: https://img.shields.io/gitter/room/TheGoddessInari/hamsket.svg +[release]: https://img.shields.io/github/release/TheGoddessInari/hamsket.svg [devops-build]: https://img.shields.io/azure-devops/build/TheGoddessInari/f5a88978-10c7-4069-97e0-59b9fc6d36a0/2.svg?logo=azure-devops [devops-deploy]: https://img.shields.io/azure-devops/release/TheGoddessInari/f5a88978-10c7-4069-97e0-59b9fc6d36a0/1/1.svg?logo=azure-devops -[dependencies]: https://img.shields.io/david/TheGoddessInari/rambox.svg?path=app -[dev-dependencies]: https://img.shields.io/david/dev/TheGoddessInari/rambox.svg +[dependencies]: https://img.shields.io/david/TheGoddessInari/hamsket.svg?path=app +[dev-dependencies]: https://img.shields.io/david/dev/TheGoddessInari/hamsket.svg -##### Nightly build artifacts are available in Windows ([Win64](https://github.com/TheGoddessInari/rambox/releases/download/nightly/Rambox-OS.Setup.0.5.18.exe)), Mac ([DMG](https://github.com/TheGoddessInari/rambox/releases/download/nightly/Rambox-OS-0.5.18.dmg) / [App](https://github.com/TheGoddessInari/rambox/releases/download/nightly/Rambox-OS-0.5.18-mac.zip)), and Linux ([AppImage64](https://github.com/TheGoddessInari/rambox/releases/download/nightly/Rambox-OS.0.5.18.AppImage) / [RPM64](https://github.com/TheGoddessInari/rambox/releases/download/nightly/Rambox-0.5.18.x86_64.rpm) / [DEB64](https://github.com/TheGoddessInari/rambox/releases/download/nightly/Rambox_0.5.18_amd64.deb) / [Tarball64](https://github.com/TheGoddessInari/rambox/releases/download/nightly/Rambox-0.5.18.tar.gz)) packaging flavors. +##### Nightly build artifacts are available in Windows ([Win64](https://github.com/TheGoddessInari/hamsket/releases/download/nightly/Hamsket.Setup.0.5.18.exe)), Mac ([DMG](https://github.com/TheGoddessInari/hamsket/releases/download/nightly/Hamsket-0.5.18.dmg) / [App](https://github.com/TheGoddessInari/hamsket/releases/download/nightly/Hamsket-0.5.18-mac.zip)), and Linux ([AppImage64](https://github.com/TheGoddessInari/hamsket/releases/download/nightly/Hamsket.0.5.18.AppImage) / [RPM64](https://github.com/TheGoddessInari/hamsket/releases/download/nightly/Hamsket-0.5.18.x86_64.rpm) / [DEB64](https://github.com/TheGoddessInari/hamsket/releases/download/nightly/Hamsket_0.5.18_amd64.deb) / [Tarball64](https://github.com/TheGoddessInari/hamsket/releases/download/nightly/Hamsket-0.5.18.tar.gz)) packaging flavors. ###### Logo designed by [Andriy Yurchenko](http://andyur.com/). -###### Original rambox by [Ramiro Saenz](https://github.com/saenzramiro). +###### Original Rambox by [Ramiro Saenz](https://github.com/saenzramiro). ---------- @@ -50,7 +50,7 @@ ## Screenshot -![Rambox-OS](./resources/screenshots/win1.png) +![Hamsket](./resources/screenshots/win1.png) ---------- @@ -167,7 +167,7 @@ - [ ] Multi-language. - [ ] Sync your configuration between multiple computers. - [x] Master Password. -- [x] Lock Rambox-OS if you will be away for a period of time. +- [x] Lock Hamsket if you will be away for a period of time. - [x] Don't disturb mode. - [x] Reorder applications in the tab bar. - [x] Notification badge in the tab. @@ -193,7 +193,7 @@ No personal information will be saved or tracked. -Sessions will persist using the [partition:persist](https://electronjs.org/docs/api/webview-tag#partition) attribute for Webviews. So every time you open Rambox, your sessions will keep alive until you remove the service. +Sessions will persist using the [partition:persist](https://electronjs.org/docs/api/webview-tag#partition) attribute for Webviews. So every time you open Hamsket, your sessions will keep alive until you remove the service. ~~Sync feature use [Auth0](https://auth0.com/) for Single Sign On & Token Based Authentication and to store the services that user is using (and the configuration for each service). You are always welcome to check the code! ;)~~ @@ -207,7 +207,7 @@ Keep in mind, I'm not pushing this. I'll do my best regardless. | Type | URL/Wallet | | ------------ | :----------------------------------------------: | -| GoFundMe | | +| GoFundMe | | | Bitcoin | ```36SxZeQ5dA7Dn6pSmYWcvvmnkEeh8LdgmJ``` | | Bitcoin Cash | ```qqslp2vuamhmsp59u49dq89kwky2yj23nqmjr4mdgj``` | | Ethereum | ```0xa085d5F736f2D7D210261879e183e5bf870Eae5f``` | @@ -227,8 +227,8 @@ To build your own copy, you need: These **need** to be added to your PATH. ```shell -git clone https://github.com/TheGoddessInari/rambox.git -cd rambox +git clone https://github.com/TheGoddessInari/hamsket.git +cd hamsket npm install npm run repack:win64 ``` @@ -248,15 +248,15 @@ You can place unpacked files over where the installers normally place their file ## [Contributing](./CONTRIBUTING.md) -Want to report a bug, request a feature, contribute to or translate Rambox? We need all the help we can get! Fork and work! +Want to report a bug, request a feature, contribute to or translate Hamsket? We need all the help we can get! Fork and work! ---------- ## Quickstart ```shell -git clone https://github.com/TheGoddessInari/rambox.git -cd rambox +git clone https://github.com/TheGoddessInari/hamsket.git +cd hamsket npm install npm start ``` @@ -267,7 +267,7 @@ See [Contributing.md](./CONTRIBUTING.md) for more detailed information about get ## Disclosure -Rambox-OS is not affiliated with any of the messaging apps offered. +Hamsket is not affiliated with any of the messaging apps offered. ---------- diff --git a/app.js b/app.js index f6b8f1d5..676e9d4c 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,11 @@ // Sencha App Ext.setGlyphFontFamily('FontAwesome'); Ext.application({ - name: 'Rambox' + name: 'Hamsket' - ,extend: 'Rambox.Application' + ,extend: 'Hamsket.Application' - ,autoCreateViewport: 'Rambox.view.main.Main' + ,autoCreateViewport: 'Hamsket.view.main.Main' }); // auto update logic @@ -13,21 +13,21 @@ const ipc = require('electron').ipcRenderer; ipc.on('showAbout', function(event, message) { if(!Ext.cq1('about')) { - Ext.create('Rambox.view.main.About'); + Ext.create('Hamsket.view.main.About'); } }); ipc.on('showPreferences', function(event, message) { if (!Ext.cq1('preferences')) { - Ext.create('Rambox.view.preferences.Preferences').show(); + Ext.create('Hamsket.view.preferences.Preferences').show(); } }); ipc.on('autoUpdater:check-update', function() { - Rambox.app.checkUpdate(); + Hamsket.app.checkUpdate(); }); ipc.on('autoUpdater:update-not-available', function() { Ext.Msg.show({ title: 'You are up to date!' - ,message: 'You have the latest version of Rambox.' + ,message: 'You have the latest version of Hamsket.' ,icon: Ext.Msg.INFO ,buttons: Ext.Msg.OK }); @@ -35,7 +35,7 @@ ipc.on('autoUpdater:update-not-available', function() { ipc.on('autoUpdater:update-available', function() { Ext.Msg.show({ title: 'New Version available!' - ,message: 'Please wait until Rambox download the new version and ask you for install it.' + ,message: 'Please wait until Hamsket download the new version and ask you for install it.' ,icon: Ext.Msg.INFO ,buttons: Ext.Msg.OK }); @@ -49,7 +49,7 @@ ipc.on('autoUpdater:update-downloaded', function(e, releaseNotes, releaseName, r '->' ,{ xtype: 'label' - ,html: 'New version ready to install ('+releaseName+')! It will be installed the next time Rambox is relaunched.' + ,html: 'New version ready to install ('+releaseName+')! It will be installed the next time Hamsket is relaunched.' } ,{ xtype: 'button' @@ -60,7 +60,7 @@ ipc.on('autoUpdater:update-downloaded', function(e, releaseNotes, releaseName, r xtype: 'button' ,text: 'Changelog' ,ui: 'decline' - ,href: 'https://github.com/TheGoddessInari/rambox/releases/tag/'+releaseName + ,href: 'https://github.com/TheGoddessInari/hamsket/releases/tag/'+releaseName } ,'->' ,{ @@ -125,7 +125,7 @@ ipc.on('setBadge', function(event, messageCount) { // Reload Current Service ipc.on('reloadCurrentService', function(e) { const tab = Ext.cq1('app-main').getActiveTab(); - if ( tab.id !== 'ramboxTab' ) tab.reloadService(); + if ( tab.id !== 'hamsketTab' ) tab.reloadService(); }); ipc.on('tabFocusNext', function() { @@ -181,8 +181,8 @@ ipc.on('toggleDoNotDisturb', function(key) { }); ipc.on('lockWindow', function(key) { - const btn = Ext.getCmp('lockRamboxBtn'); - Ext.cq1('app-main').getController().lockRambox(btn); + const btn = Ext.getCmp('lockHamsketBtn'); + Ext.cq1('app-main').getController().lockHamsket(btn); }); ipc.on('goHome', function() { diff --git a/app.json b/app.json index 185f7e7f..f80977e9 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ /** * The application's namespace. */ - "name": "Rambox", + "name": "Hamsket", /** * The relative path to the appliaction's markup file (html, jsp, asp, etc.) @@ -28,7 +28,7 @@ * The name of the theme for this application. */ - "theme": "rambox-default-theme", + "theme": "hamsket-default-theme", /** * The list of required packages (with optional versions; default is "latest"). @@ -56,13 +56,13 @@ "sass": { /** * The root namespace to use when mapping *.scss files to classes in the - * sass/src and sass/var directories. For example, "Rambox.view.Foo" would - * map to "sass/src/view/Foo.scss". If we changed this to "Rambox.view" then + * sass/src and sass/var directories. For example, "Hamsket.view.Foo" would + * map to "sass/src/view/Foo.scss". If we changed this to "Hamsket.view" then * it would map to "sass/src/Foo.scss". To style classes outside the app's * root namespace, change this to "". Doing so would change the mapping of - * "Rambox.view.Foo" to "sass/src/Rambox/view/Foo.scss". + * "Hamsket.view.Foo" to "sass/src/Hamsket/view/Foo.scss". */ - "namespace": "Rambox" + "namespace": "Hamsket" }, /** @@ -277,7 +277,7 @@ "cache": [ "index.html", "app.js", - "resources/Rambox-all.css", + "resources/Hamsket-all.css", "resources/Icon.png", "resources/Icon.ico", "resources/IconTray.png", diff --git a/app/Application.js b/app/Application.js index 17eb6f9e..c9a6eac5 100644 --- a/app/Application.js +++ b/app/Application.js @@ -1,11 +1,11 @@ -Ext.define('Rambox.Application', { +Ext.define('Hamsket.Application', { extend: 'Ext.app.Application' - ,name: 'Rambox' + ,name: 'Hamsket' ,requires: [ - 'Rambox.ux.FileBackup' - ,'Rambox.util.MD5' + 'Hamsket.ux.FileBackup' + ,'Hamsket.util.MD5' ,'Ext.window.Toast' ,'Ext.util.Cookies' ] @@ -29,7 +29,7 @@ Ext.define('Rambox.Application', { Ext.util.Cookies.set('version', require('electron').remote.app.getVersion()); // Check for updates - if ( require('electron').remote.process.argv.indexOf('--without-update') === -1 ) Rambox.app.checkUpdate(true); + if ( require('electron').remote.process.argv.indexOf('--without-update') === -1 ) Hamsket.app.checkUpdate(true); // Mouse Wheel zooming document.addEventListener('mousewheel', function(e) { @@ -52,7 +52,7 @@ Ext.define('Rambox.Application', { ipc.send('setDontDisturb', localStorage.getItem('dontDisturb')); // We store it in config if ( localStorage.getItem('locked') ) { - console.info('Lock Rambox:', 'Enabled'); + console.info('Lock Hamsket:', 'Enabled'); Ext.cq1('app-main').getController().showLockWindow(); } @@ -64,15 +64,15 @@ Ext.define('Rambox.Application', { newValue = parseInt(newValue); if ( newValue > 0 ) { if ( Ext.cq1('app-main').getActiveTab().record ) { - document.title = 'Rambox-OS (' + Rambox.util.Format.formatNumber(newValue) + ') - '+Ext.cq1('app-main').getActiveTab().record.get('name'); + document.title = 'Hamsket (' + Hamsket.util.Format.formatNumber(newValue) + ') - '+Ext.cq1('app-main').getActiveTab().record.get('name'); } else { - document.title = 'Rambox-OS (' + Rambox.util.Format.formatNumber(newValue) + ')'; + document.title = 'Hamsket (' + Hamsket.util.Format.formatNumber(newValue) + ')'; } } else { if ( Ext.cq1('app-main') && Ext.cq1('app-main').getActiveTab().record ) { - document.title = 'Rambox-OS - '+Ext.cq1('app-main').getActiveTab().record.get('name'); + document.title = 'Hamsket - '+Ext.cq1('app-main').getActiveTab().record.get('name'); } else { - document.title = 'Rambox-OS'; + document.title = 'Hamsket'; } } } @@ -80,7 +80,7 @@ Ext.define('Rambox.Application', { ,checkUpdate(silence) { console.info('Checking for updates...'); Ext.Ajax.request({ - url: 'https://api.github.com/repos/TheGoddessInari/rambox/releases/latest' + url: 'https://api.github.com/repos/TheGoddessInari/hamsket/releases/latest' ,method: 'GET' ,success(response) { const json = JSON.parse(response.responseText); @@ -101,14 +101,14 @@ Ext.define('Rambox.Application', { ,{ xtype: 'button' ,text: locale['app.update[1]'] - ,href: process.platform === 'https://github.com/TheGoddessInari/rambox/releases/latest' + ,href: process.platform === 'https://github.com/TheGoddessInari/hamsket/releases/latest' } ,{ xtype: 'button' ,text: locale['app.update[2]'] ,ui: 'decline' ,tooltip: 'Click here to see more information about the new version.' - ,href: 'https://github.com/TheGoddessInari/rambox/releases/tag/'+updateVersion + ,href: 'https://github.com/TheGoddessInari/hamsket/releases/tag/'+updateVersion } ,'->' ,{ diff --git a/app/model/Readme.md b/app/model/Readme.md index 761f499a..347fb90f 100644 --- a/app/model/Readme.md +++ b/app/model/Readme.md @@ -13,7 +13,7 @@ Structure of a service entry: |type|Defines the type of the service. Must be one of `email` or `messaging`.|yes| |allow_popups|Set to `true` to allow popup windows for the service.|no| |note|Additional info to display when adding the service.|no| -|manual_notifications|Set to `true` to let Rambox-OS trigger notifications. Can be used for services that doesn't support browser notifications.|no| +|manual_notifications|Set to `true` to let Hamsket trigger notifications. Can be used for services that doesn't support browser notifications.|no| |js_unread|JavaScript code for setting the unread count (see below).|no| ### Setting the unread count @@ -22,4 +22,4 @@ While by default the unread count is determined by looking for ` (COUNT)` to the Code provided by `js_unread` will be injected into the service website. You can retrieve the unread count in this JavaScript code e.g. by parsing elements. -Set the unread count by calling `rambox.setUnreadCount(COUNT)` or clear it by calling `rambox.clearUnreadCount()`. +Set the unread count by calling `hamsket.setUnreadCount(COUNT)` or clear it by calling `hamsket.clearUnreadCount()`. diff --git a/app/model/Service.js b/app/model/Service.js index a381c5b3..98db2634 100644 --- a/app/model/Service.js +++ b/app/model/Service.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.model.Service', { +Ext.define('Hamsket.model.Service', { extend: 'Ext.data.Model' ,identifier: 'sequential' diff --git a/app/model/ServiceList.js b/app/model/ServiceList.js index 94714ed5..582b3abf 100644 --- a/app/model/ServiceList.js +++ b/app/model/ServiceList.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.model.ServiceList', { +Ext.define('Hamsket.model.ServiceList', { extend: 'Ext.data.Model' ,fields: [{ diff --git a/app/package-lock.json b/app/package-lock.json index f07470fd..eb7da743 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,5 +1,5 @@ { - "name": "Rambox", + "name": "Hamsket", "version": "0.5.18", "lockfileVersion": 1, "requires": true, diff --git a/app/package.json b/app/package.json index 9301ff1d..f94b1a17 100644 --- a/app/package.json +++ b/app/package.json @@ -1,8 +1,8 @@ { - "name": "Rambox", - "productName": "Rambox", - "version": "0.5.18", - "description": "Rambox", + "name": "hamsket", + "productName": "Hamsket", + "version": "0.6.0", + "description": "Hamsket", "main": "electron/main.js", "private": true, "engines": { @@ -10,14 +10,14 @@ }, "repository": { "type": "git", - "url": "https://github.com/TheGoddessInari/rambox.git" + "url": "https://github.com/TheGoddessInari/hamsket.git" }, "bugs": { - "url": "https://github.com/TheGoddessInari/rambox/issues" + "url": "https://github.com/TheGoddessInari/hamsket/issues" }, - "homepage": "https://github.com/TheGoddessInari/rambox", + "homepage": "https://github.com/TheGoddessInari/hamsket", "keywords": [ - "Rambox", + "Hamsket", "messaging", "app", "slack", diff --git a/app/store/Services.js b/app/store/Services.js index 2940b811..fe0a37fb 100644 --- a/app/store/Services.js +++ b/app/store/Services.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.store.Services', { +Ext.define('Hamsket.store.Services', { extend: 'Ext.data.Store' ,alias: 'store.services' @@ -6,7 +6,7 @@ Ext.define('Rambox.store.Services', { 'Ext.data.proxy.LocalStorage' ] - ,model: 'Rambox.model.Service' + ,model: 'Hamsket.model.Service' ,autoLoad: true ,autoSync: true @@ -65,7 +65,7 @@ Ext.define('Rambox.store.Services', { case 'last': Ext.cq1('app-main').setActiveTab(localStorage.getItem('last_active_service')); break; - case 'ramboxTab': + case 'hamsketTab': break; default: if ( Ext.getCmp('tab_'+config.default_service) ) Ext.cq1('app-main').setActiveTab('tab_'+config.default_service); diff --git a/app/store/ServicesList.js b/app/store/ServicesList.js index 7ac1e12c..5b51b171 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.store.ServicesList', { +Ext.define('Hamsket.store.ServicesList', { extend: 'Ext.data.Store' ,alias: 'store.serviceslist' @@ -6,7 +6,7 @@ Ext.define('Rambox.store.ServicesList', { 'Ext.data.proxy.LocalStorage' ] - ,model: 'Rambox.model.ServiceList' + ,model: 'Hamsket.model.ServiceList' ,proxy: { type: 'memory' @@ -28,7 +28,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[0]'] ,url: 'https://web.whatsapp.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const elements=document.querySelectorAll(".P6z4j, .unread");let count=0;for(let i of elements)0===i.querySelectorAll('*[data-icon="muted"]').length&&count++;rambox.updateBadge(count)};setInterval(checkUnread,1e3);let unregister_queue=[];navigator.serviceWorker.getRegistrations().then(registrations=>{for(const registration of registrations)unregister_queue.push(registration.unregister());return unregister_queue}).then(queue=>{}).catch(err=>{});` + ,js_unread: `let checkUnread=()=>{const elements=document.querySelectorAll(".P6z4j, .unread");let count=0;for(let i of elements)0===i.querySelectorAll('*[data-icon="muted"]').length&&count++;hamsket.updateBadge(count)};setInterval(checkUnread,1e3);let unregister_queue=[];navigator.serviceWorker.getRegistrations().then(registrations=>{for(const registration of registrations)unregister_queue.push(registration.unregister());return unregister_queue}).then(queue=>{}).catch(err=>{});` }, { id: 'slack' @@ -37,7 +37,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[1]'] ,url: 'https://___.slack.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const indirect=document.querySelectorAll(".p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)").length;let direct=0,badges=document.getElementsByClassName("p-channel_sidebar__badge");for(const badge of badges){const i=parseInt(badge.innerHTML);direct+=isNaN(i)?0:i}rambox.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const indirect=document.querySelectorAll(".p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)").length;let direct=0,badges=document.getElementsByClassName("p-channel_sidebar__badge");for(const badge of badges){const i=parseInt(badge.innerHTML);direct+=isNaN(i)?0:i}hamsket.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` }, { id: 'noysi' @@ -64,7 +64,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[4]'] ,url: 'https://web.skype.com/' ,type: 'messaging' - ,note: 'Text and Audio calls are supported only. Read more...' + ,note: 'Text and Audio calls are supported only. Read more...' }, { id: 'hangouts' @@ -75,7 +75,7 @@ Ext.define('Rambox.store.ServicesList', { ,type: 'messaging' ,titleBlink: true ,manual_notifications: true - ,js_unread: `let checkUnread=()=>{let myframe=document.getElementById("hangout-landing-chat").lastChild,mydocument=myframe.contentDocument||myframe.contentWindow.document;rambox.updateBadge(mydocument.body.getElementsByClassName("ee").length)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{let myframe=document.getElementById("hangout-landing-chat").lastChild,mydocument=myframe.contentDocument||myframe.contentWindow.document;hamsket.updateBadge(mydocument.body.getElementsByClassName("ee").length)};setInterval(checkUnread,3e3);` }, { id: 'hipchat' @@ -84,7 +84,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[6]'] ,url: 'https://___.hipchat.com/chat' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("hc-badge");let t=0;for(let i of e)t+=parseInt(i.innerHTML.trim());rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("hc-badge");let t=0;for(let i of e)t+=parseInt(i.innerHTML.trim());hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` ,custom_domain: true }, { @@ -94,7 +94,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[7]'] ,url: 'https://web.telegram.org/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("im_dialog_badge badge");let t=0;for(let i of e)i.classList.contains("im_dialog_badge_muted")||(t+=parseInt(i.innerHTML.trim()));rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("im_dialog_badge badge");let t=0;for(let i of e)i.classList.contains("im_dialog_badge_muted")||(t+=parseInt(i.innerHTML.trim()));hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` }, { id: 'wechat' @@ -112,7 +112,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://mail.google.com/mail/?labs=0' ,type: 'email' ,allow_popups: true - ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("aim")[0].textContent.split(":");rambox.updateBadge(parseInt(a[a.length-1].replace(/[^0-9]/g,"")))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("aim")[0].textContent.split(":");hamsket.updateBadge(parseInt(a[a.length-1].replace(/[^0-9]/g,"")))};setInterval(checkUnread,3e3);` ,note: 'To enable desktop notifications, you have to go to Settings inside Gmail. Read more...' }, { @@ -123,8 +123,8 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://inbox.google.com/?cid=imp' ,type: 'email' ,manual_notifications: true - ,js_unread: `let checkUnread=()=>{if(getComputedStyle(document.getElementsByClassName("sM")[0])["font-weight"] == "bold"){rambox.updateBadge(document.getElementsByClassName("ss").length)}};setInterval(checkUnread,3e3);` - ,note: 'Please be sure to sign out of Hangouts inside Inbox, as it causes problems. Read more...' + ,js_unread: `let checkUnread=()=>{if(getComputedStyle(document.getElementsByClassName("sM")[0])["font-weight"] == "bold"){hamsket.updateBadge(document.getElementsByClassName("ss").length)}};setInterval(checkUnread,3e3);` + ,note: 'Please be sure to sign out of Hangouts inside Inbox, as it causes problems. Read more...' }, { id: 'chatwork' @@ -143,7 +143,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://web.groupme.com/signin' ,type: 'messaging' ,note: 'To enable desktop notifications, you have to go to Options inside GroupMe. To count unread messages, be sure to be in Chats.' - ,js_unread: `let checkUnread=()=>{const a=document.querySelectorAll(".badge-count:not(.ng-hide)");let b=0;for(let i of a)b+=parseInt(i.innerHTML.trim());rambox.updateBadge(b)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=document.querySelectorAll(".badge-count:not(.ng-hide)");let b=0;for(let i of a)b+=parseInt(i.innerHTML.trim());hamsket.updateBadge(b)};setInterval(checkUnread,3e3);` }, { id: 'grape' @@ -160,7 +160,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[14]'] ,url: 'https://gitter.im/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("room-item__unread-indicator");let t=0;for(let i of e){const iTrim=parseInt(i.innerHTML.trim());t+=isNaN(iTrim)?0:parseInt(iTrim)}rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("room-item__unread-indicator");let t=0;for(let i of e){const iTrim=parseInt(i.innerHTML.trim());t+=isNaN(iTrim)?0:parseInt(iTrim)}hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` }, { id: 'steam' @@ -170,7 +170,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://steamcommunity.com/chat' ,type: 'messaging' ,note: 'To enable desktop notifications, you have to go to Options inside Steam Chat.' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("FriendMessageCount");let t=0;for(let i of e){const iTrim=parseInt(i.innerHTML.trim());t+=isNaN(iTrim)||"none"===i.parentNode.style.display?0:iTrim}rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("FriendMessageCount");let t=0;for(let i of e){const iTrim=parseInt(i.innerHTML.trim());t+=isNaN(iTrim)||"none"===i.parentNode.style.display?0:iTrim}hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` }, { id: 'discord' @@ -180,7 +180,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://discordapp.com/login' ,type: 'messaging' ,titleBlink: true - ,js_unread: `let getMentionCount=badges=>{let alerts=0;for(const badge of badges){const count=parseInt(badge.innerText,10);alerts+=count.isNaN?1:count}return alerts},getServerUnread=badges=>{let alerts=0;for(const badge of badges)alerts+="0.7"===badge.style.opacity?1:0;return alerts},checkUnread=()=>{const mentions=document.querySelectorAll(".lowerBadge-29hYVK > .numberBadge-2s8kKX");unread=document.getElementsByClassName("item-2hkk8m");const direct=getMentionCount(mentions);let indirect=getServerUnread(unread);indirect+=document.getElementsByClassName("unread-3zKkbm").length,rambox.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` + ,js_unread: `let getMentionCount=badges=>{let alerts=0;for(const badge of badges){const count=parseInt(badge.innerText,10);alerts+=count.isNaN?1:count}return alerts},getServerUnread=badges=>{let alerts=0;for(const badge of badges)alerts+="0.7"===badge.style.opacity?1:0;return alerts},checkUnread=()=>{const mentions=document.querySelectorAll(".lowerBadge-29hYVK > .numberBadge-2s8kKX");unread=document.getElementsByClassName("item-2hkk8m");const direct=getMentionCount(mentions);let indirect=getServerUnread(unread);indirect+=document.getElementsByClassName("unread-3zKkbm").length,hamsket.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` ,note: 'To enable desktop notifications, you have to go to Options inside Discord.' }, { @@ -191,7 +191,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://mail.live.com/' ,type: 'email' ,manual_notifications: true - ,js_unread: `let checkUnread=()=>{const a=$(".subfolders [role=treeitem]:first .treeNodeRowElement").siblings().last().text();rambox.updateBadge(""===a?0:parseInt(a))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=$(".subfolders [role=treeitem]:first .treeNodeRowElement").siblings().last().text();hamsket.updateBadge(""===a?0:parseInt(a))};setInterval(checkUnread,3e3);` }, { id: 'outlook365' @@ -201,7 +201,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://outlook.office.com/owa/' ,type: 'email' ,manual_notifications: true - ,js_unread: `let checkUnread=()=>{const a=$(".subfolders [role=treeitem]:first .treeNodeRowElement").siblings().last().text();rambox.updateBadge(""===a?0:parseInt(a))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=$(".subfolders [role=treeitem]:first .treeNodeRowElement").siblings().last().text();hamsket.updateBadge(""===a?0:parseInt(a))};setInterval(checkUnread,3e3);` }, { id: 'yahoo' @@ -252,7 +252,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[23]'] ,url: 'https://mail.missiveapp.com/login' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("unseen-count");let t=0;for(let i of e)t+=parseInt(i.innerHTML.trim());rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("unseen-count");let t=0;for(let i of e)t+=parseInt(i.innerHTML.trim());hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` }, { id: 'rocketchat' @@ -334,7 +334,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[34]'] ,url: 'https://app.mysms.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("unread");let t=0;for(let i of e)t+=parseInt(i.firstChild.innerHTML.trim());rambox.updateBadge(t)};"https://app.mysms.com/#login"===document.baseURI&&(document.getElementsByClassName("innerPanel")[0].rows[0].style.display="none",document.getElementsByClassName("innerPanel")[0].rows[1].cells[0].firstElementChild.style.display="none",document.getElementsByClassName("msisdnLoginPanel")[0].style.display="inline"),setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("unread");let t=0;for(let i of e)t+=parseInt(i.firstChild.innerHTML.trim());hamsket.updateBadge(t)};"https://app.mysms.com/#login"===document.baseURI&&(document.getElementsByClassName("innerPanel")[0].rows[0].style.display="none",document.getElementsByClassName("innerPanel")[0].rows[1].cells[0].firstElementChild.style.display="none",document.getElementsByClassName("msisdnLoginPanel")[0].style.display="inline"),setInterval(checkUnread,3e3);` ,note: 'You have to use this service by signing in with your mobile number.' }, { @@ -344,7 +344,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[35]'] ,url: 'https://web.icq.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{let total=0;const counters=document.getElementsByClassName("icq-msg-counter");for(let counter of counters)total+=parseInt("block"===counter.style.display?counter.innerHTML.trim():0);rambox.updateBadge(total)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{let total=0;const counters=document.getElementsByClassName("icq-msg-counter");for(let counter of counters)total+=parseInt("block"===counter.style.display?counter.innerHTML.trim():0);hamsket.updateBadge(total)};setInterval(checkUnread,3e3);` ,titleBlink: true }, { @@ -403,7 +403,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[43]'] ,url: '___' ,type: 'email' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("count");let t=0;for(let i of e)t+=parseInt(i.innerHTML.match(/[0-9]+/g));rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("count");let t=0;for(let i of e)t+=parseInt(i.innerHTML.match(/[0-9]+/g));hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` ,note: 'To enable desktop notifications and automatic mail check, you have to go to Options inside Horde.' }, { @@ -413,7 +413,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[44]'] ,url: '___' ,type: 'email' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("leftunseen");let t=0;for(let i of e)t+=parseInt(i.innerHTML);rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("leftunseen");let t=0;for(let i of e)t+=parseInt(i.innerHTML);hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` }, { id: 'zohoemail' @@ -432,7 +432,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[46]'] ,url: 'https://chat.zoho.___/' ,type: 'messaging' - ,js_unread: `NotifyByTitle.show=function(){},NotifyByTitle.start=function(){},NotifyByTitle.stop=function(){};let checkUnread=()=>{let t=0;$(".msgnotify").each(function(){let i=parseInt($(this).html());t+=isNaN(i)?0:i}),rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `NotifyByTitle.show=function(){},NotifyByTitle.start=function(){},NotifyByTitle.stop=function(){};let checkUnread=()=>{let t=0;$(".msgnotify").each(function(){let i=parseInt($(this).html());t+=isNaN(i)?0:i}),hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` ,note: 'Add .com the other relevant TLD into the URL field depending on your location.' }, { @@ -459,7 +459,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Yandex is a free webmail service with unlimited mail storage, protection from viruses and spam, access from web interface, etc.' ,url: 'https://mail.yandex.com/' ,type: 'email' - ,js_unread: `let checkUnread=()=>{const t=parseInt($(".mail-MessagesFilters-Item_unread .mail-LabelList-Item_count").html());rambox.updateBadge(isNaN(t)?0:t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const t=parseInt($(".mail-MessagesFilters-Item_unread .mail-LabelList-Item_count").html());hamsket.updateBadge(isNaN(t)?0:t)};setInterval(checkUnread,3e3);` }, { id: 'irccloud' @@ -468,7 +468,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'IRCCloud is a modern IRC client that keeps you connected, with none of the baggage.' ,url: 'https://www.irccloud.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{let t=0;const badges=document.querySelectorAll(".bufferBadges > .badge");for(let n of badges)t+=n.textContent?parseInt(n.textContent,10):0;rambox.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{let t=0;const badges=document.querySelectorAll(".bufferBadges > .badge");for(let n of badges)t+=n.textContent?parseInt(n.textContent,10):0;hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` ,custom_domain: true }, { @@ -478,7 +478,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Ryver is a team communication tool that organizes team collaboration, chats, files, and even emails into a single location, for any size team, for FREE.' ,url: 'https://___.ryver.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{rambox.updateBadge(parseInt(document.getElementsByClassName("scene-space-tab-button--flash").length))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{hamsket.updateBadge(parseInt(document.getElementsByClassName("scene-space-tab-button--flash").length))};setInterval(checkUnread,3e3);` }, { id: 'kiwi' @@ -487,7 +487,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'KiwiIRC makes Web IRC easy. A hand-crafted IRC client that you can enjoy. Designed to be used easily and freely.' ,url: 'https://kiwiirc.com/client' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{let a=0,b=!1;$(".activity").each(function(){a+=parseInt($(this).html())});const msgs=$(".panel[style*='display:block'] .msg");for(let msg of msgs)b?a++:$(this).hasClass("last_seen")&&(b=!0);rambox.updateBadge(a)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{let a=0,b=!1;$(".activity").each(function(){a+=parseInt($(this).html())});const msgs=$(".panel[style*='display:block'] .msg");for(let msg of msgs)b?a++:$(this).hasClass("last_seen")&&(b=!0);hamsket.updateBadge(a)};setInterval(checkUnread,3e3);` ,custom_domain: true }, /* TODO: fix kiwi */ @@ -498,7 +498,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'iCloud makes sure you always have the latest versions of your most important things — documents, photos, notes, contacts, and more — on all your devices. It can even help you locate a missing iPhone, iPad, iPod touch or Mac.' ,url: 'https://www.icloud.com/#mail' ,type: 'email' - ,js_unread: `let checkUnread=()=>{rambox.updateBadge("none"===document.querySelector(".current-app").querySelector(".sb-badge").style.display?0:parseInt(document.querySelector(".current-app").querySelector(".text").innerHTML.trim()))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{hamsket.updateBadge("none"===document.querySelector(".current-app").querySelector(".sb-badge").style.display?0:parseInt(document.querySelector(".current-app").querySelector(".text").innerHTML.trim()))};setInterval(checkUnread,3e3);` }, { id: 'rainloop' @@ -507,7 +507,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'RainLoop Webmail - Simple, modern & fast web-based email client.' ,url: '___' ,type: 'email' - ,js_unread: `let checkUnread=()=>{const t=document.querySelectorAll(".e-item .e-link:not(.hidden) .badge.pull-right.count");let e=0;for(let i of t){let iTrim=parseInt(i.textContent.trim());iTrim%1==0&&"block"===window.getComputedStyle(i).display&&(e+=parseInt(iTrim))}rambox.updateBadge(e)};setInterval(checkUnread,1e3);` + ,js_unread: `let checkUnread=()=>{const t=document.querySelectorAll(".e-item .e-link:not(.hidden) .badge.pull-right.count");let e=0;for(let i of t){let iTrim=parseInt(i.textContent.trim());iTrim%1==0&&"block"===window.getComputedStyle(i).display&&(e+=parseInt(iTrim))}hamsket.updateBadge(e)};setInterval(checkUnread,1e3);` }, { id: 'amium' @@ -532,7 +532,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Over 500 million people rely on Zimbra and enjoy enterprise-class open source email collaboration at the lowest TCO in the industry. Discover the benefits!' ,url: '___' ,type: 'email' - ,js_unread: `let checkUnread=()=>{rambox.updateBadge(appCtxt.getById(ZmFolder.ID_INBOX).numUnread)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{hamsket.updateBadge(appCtxt.getById(ZmFolder.ID_INBOX).numUnread)};setInterval(checkUnread,3e3);` }, { id: 'kaiwa' @@ -541,7 +541,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'A modern and Open Source Web client for XMPP.' ,url: '___' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{let count=0;for(let node of document.getElementsByClassName("unread"))node.innerHTML&&(count+=parseInt(node.innerHTML));rambox.updateBadge(count)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{let count=0;for(let node of document.getElementsByClassName("unread"))node.innerHTML&&(count+=parseInt(node.innerHTML));hamsket.updateBadge(count)};setInterval(checkUnread,3e3);` }, { id: 'movim' @@ -550,7 +550,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol.' ,url: 'https://___.movim.eu/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("color dark");let b=0;for(let i of a){const c=i.getElementsByClassName("counter");for(let ii of c){const iiTrim=parseInt(ii.textContent.trim());iiTrim%1==0&&(b+=iiTrim)}}rambox.updateBadge(b)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("color dark");let b=0;for(let i of a){const c=i.getElementsByClassName("counter");for(let ii of c){const iiTrim=parseInt(ii.textContent.trim());iiTrim%1==0&&(b+=iiTrim)}}hamsket.updateBadge(b)};setInterval(checkUnread,3e3);` ,custom_domain: true }, { @@ -568,7 +568,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Riot is a simple and elegant collaboration environment that gathers all of your different conversations and app integrations into one single app.' ,url: 'https://riot.im/app/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("mx_RoomTile_nameContainer");let b=0;for(let i of a){const c=i.getElementsByClassName("mx_RoomTile_badge");for(let ii of c){const iiTrim=parseInt(ii.textContent.trim());iiTrim%1==0&&(b+=iiTrim)}}rambox.updateBadge(b)};setInterval(checkUnread,1e3);` + ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("mx_RoomTile_nameContainer");let b=0;for(let i of a){const c=i.getElementsByClassName("mx_RoomTile_badge");for(let ii of c){const iiTrim=parseInt(ii.textContent.trim());iiTrim%1==0&&(b+=iiTrim)}}hamsket.updateBadge(b)};setInterval(checkUnread,1e3);` ,custom_domain: true }, { @@ -627,7 +627,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Flock is a free enterprise tool for business communication. Packed with tons of productivity features, Flock drives efficiency and boosts speed of execution.' ,url: 'https://web.flock.co/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("unreadMessages no-unread-mentions has-unread");let b=0;for(const i of a)b+=parseInt(i.innerHTML.trim());rambox.updateBadge(b)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("unreadMessages no-unread-mentions has-unread");let b=0;for(const i of a)b+=parseInt(i.innerHTML.trim());hamsket.updateBadge(b)};setInterval(checkUnread,3e3);` }, { @@ -653,7 +653,7 @@ Ext.define('Rambox.store.ServicesList', { description: 'Career-oriented social networking', url: 'https://www.xing.com/messages/conversations', type: 'messaging', - js_unread: `let checkUnread=()=>{let count=null;const notificationElement=document.querySelector('[data-update="unread_conversations"]');notificationElement&&"none"!==notificationElement.style.display&&(count=parseInt(notificationElement.textContent.trim(),10)),rambox.updateBadge(count)};setInterval(checkUnread,3e3);` + js_unread: `let checkUnread=()=>{let count=null;const notificationElement=document.querySelector('[data-update="unread_conversations"]');notificationElement&&"none"!==notificationElement.style.display&&(count=parseInt(notificationElement.textContent.trim(),10)),hamsket.updateBadge(count)};setInterval(checkUnread,3e3);` }, { id: 'threema', @@ -662,7 +662,7 @@ Ext.define('Rambox.store.ServicesList', { description: 'Seriously secure messaging', url: 'https://web.threema.ch/', type: 'messaging', - js_unread: `!function(){let unreadCount=0;function checkUnread(){let newUnread=0;try{const webClientService=angular.element(document.documentElement).injector().get("WebClientService"),conversations=webClientService.conversations.conversations;conversations.forEach(function(conversation){newUnread+=conversation.unreadCount})}catch(e){}newUnread!==unreadCount&&(unreadCount=newUnread,rambox.updateBadge(unreadCount))}setInterval(checkUnread,3e3),checkUnread()}();` + js_unread: `!function(){let unreadCount=0;function checkUnread(){let newUnread=0;try{const webClientService=angular.element(document.documentElement).injector().get("WebClientService"),conversations=webClientService.conversations.conversations;conversations.forEach(function(conversation){newUnread+=conversation.unreadCount})}catch(e){}newUnread!==unreadCount&&(unreadCount=newUnread,hamsket.updateBadge(unreadCount))}setInterval(checkUnread,3e3),checkUnread()}();` }, { id: 'workplace' @@ -695,7 +695,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Self-hosted web IRC client.' ,url: '___' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("badge highlight");let b=0;for(let i of a){const iTrim=parseInt(i.textContent.trim());iTrim%1==0&&(b+=iTrim)}rambox.updateBadge(b)};setInterval(checkUnread,1e3);` + ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("badge highlight");let b=0;for(let i of a){const iTrim=parseInt(i.textContent.trim());iTrim%1==0&&(b+=iTrim)}hamsket.updateBadge(b)};setInterval(checkUnread,1e3);` }, { id: 'linkedin' @@ -712,7 +712,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Zyptonite is the ultimate cyber secure communication tool for enterprise customers designed to address the need to securely communicate via voice, video, and chat, and transfer files and information across a global mobile workforce.' ,url: 'https://app.zyptonite.com/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("z-messages");let b=0;for(let i of a)b+=parseInt(i.innerHTML.trim());rambox.updateBadge(b)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("z-messages");let b=0;for(let i of a)b+=parseInt(i.innerHTML.trim());hamsket.updateBadge(b)};setInterval(checkUnread,3e3);` }, { id: 'fastmail' @@ -721,7 +721,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Secure, reliable email hosting for businesses, families and professionals. Premium email with no ads, excellent spam protection and rapid personal support.' ,url: 'https://www.fastmail.com/mail/' ,type: 'email' - ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("v-FolderSource-badge");let t=0;for(const i of e){const iTrim=parseInt(i.innerHTML.trim());t+=isNaN(iTrim)?0:iTrim}rambox.updateBadge(t)};setInterval(checkUnread,3e3),setTimeout(function(){O.WindowController.openExternal=function(a){let b=document.createElement("a");b.href=a,b.setAttribute("target","_blank"),b.click()}},3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.getElementsByClassName("v-FolderSource-badge");let t=0;for(const i of e){const iTrim=parseInt(i.innerHTML.trim());t+=isNaN(iTrim)?0:iTrim}hamsket.updateBadge(t)};setInterval(checkUnread,3e3),setTimeout(function(){O.WindowController.openExternal=function(a){let b=document.createElement("a");b.href=a,b.setAttribute("target","_blank"),b.click()}},3e3);` ,note: 'To enable desktop notifications, you have to go to Settings inside FastMail.' }, { @@ -765,7 +765,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Simple and Easy App for Messaging on VK.' ,url: 'https://m.vk.com/im' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{rambox.updateBadge(parseInt(document.getElementById("l_msg").innerText.replace(/[^0-9]+/g,"")))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{hamsket.updateBadge(parseInt(document.getElementById("l_msg").innerText.replace(/[^0-9]+/g,"")))};setInterval(checkUnread,3e3);` }, { id: 'mastodon' @@ -784,7 +784,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Say goodbye to email. Take your online collaboration to the next level with Teamwork Chat and keep all team discussions in one place. Chat to your team in a fun and informal way with Teamwork Chat.' ,url: 'https://___/chat' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{rambox.updateBadge(parseInt(document.getElementsByClassName("sidebar-notification-indicator").length>0?document.getElementsByClassName("sidebar-notification-indicator")[0].innerHTML:0))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{hamsket.updateBadge(parseInt(document.getElementsByClassName("sidebar-notification-indicator").length>0?document.getElementsByClassName("sidebar-notification-indicator")[0].innerHTML:0))};setInterval(checkUnread,3e3);` }, { id: 'clocktweets' @@ -801,7 +801,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Intercom makes it easy to communicate with your customers personally, at scale. Designed to feel like the messaging apps you use every day, Intercom lets you talk to consumers almost anywhere: inside your app, on your website, across social media and via email.' ,url: 'https://app.intercom.io' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("unread")[0];rambox.updateBadge(t=void 0===a?0:parseInt(a.textContent.replace(/[^0-9]/g,"")))};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const a=document.getElementsByClassName("unread")[0];hamsket.updateBadge(t=void 0===a?0:parseInt(a.textContent.replace(/[^0-9]/g,"")))};setInterval(checkUnread,3e3);` }, { id: 'allo' @@ -810,7 +810,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Google Allo is a smart messaging app that helps you say more and do more. Express yourself better with stickers, doodles, and HUGE emojis & text. Allo also brings you the Google Assistant.' ,url: 'https://allo.google.com/web' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const e=document.querySelectorAll(".hasUnread.conversation_item");let n=0;for(const i of e){const m=i.querySelector("#muted"),u=i.querySelector(".unreadCount"),c=parseInt(u.innerHTML.trim()),r=null===m||"none"===m.style.display?c:0;n+=isNaN(r)?0:r}rambox.updateBadge(n)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{const e=document.querySelectorAll(".hasUnread.conversation_item");let n=0;for(const i of e){const m=i.querySelector("#muted"),u=i.querySelector(".unreadCount"),c=parseInt(u.innerHTML.trim()),r=null===m||"none"===m.style.display?c:0;n+=isNaN(r)?0:r}hamsket.updateBadge(n)};setInterval(checkUnread,3e3);` }, { id: 'Kune' @@ -827,7 +827,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'A free phone number for life. Stay in touch from any screen. Use your free number to text, call, and check voicemail all from one app. Plus, Google Voice works on all of your devices so you can connect and communicate how you want.' ,url: 'https://voice.google.com' ,type: 'messaging' - ,js_unread: `let parseIntOrZero=e=>isNaN(parseInt(e))?0:parseInt(e),checkUnread=()=>{const e=document.querySelector(".msgCount");let n=0;e?n=parseIntOrZero(e.innerHTML.replace(/[() ]/gi,"")):["Messages","Calls","Voicemail"].forEach(function(e){const r=document.querySelector('gv-nav-tab[tooltip="+e+"] div[aria-label="Unread count"]');r&&(n+=parseIntOrZero(r.innerHTML))}),rambox.updateBadge(n)};setInterval(checkUnread,3e3);;` + ,js_unread: `let parseIntOrZero=e=>isNaN(parseInt(e))?0:parseInt(e),checkUnread=()=>{const e=document.querySelector(".msgCount");let n=0;e?n=parseIntOrZero(e.innerHTML.replace(/[() ]/gi,"")):["Messages","Calls","Voicemail"].forEach(function(e){const r=document.querySelector('gv-nav-tab[tooltip="+e+"] div[aria-label="Unread count"]');r&&(n+=parseIntOrZero(r.innerHTML))}),hamsket.updateBadge(n)};setInterval(checkUnread,3e3);;` }, { id: 'sandstorm' @@ -871,7 +871,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: 'Stride is the complete team communication solution with group messaging, video meetings, and built-in collaboration tools.' ,url: 'https://app.stride.com/___' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{let direct=0,indirect=0;const conversations=document.querySelectorAll(".conversations-nav .nav-item .activity-indicator");for(let n of conversations)n.classList.contains("has-count")?direct+=parseInt(n.innerHTML):indirect++;rambox.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{let direct=0,indirect=0;const conversations=document.querySelectorAll(".conversations-nav .nav-item .activity-indicator");for(let n of conversations)n.classList.contains("has-count")?direct+=parseInt(n.innerHTML):indirect++;hamsket.updateBadge(direct,indirect)};setInterval(checkUnread,3e3);` }, { id: 'hangoutschat' @@ -882,7 +882,7 @@ Ext.define('Rambox.store.ServicesList', { ,type: 'messaging' ,titleBlink: true ,manual_notifications: true - ,js_unread: `let checkUnread=()=>{rambox.updateBadge(document.querySelectorAll(".SSPGKf.EyyDtb.Q6oXP:not(.oCHqfe) .eM5l9e.FVKzAb").length)};setInterval(checkUnread,3e3);` + ,js_unread: `let checkUnread=()=>{hamsket.updateBadge(document.querySelectorAll(".SSPGKf.EyyDtb.Q6oXP:not(.oCHqfe) .eM5l9e.FVKzAb").length)};setInterval(checkUnread,3e3);` } ] }); diff --git a/app/util/Format.js b/app/util/Format.js index 432e1a28..caf75d09 100644 --- a/app/util/Format.js +++ b/app/util/Format.js @@ -1,7 +1,7 @@ /** * Created by vsxed on 7/11/2016. */ -Ext.define('Rambox.util.Format', { +Ext.define('Hamsket.util.Format', { singleton: true ,formatNumber(n) { diff --git a/app/util/IconLoader.js b/app/util/IconLoader.js index 8fd0fdbc..46566c28 100644 --- a/app/util/IconLoader.js +++ b/app/util/IconLoader.js @@ -1,7 +1,7 @@ /** * Singleton class to handle the custom icons for special services. */ -Ext.define('Rambox.util.IconLoader', { +Ext.define('Hamsket.util.IconLoader', { singleton: true, diff --git a/app/util/MD5.js b/app/util/MD5.js index 139c85db..4f854ceb 100644 --- a/app/util/MD5.js +++ b/app/util/MD5.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.util.MD5', { +Ext.define('Hamsket.util.MD5', { singleton: true ,encypt(s, raw, hexcase, chrsz) { diff --git a/app/util/Notifier.js b/app/util/Notifier.js index a7c36044..206d0665 100644 --- a/app/util/Notifier.js +++ b/app/util/Notifier.js @@ -2,7 +2,7 @@ /** * Singleton class for notification dispatching. */ -Ext.define('Rambox.util.Notifier', { +Ext.define('Hamsket.util.Notifier', { singleton: true, diff --git a/app/util/UnreadCounter.js b/app/util/UnreadCounter.js index 6433dba6..7a6f8f84 100644 --- a/app/util/UnreadCounter.js +++ b/app/util/UnreadCounter.js @@ -1,7 +1,7 @@ /** * Singleton class to handle the global unread counter. */ -Ext.define('Rambox.util.UnreadCounter', { +Ext.define('Hamsket.util.UnreadCounter', { singleton: true, @@ -28,7 +28,7 @@ Ext.define('Rambox.util.UnreadCounter', { * Sets the application's unread count to tracked unread count. */ function updateAppUnreadCounter() { - Rambox.app.setTotalNotifications(totalUnreadCount); + Hamsket.app.setTotalNotifications(totalUnreadCount); } /** diff --git a/app/ux/FileBackup.js b/app/ux/FileBackup.js index dcf6c570..1066bf71 100644 --- a/app/ux/FileBackup.js +++ b/app/ux/FileBackup.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.ux.FileBackup', { +Ext.define('Hamsket.ux.FileBackup', { singleton: true, constructor() { const me = this; @@ -7,7 +7,7 @@ Ext.define('Rambox.ux.FileBackup', { me.path = me.remote.require('path'); me.fs = me.remote.require('fs'); me.userPath = me.remote.app.getPath('userData'); - me.defaultFileName = 'rambox-backup.json'; + me.defaultFileName = 'hamsket-backup.json'; me.myDefaultPath = me.userPath + me.path.sep + me.defaultFileName; }, backupConfiguration(callback) { @@ -49,7 +49,7 @@ Ext.define('Rambox.ux.FileBackup', { if (services) { Ext.cq1('app-main').getController().removeAllServices(true, function() { Ext.each(services, function(s) { - const service = Ext.create('Rambox.model.Service', s); + const service = Ext.create('Hamsket.model.Service', s); service.save(); Ext.getStore('Services').add(service); }); diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 80dd8fe6..e6ff76b2 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -1,15 +1,15 @@ /** * Default config for all webviews created */ -Ext.define('Rambox.ux.WebView',{ +Ext.define('Hamsket.ux.WebView',{ extend: 'Ext.panel.Panel' ,xtype: 'webview' ,requires: [ - 'Rambox.util.Format' - ,'Rambox.util.Notifier' - ,'Rambox.util.UnreadCounter' - ,'Rambox.util.IconLoader' + 'Hamsket.util.Format' + ,'Hamsket.util.Notifier' + ,'Hamsket.util.UnreadCounter' + ,'Hamsket.util.IconLoader' ] // private @@ -170,7 +170,7 @@ Ext.define('Rambox.ux.WebView',{ ,webpreferences: 'sandbox: true' //,nativeWindowOpen=true //,disablewebsecurity: 'on' // Disabled because some services (Like Google Drive) dont work with this enabled ,userAgent: me.getUserAgent() - ,preload: './resources/js/rambox-service-api.js' + ,preload: './resources/js/hamsket-service-api.js' } }]; @@ -238,13 +238,13 @@ Ext.define('Rambox.ux.WebView',{ }); webview.addEventListener("did-finish-load", function(e) { - Rambox.app.setTotalServicesLoaded( Rambox.app.getTotalServicesLoaded() + 1 ); + Hamsket.app.setTotalServicesLoaded( Hamsket.app.getTotalServicesLoaded() + 1 ); // Apply saved zoom level me.setZoomLevel(me.record.get('zoomLevel')); // Set special icon for some service (like Slack) - Rambox.util.IconLoader.loadServiceIconUrl(me, webview); + Hamsket.util.IconLoader.loadServiceIconUrl(me, webview); }); // Open links in default browser @@ -345,7 +345,7 @@ Ext.define('Rambox.ux.WebView',{ ,style: 'width:100%;height:100%;' ,partition: me.getWebView().partition ,useragent: me.getUserAgent() - ,preload: './resources/js/rambox-modal-api.js' + ,preload: './resources/js/hamsket-modal-api.js' } } ,listeners: { @@ -402,7 +402,7 @@ Ext.define('Rambox.ux.WebView',{ console.log(custom_css); console.groupEnd(); let js_before = '{let mystyle=`'; - let js_after = '`,mycss=document.createElement("style");mycss.type="text/css",mycss.styleSheet?mycss.styleSheet.cssText=mystyle:mycss.appendChild(document.createTextNode(mystyle));let myDocHead=document.head;null===myDocHead||myDocHead.ramboxStyled||(myDocHead.appendChild(mycss),myDocHead.ramboxStyled=!0);let myframes=document.getElementsByTagName("iframe");for(let myframe of myframes){let mydocument,mydochead=(myframe.contentDocument||myframe.contentWindow.document).head;if(null!==mydochead&&!mydochead.ramboxStyled){let myclonedcss=mycss.cloneNode(deep=!0);mydochead.appendChild(myclonedcss),mydochead.ramboxStyled=!0}}}'; + let js_after = '`,mycss=document.createElement("style");mycss.type="text/css",mycss.styleSheet?mycss.styleSheet.cssText=mystyle:mycss.appendChild(document.createTextNode(mystyle));let myDocHead=document.head;null===myDocHead||myDocHead.hamsketStyled||(myDocHead.appendChild(mycss),myDocHead.hamsketStyled=!0);let myframes=document.getElementsByTagName("iframe");for(let myframe of myframes){let mydocument,mydochead=(myframe.contentDocument||myframe.contentWindow.document).head;if(null!==mydochead&&!mydochead.hamsketStyled){let myclonedcss=mycss.cloneNode(deep=!0);mydochead.appendChild(myclonedcss),mydochead.hamsketStyled=!0}}}'; webview.executeJavaScript(js_before + custom_css + js_after); } } @@ -513,22 +513,22 @@ Ext.define('Rambox.ux.WebView',{ webview.addEventListener('ipc-message', function(event) { const channel = event.channel; switch (channel) { - case 'rambox.setUnreadCount': + case 'hamsket.setUnreadCount': handleSetUnreadCount(event); break; - case 'rambox.clearUnreadCount': + case 'hamsket.clearUnreadCount': handleClearUnreadCount(event); break; - case 'rambox.updateBadge': + case 'hamsket.updateBadge': handleUpdateBadge(event); break; - case 'rambox.showWindowAndActivateTab': + case 'hamsket.showWindowAndActivateTab': showWindowAndActivateTab(event); break; } /** - * Handles 'rambox.clearUnreadCount' messages. + * Handles 'hamsket.clearUnreadCount' messages. * Clears the unread count. */ function handleClearUnreadCount() { @@ -538,7 +538,7 @@ Ext.define('Rambox.ux.WebView',{ } /** - * Handles 'rambox.setUnreadCount' messages. + * Handles 'hamsket.setUnreadCount' messages. * Sets the badge text if the event contains an integer * or a '•' (indicating non-zero but unknown number of unreads) as first argument. * @@ -606,12 +606,12 @@ Ext.define('Rambox.ux.WebView',{ const me = this; if ( !isNaN(newUnreadCount) && (function(x) { return (x | 0) === x; })(parseFloat(newUnreadCount)) && me.record.get('includeInGlobalUnreadCounter') === true) { - Rambox.util.UnreadCounter.setUnreadCountForService(me.record.get('id'), newUnreadCount); + Hamsket.util.UnreadCounter.setUnreadCountForService(me.record.get('id'), newUnreadCount); } else { - Rambox.util.UnreadCounter.clearUnreadCountForService(me.record.get('id')); + Hamsket.util.UnreadCounter.clearUnreadCountForService(me.record.get('id')); } - me.setTabBadgeText(Rambox.util.Format.formatNumber(newUnreadCount)); + me.setTabBadgeText(Hamsket.util.Format.formatNumber(newUnreadCount)); me.doManualNotification(parseInt(newUnreadCount)); } @@ -622,7 +622,7 @@ Ext.define('Rambox.ux.WebView',{ /** * Dispatch manual notification if - * • service doesn't have notifications, so Rambox does them + * • service doesn't have notifications, so Hamsket does them * • count increased * • not in dnd mode * • notifications enabled @@ -636,7 +636,7 @@ Ext.define('Rambox.ux.WebView',{ me.currentUnreadCount < count && me.record.get('notifications') && !JSON.parse(localStorage.getItem('dontDisturb'))) { - Rambox.util.Notifier.dispatchNotification(me, count); + Hamsket.util.Notifier.dispatchNotification(me, count); } me.currentUnreadCount = count; @@ -664,7 +664,7 @@ Ext.define('Rambox.ux.WebView',{ ,clearUnreadCounter() { const me = this; me.tab.setBadgeText(''); - Rambox.util.UnreadCounter.clearUnreadCountForService(me.record.get('id')); + Hamsket.util.UnreadCounter.clearUnreadCountForService(me.record.get('id')); } ,reloadService(btn) { @@ -831,7 +831,7 @@ Ext.define('Rambox.ux.WebView',{ // ` Chrome/${me.getChromeVersion()} Safari/537.36`; const default_ua = window.navigator.userAgent .replace(`Electron/${me.getElectronVersion()} `,'') - .replace(`Rambox/${me.getAppVersion()} `, ''); + .replace(`Hamsket/${me.getAppVersion()} `, ''); const service_ua = Ext.getStore('ServicesList').getById(me.record.get('type')).get('userAgent'); const ua = service_ua ? service_ua : default_ua; return ua; diff --git a/app/ux/mixin/Badge.js b/app/ux/mixin/Badge.js index caf6234a..0d2696ba 100644 --- a/app/ux/mixin/Badge.js +++ b/app/ux/mixin/Badge.js @@ -1,7 +1,7 @@ /** * Created by whiskeredwonder on 7/30/2015. */ -Ext.define('Rambox.ux.mixin.Badge', { +Ext.define('Hamsket.ux.mixin.Badge', { extend: 'Ext.Mixin', requires: [ diff --git a/app/view/add/Add.js b/app/view/add/Add.js index c69e2ccd..f27170cc 100644 --- a/app/view/add/Add.js +++ b/app/view/add/Add.js @@ -1,9 +1,9 @@ -Ext.define('Rambox.view.add.Add',{ +Ext.define('Hamsket.view.add.Add',{ extend: 'Ext.window.Window' ,requires: [ - 'Rambox.view.add.AddController' - ,'Rambox.view.add.AddModel' + 'Hamsket.view.add.AddController' + ,'Hamsket.view.add.AddModel' ] ,controller: 'add-add' diff --git a/app/view/add/AddController.js b/app/view/add/AddController.js index ae613973..5f47e9be 100644 --- a/app/view/add/AddController.js +++ b/app/view/add/AddController.js @@ -1,9 +1,9 @@ -Ext.define('Rambox.view.add.AddController', { +Ext.define('Hamsket.view.add.AddController', { extend: 'Ext.app.ViewController', alias: 'controller.add-add', requires: [ - 'Rambox.util.UnreadCounter' + 'Hamsket.util.UnreadCounter' ], doCancel( btn ) { @@ -68,7 +68,7 @@ Ext.define('Rambox.view.add.AddController', { } // Apply the JS Code of the Tab if ( win.down('textarea').isDirty() ) { - Ext.Msg.confirm(locale['app.window[8]'].toUpperCase(), 'Rambox-OS needs to reload the service to execute the new JavaScript code. Do you want to do it now?', function( btnId ) { + Ext.Msg.confirm(locale['app.window[8]'].toUpperCase(), 'Hamsket needs to reload the service to execute the new JavaScript code. Do you want to do it now?', function( btnId ) { if ( btnId === 'yes' ) view.reloadService(); }); } @@ -83,7 +83,7 @@ Ext.define('Rambox.view.add.AddController', { formValues.url = formValues.cycleValue === '1' ? win.record.get('url').replace('___', formValues.url) : formValues.url; } - const service = Ext.create('Rambox.model.Service', { + const service = Ext.create('Hamsket.model.Service', { type: win.record.get('id') ,logo: formValues.logo ,name: formValues.serviceName diff --git a/app/view/add/AddModel.js b/app/view/add/AddModel.js index 7dd56ad9..f2c3097f 100644 --- a/app/view/add/AddModel.js +++ b/app/view/add/AddModel.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.view.add.AddModel', { +Ext.define('Hamsket.view.add.AddModel', { extend: 'Ext.app.ViewModel' ,alias: 'viewmodel.add-add' }); diff --git a/app/view/main/About.js b/app/view/main/About.js index f9cab0f3..76da8bc0 100644 --- a/app/view/main/About.js +++ b/app/view/main/About.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.view.main.About', { +Ext.define('Hamsket.view.main.About', { extend: 'Ext.window.Window' ,xtype: 'about' ,title: locale['app.about[0]'] @@ -32,8 +32,10 @@ Ext.define('Rambox.view.main.About', { ,'
Node: {node}
' ,'
BuildVersion: {buildversion}
' ,'
' - ,'' + ,'' ,'
' - ,'
'+locale['app.about[4]']+' TheGoddessInari. Original version by Ramiro Saenz.
' + ,'
'+locale['app.about[4]']+' TheGoddessInari.' + ,'
' + , 'Original version by Ramiro Saenz.
' ] }); diff --git a/app/view/main/Main.js b/app/view/main/Main.js index a554749d..daa34e4e 100644 --- a/app/view/main/Main.js +++ b/app/view/main/Main.js @@ -1,11 +1,11 @@ -Ext.define('Rambox.view.main.Main', { +Ext.define('Hamsket.view.main.Main', { extend: 'Ext.tab.Panel' ,requires: [ - 'Rambox.view.main.MainController' - ,'Rambox.view.main.MainModel' - ,'Rambox.ux.WebView' - ,'Rambox.ux.mixin.Badge' - ,'Rambox.view.add.Add' + 'Hamsket.view.main.MainController' + ,'Hamsket.view.main.MainModel' + ,'Hamsket.ux.WebView' + ,'Hamsket.ux.mixin.Badge' + ,'Hamsket.view.add.Add' ,'Ext.ux.TabReorderer' ] @@ -31,13 +31,13 @@ Ext.define('Rambox.view.main.Main', { ,html: '' ,baseCls: '' ,tooltip: locale['app.main[25]'] - ,href: 'https://www.gofundme.com/rambox-os' + ,href: 'https://www.gofundme.com/Hamsket' }] } ,items: [ { icon: 'resources/IconTray@2x.png' - ,id: 'ramboxTab' + ,id: 'hamsketTab' ,closable: false ,reorderable: false ,autoScroll: true @@ -249,8 +249,8 @@ Ext.define('Rambox.view.main.Main', { glyph: 'XF023@FontAwesome' ,text: locale['app.main[19]'] ,tooltip: locale['app.main[20]']+'
'+locale['app.main[18]']+': Alt+F2' - ,handler: 'lockRambox' - ,id: 'lockRamboxBtn' + ,handler: 'lockHamsket' + ,id: 'lockHamsketBtn' } ,'->' ,{ @@ -258,16 +258,16 @@ Ext.define('Rambox.view.main.Main', { ,glyph: 'XF0C7@FontAwesome' ,id: 'backupBtn' ,tooltip: 'Backup services to disk' - ,scope: Rambox.ux.FileBackup - ,handler: Rambox.ux.FileBackup.backupConfiguration + ,scope: Hamsket.ux.FileBackup + ,handler: Hamsket.ux.FileBackup.backupConfiguration } ,{ text: 'Restore' ,glyph: 'XF115@FontAwesome' ,id: 'restoreBtn' ,tooltip: 'Restore services from disk' - ,scope: Rambox.ux.FileBackup - ,handler: Rambox.ux.FileBackup.restoreConfiguration + ,scope: Hamsket.ux.FileBackup + ,handler: Hamsket.ux.FileBackup.restoreConfiguration } ,{ tooltip: locale['preferences[0]'] @@ -288,14 +288,14 @@ Ext.define('Rambox.view.main.Main', { ,{ text: locale['app.main[25]'] ,glyph: 'XF21E@FontAwesome' - ,href: 'https://www.gofundme.com/rambox-os' + ,href: 'https://www.gofundme.com/Hamsket' } ] /* TODO: Translation ,{ text: 'Translation' ,glyph: 'XF0AC@FontAwesome' - ,href: 'https://crowdin.com/project/rambox/invite' + ,href: 'https://crowdin.com/project/hamsket/invite' } ]*/ } @@ -323,7 +323,7 @@ Ext.define('Rambox.view.main.Main', { } ,{ glyph: 'XF09B@FontAwesome' - ,href: 'https://www.github.com/TheGoddessInari/rambox' + ,href: 'https://www.github.com/TheGoddessInari/hamsket' } ] } diff --git a/app/view/main/MainController.js b/app/view/main/MainController.js index 595925fe..759cf964 100644 --- a/app/view/main/MainController.js +++ b/app/view/main/MainController.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.view.main.MainController', { +Ext.define('Hamsket.view.main.MainController', { extend: 'Ext.app.ViewController' ,alias: 'controller.main' @@ -27,11 +27,11 @@ Ext.define('Rambox.view.main.MainController', { localStorage.setItem('last_active_service', newTab.id); - if ( newTab.id === 'ramboxTab' ) { - if ( Rambox.app.getTotalNotifications() > 0 ) { - document.title = 'Rambox-OS ('+ Rambox.app.getTotalNotifications() +')'; + if ( newTab.id === 'hamsketTab' ) { + if ( Hamsket.app.getTotalNotifications() > 0 ) { + document.title = 'Hamsket ('+ Hamsket.app.getTotalNotifications() +')'; } else { - document.title = 'Rambox-OS'; + document.title = 'Hamsket'; } return; } @@ -44,15 +44,15 @@ Ext.define('Rambox.view.main.MainController', { if ( webview ) webview.focus(); // Update the main window so it includes the active tab title. - if ( Rambox.app.getTotalNotifications() > 0 ) { - document.title = 'Rambox-OS ('+ Rambox.app.getTotalNotifications() +') - ' + newTab.record.get('name'); + if ( Hamsket.app.getTotalNotifications() > 0 ) { + document.title = 'Hamsket ('+ Hamsket.app.getTotalNotifications() +') - ' + newTab.record.get('name'); } else { - document.title = 'Rambox-OS - ' + newTab.record.get('name'); + document.title = 'Hamsket - ' + newTab.record.get('name'); } } ,updatePositions(tabPanel, tab) { - if ( tab.id === 'ramboxTab' || tab.id === 'tbfill' ) return true; + if ( tab.id === 'hamsketTab' || tab.id === 'tbfill' ) return true; console.log('Updating Tabs positions...'); @@ -60,7 +60,7 @@ Ext.define('Rambox.view.main.MainController', { let align = 'left'; store.suspendEvent('childmove'); Ext.each(tabPanel.items.items, function(t, i) { - if ( t.id !== 'ramboxTab' && t.id !== 'tbfill' && t.record.get('enabled') ) { + if ( t.id !== 'hamsketTab' && t.id !== 'tbfill' && t.record.get('enabled') ) { const rec = store.getById(t.record.get('id')); if ( align === 'right' ) i--; rec.set('align', align); @@ -122,7 +122,7 @@ Ext.define('Rambox.view.main.MainController', { } ,onNewServiceSelect( view, record, item, index, e ) { - Ext.create('Rambox.view.add.Add', { + Ext.create('Hamsket.view.add.Add', { record: record }); } @@ -152,7 +152,7 @@ Ext.define('Rambox.view.main.MainController', { } const config = ipc.sendSync('getConfig'); - if ( config.default_service === rec.get('id') ) ipc.send('setConfig', Ext.apply(config, { default_service: 'ramboxTab' })); + if ( config.default_service === rec.get('id') ) ipc.send('setConfig', Ext.apply(config, { default_service: 'hamsketTab' })); function clearData(webview, tab, resolve) { webview.getWebContents().clearHistory(); @@ -188,7 +188,7 @@ Ext.define('Rambox.view.main.MainController', { const me = this; // Clear counter for unread messaging - document.title = 'Rambox-OS'; + document.title = 'Hamsket'; const store = Ext.getStore('Services'); @@ -226,14 +226,14 @@ Ext.define('Rambox.view.main.MainController', { .finally(function() { store.resumeEvent('childmove'); store.resumeEvent('remove'); - document.title = 'Rambox-OS'; + document.title = 'Hamsket'; }); }); } } ,configureService( gridView, rowIndex, colIndex, col, e, rec, rowEl ) { - Ext.create('Rambox.view.add.Add', { + Ext.create('Hamsket.view.add.Add', { record: rec ,service: Ext.getStore('ServicesList').getById(rec.get('type')) ,edit: true @@ -331,7 +331,7 @@ Ext.define('Rambox.view.main.MainController', { }); } - ,lockRambox(btn) { + ,lockHamsket(btn) { const me = this; if ( ipc.sendSync('getConfig').master_password ) { @@ -357,12 +357,12 @@ Ext.define('Rambox.view.main.MainController', { ,message: locale['app.window[25]'] ,icon: Ext.Msg.WARNING ,buttons: Ext.Msg.OK - ,fn: me.lockRambox + ,fn: me.lockHamsket }); return false; } - setLock(Rambox.util.MD5.encypt(text)); + setLock(Hamsket.util.MD5.encypt(text)); } }); msgbox2.textField.inputEl.dom.type = 'password'; @@ -372,7 +372,7 @@ Ext.define('Rambox.view.main.MainController', { } function setLock(text) { - console.info('Lock Rambox:', 'Enabled'); + console.info('Lock Hamsket:', 'Enabled'); // Save encrypted password in localStorage to show locked when app is reopen localStorage.setItem('locked', text); @@ -388,8 +388,8 @@ Ext.define('Rambox.view.main.MainController', { const me = this; const validateFn = function() { - if ( localStorage.getItem('locked') === Rambox.util.MD5.encypt(winLock.down('textfield').getValue()) ) { - console.info('Lock Rambox:', 'Disabled'); + if ( localStorage.getItem('locked') === Hamsket.util.MD5.encypt(winLock.down('textfield').getValue()) ) { + console.info('Lock Hamsket:', 'Disabled'); localStorage.removeItem('locked'); winLock.close(); me.lookupReference('disturbBtn').setPressed(false); @@ -466,7 +466,7 @@ Ext.define('Rambox.view.main.MainController', { ,openPreferences( btn ) { const me = this; - Ext.create('Rambox.view.preferences.Preferences').show(); + Ext.create('Hamsket.view.preferences.Preferences').show(); } }); diff --git a/app/view/main/MainModel.js b/app/view/main/MainModel.js index 845fcea6..5874f637 100644 --- a/app/view/main/MainModel.js +++ b/app/view/main/MainModel.js @@ -1,10 +1,10 @@ -Ext.define('Rambox.view.main.MainModel', { +Ext.define('Hamsket.view.main.MainModel', { extend: 'Ext.app.ViewModel' ,alias: 'viewmodel.main' ,data: { - name: 'Rambox' + name: 'Hamsket' } }); diff --git a/app/view/preferences/Preferences.js b/app/view/preferences/Preferences.js index 174c4c17..f3567341 100644 --- a/app/view/preferences/Preferences.js +++ b/app/view/preferences/Preferences.js @@ -1,10 +1,10 @@ -Ext.define('Rambox.view.preferences.Preferences',{ +Ext.define('Hamsket.view.preferences.Preferences',{ extend: 'Ext.window.Window' ,xtype: 'preferences' ,requires: [ - 'Rambox.view.preferences.PreferencesController' - ,'Rambox.view.preferences.PreferencesModel' + 'Hamsket.view.preferences.PreferencesController' + ,'Hamsket.view.preferences.PreferencesModel' ,'Ext.form.field.ComboBox' ,'Ext.form.field.Checkbox' ] @@ -39,7 +39,7 @@ Ext.define('Rambox.view.preferences.Preferences',{ const config = ipc.sendSync('getConfig'); let defaultServiceOptions = []; - defaultServiceOptions.push({ value: 'ramboxTab', label: 'Rambox-OS Tab' }); + defaultServiceOptions.push({ value: 'hamsketTab', label: 'Hamsket Tab' }); defaultServiceOptions.push({ value: 'last', label: 'Last Active Service' }); Ext.getStore('Services').each(function(rec) { defaultServiceOptions.push({ @@ -117,7 +117,7 @@ Ext.define('Rambox.view.preferences.Preferences',{ xtype: 'button' ,text: 'Help us Translate' ,style: 'border-top-left-radius:0;border-bottom-left-radius:0;' - ,href: 'https://crowdin.com/project/rambox/invite' + ,href: 'https://crowdin.com/project/hamsket/invite' } ] } @@ -170,7 +170,7 @@ Ext.define('Rambox.view.preferences.Preferences',{ ,{ xtype: 'combo' ,name: 'default_service' - ,fieldLabel: 'Default service to display when Rambox-OS starts' + ,fieldLabel: 'Default service to display when Hamsket starts' ,labelAlign: 'top' //,width: 380 //,labelWidth: 105 @@ -298,7 +298,7 @@ Ext.define('Rambox.view.preferences.Preferences',{ } ,{ xtype: 'fieldset' - ,title: 'Proxy (needs to relaunch) - Free Proxy Servers' + ,title: 'Proxy (needs to relaunch) - Free Proxy Servers' ,collapsed: !config.proxy ,checkboxToggle: true ,checkboxName: 'proxy' diff --git a/app/view/preferences/PreferencesController.js b/app/view/preferences/PreferencesController.js index ec99e38c..f97ab8e9 100644 --- a/app/view/preferences/PreferencesController.js +++ b/app/view/preferences/PreferencesController.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.view.preferences.PreferencesController', { +Ext.define('Hamsket.view.preferences.PreferencesController', { extend: 'Ext.app.ViewController' ,alias: 'controller.preferences-preferences' @@ -26,7 +26,7 @@ Ext.define('Rambox.view.preferences.PreferencesController', { Ext.isEmpty(values.master_password1) === false && Ext.isEmpty(values.master_password2) === false) { - values.master_password = Rambox.util.MD5.encypt(values.master_password1); + values.master_password = Hamsket.util.MD5.encypt(values.master_password1); delete values.master_password1; delete values.master_password2; } @@ -48,7 +48,7 @@ Ext.define('Rambox.view.preferences.PreferencesController', { // Locale if ( values.locale !== ipc.sendSync('getConfig').locale ) { localStorage.setItem('locale', values.locale); - Ext.Msg.confirm('Action required', 'To change the language of Rambox, you need to reload the app. Do you want to do it now?', function(btnId) { + Ext.Msg.confirm('Action required', 'To change the language of Hamsket, you need to reload the app. Do you want to do it now?', function(btnId) { if ( btnId === 'yes' ) ipc.send('relaunchApp'); }); } diff --git a/app/view/preferences/PreferencesModel.js b/app/view/preferences/PreferencesModel.js index e9ae12b9..1b5984a9 100644 --- a/app/view/preferences/PreferencesModel.js +++ b/app/view/preferences/PreferencesModel.js @@ -1,4 +1,4 @@ -Ext.define('Rambox.view.preferences.PreferencesModel', { +Ext.define('Hamsket.view.preferences.PreferencesModel', { extend: 'Ext.app.ViewModel' ,alias: 'viewmodel.preferences-preferences' diff --git a/build.xml b/build.xml index 8268c933..376764f0 100644 --- a/build.xml +++ b/build.xml @@ -1,5 +1,5 @@ - + diff --git a/masterpassword.html b/masterpassword.html index 23028260..302a4159 100644 --- a/masterpassword.html +++ b/masterpassword.html @@ -5,7 +5,7 @@ - Rambox-OS + Hamsket @@ -24,7 +24,7 @@