Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
069cb1d5c2 | 8 years ago |
@ -1,27 +1,32 @@
|
||||
# Contributing |
||||
|
||||
## Submitting issues |
||||
|
||||
- Please search the existing issues first, it's likely that your issue was already reported or even fixed. |
||||
* Please search the existing issues first, it's likely that your issue was already reported or even fixed. |
||||
- Go to "Issues" and type any word in the top search/command bar. |
||||
- Consider to search on closed issues. To do that just remove "is:open" from the search field. |
||||
- More info on [search syntax within github](https://help.github.com/articles/searching-issues). |
||||
- Report the issue using our [template](https://github.com/saenzramiro/rambox/blob/master/.github/ISSUE_TEMPLATE.md), it includes all the information we need to track down the issue. |
||||
- More info on [search syntax within github](https://help.github.com/articles/searching-issues) |
||||
* Report the issue using our [template][template], it includes all the information we need to track down the issue. |
||||
|
||||
Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. |
||||
|
||||
[template]: https://github.com/saenzramiro/rambox/blob/master/.github/ISSUE_TEMPLATE.md |
||||
|
||||
## Share your Custom Services |
||||
|
||||
If you consider there are other users that can use your Custom Service, we have a repo for this: [Rambox Services Contrib](https://github.com/saenzramiro/rambox-services-contrib) |
||||
If you consider there are other users that can use your Custom Service, we have a repo for this: [Rambox Services Contrib][rambox-services-contrib]. |
||||
|
||||
[rambox-services-contrib]: https://github.com/saenzramiro/rambox-services-contrib |
||||
|
||||
## Ask for help |
||||
|
||||
We have a great community in [Slack (Prefered)](https://rambox.typeform.com/to/t7jc4C) or [Gitter](https://gitter.im/saenzramiro/rambox) (Gitter channel is mirroring into Slack `general` room) that can help you with any doubt or problem. |
||||
We have a great community in [Gitter][gitter] that can help you with any doubt or problem. |
||||
|
||||
[gitter]: https://gitter.im/saenzramiro/rambox |
||||
|
||||
## Contributing to Source Code |
||||
|
||||
Feel free to create pull requests to help us offer a great and complete software. :wink: |
||||
|
||||
## Translations |
||||
Please submit translations via [Transifex][transifex]. |
||||
|
||||
Please submit translations via [Crowdin](https://crowdin.com/project/rambox/). |
||||
[transifex]: https://www.transifex.com/rambox/rambox-app/ |
||||
|
@ -1,3 +0,0 @@
|
||||
# These are supported funding model platforms |
||||
|
||||
custom: ['https://rambox.app/donate.html'] |
@ -1,25 +0,0 @@
|
||||
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome |
||||
# Comment to be posted to on first time issues |
||||
newIssueWelcomeComment: > |
||||
Thanks for opening your first issue here! Be sure to follow the issue template! |
||||
|
||||
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome |
||||
# Comment to be posted to on PRs from first time contributors in your repository |
||||
newPRWelcomeComment: > |
||||
Thanks for opening this pull request! Please check out our contributing guidelines. |
||||
|
||||
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge |
||||
# Comment to be posted to on pull requests merged by a first time user |
||||
firstPRMergeComment: > |
||||
Congrats on merging your first pull request! We here at Rambox are proud of you! |
||||
|
||||
|
||||
|
||||
# Configuration for request-info - https://github.com/behaviorbot/request-info |
||||
|
||||
# *Required* Comment to reply with |
||||
requestInfoReplyComment: > |
||||
We would appreciate it if you could provide us with more info about this issue/pr! |
||||
|
||||
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given |
||||
requestInfoLabelToAdd: more-information-needed |
@ -1,35 +0,0 @@
|
||||
# Configuration for lock-threads - https://github.com/dessant/lock-threads |
||||
|
||||
# Number of days of inactivity before a closed issue or pull request is locked |
||||
daysUntilLock: 30 |
||||
|
||||
# Issues and pull requests with these labels will not be locked. Set to `[]` to disable |
||||
exemptLabels: |
||||
- archive |
||||
|
||||
# Label to add before locking, such as `outdated`. Set to `false` to disable |
||||
lockLabel: false |
||||
|
||||
# Comment to post before locking. Set to `false` to disable |
||||
lockComment: > |
||||
This thread has been automatically locked since there has not been |
||||
any recent activity after it was closed. Please open a new issue for |
||||
related bugs. |
||||
|
||||
# Assign `resolved` as the reason for locking. Set to `false` to disable |
||||
setLockReason: true |
||||
|
||||
# Limit to only `issues` or `pulls` |
||||
# only: issues |
||||
|
||||
# Optionally, specify configuration settings just for `issues` or `pulls` |
||||
# issues: |
||||
# exemptLabels: |
||||
# - help-wanted |
||||
# lockLabel: outdated |
||||
|
||||
# pulls: |
||||
# daysUntilLock: 30 |
||||
|
||||
# Repository to extend settings from |
||||
# _extends: repo |
@ -1,14 +0,0 @@
|
||||
# Configuration for probot-no-response - https://github.com/probot/no-response |
||||
|
||||
# Number of days of inactivity before an Issue is closed for lack of response |
||||
daysUntilClose: 14 |
||||
# Label requiring a response |
||||
responseRequiredLabel: more-information-needed |
||||
# Comment to post when closing an Issue for lack of response. Set to `false` to disable |
||||
closeComment: > |
||||
This issue has been automatically closed because there has been no response |
||||
to our request for more information from the original author. With only the |
||||
information that is currently in the issue, we don't have enough information |
||||
to take action. Please reach out if you have or find the answers we need so |
||||
that we can investigate further. |
||||
|
@ -1,26 +0,0 @@
|
||||
# Number of days of inactivity before an issue becomes stale |
||||
daysUntilStale: 60 |
||||
# Number of days of inactivity before a stale issue is closed |
||||
daysUntilClose: 7 |
||||
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) |
||||
onlyLabels: |
||||
- more-information-needed |
||||
# Issues with these labels will never be considered stale |
||||
exemptLabels: |
||||
- bug |
||||
- to do |
||||
- enhancement |
||||
- feature request |
||||
- in progress |
||||
- investigate |
||||
# Label to use when marking an issue as stale |
||||
staleLabel: stale |
||||
# Comment to post when marking an issue as stale. Set to `false` to disable |
||||
markComment: > |
||||
This issue has been automatically marked as stale because it has not had |
||||
recent activity. It will be closed if no further activity occurs. Thank you |
||||
for your contributions. |
||||
# Comment to post when closing a stale issue. Set to `false` to disable |
||||
closeComment: > |
||||
This issue has been automatically closed since there has not been |
||||
any recent activity. Please open a new issue for related bugs. |
@ -1,49 +1,81 @@
|
||||
matrix: |
||||
include: |
||||
- os: osx |
||||
osx_image: xcode12.4 |
||||
language: node_js |
||||
node_js: "14.16.1" |
||||
env: |
||||
- ELECTRON_CACHE=$HOME/.cache/electron |
||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder |
||||
sudo: required |
||||
language: node_js |
||||
node_js: |
||||
- "4" |
||||
|
||||
- os: linux |
||||
sudo: required |
||||
services: docker |
||||
language: generic |
||||
branches: |
||||
only: |
||||
- master |
||||
|
||||
os: |
||||
- linux |
||||
- osx |
||||
|
||||
cache: |
||||
directories: |
||||
- node_modules |
||||
- $HOME/.cache/electron |
||||
- $HOME/.cache/electron-builder |
||||
- node_modules |
||||
- $HOME/.electron |
||||
|
||||
addons: |
||||
apt: |
||||
sources: |
||||
- ubuntu-toolchain-r-test |
||||
packages: |
||||
- g++-4.8 |
||||
|
||||
before_install: |
||||
- | |
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then |
||||
mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1 |
||||
export PATH="/tmp/git-lfs:$PATH" |
||||
# native dependencies |
||||
- if [ $TRAVIS_OS_NAME == "linux" ]; then |
||||
sudo apt-get update -qq; |
||||
sudo apt-get install -qq libxml2-dev; |
||||
sudo apt-get install -qq libappindicator1; |
||||
sudo apt-get install -qq rpm; |
||||
fi |
||||
install: |
||||
- git config --global core.autocrlf input |
||||
- git reset --hard HEAD |
||||
- npm run sencha:clean |
||||
- git clone https://github.com/saenzramiro/rambox-build.git $TRAVIS_BUILD_DIR/build/production/Rambox/ |
||||
before_script: |
||||
- git lfs pull |
||||
- npm install |
||||
- npm uninstall electron-prebuilt |
||||
- npm i electron@$ELECTRON |
||||
- npm --prefix $TRAVIS_BUILD_DIR/build/production/Rambox/ install $TRAVIS_BUILD_DIR/build/production/Rambox/ |
||||
script: |
||||
- | |
||||
if [ "$TRAVIS_OS_NAME" == "linux" ]; then |
||||
docker run --rm -ti \ |
||||
--env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ |
||||
-v ${PWD}/build/production/Rambox/:/project \ |
||||
-v ~/.cache/electron:/root/.cache/electron \ |
||||
-v ~/.cache/electron-builder:/root/.cache/electron-builder \ |
||||
electronuserland/builder \ |
||||
/bin/bash -c "npm i && npm run build:linux" |
||||
else |
||||
cd $TRAVIS_BUILD_DIR/build/production/Rambox/ |
||||
npm i |
||||
npm i cli-truncate |
||||
npm run build:osx |
||||
fi |
||||
- echo $TRAVIS_OS_NAME |
||||
- node --version |
||||
- npm --version |
||||
- npm run build:$TRAVIS_OS_NAME |
||||
|
||||
deploy: |
||||
provider: releases |
||||
api_key: |
||||
secure: F7z4j9xzhpVyfovrf33jbVdW9dwgpIgbn85dxe8y/kZbQ9sAVU8LzoBZ3PlfeXmoV5CnSUa5j/fe8BmPKiG31kgAH7cktsCOgyOLggO1Sy+vnx7RQwwE/jzb7PzEqI2BP6TG/eOfylBxGBInWeaoSRfK3IRAvLHvvxY1eL4Wq/KRaanzMvh+JdCaStIKJSnI/rc9noI7vtOtgHot+F162s1G1k5/UcdbsfXWzotMVsonhlGgB/Jz9srnJpMpxYxaknR8UFPVRzOM5UzzMo64hXRUDnCFlYcTHcSAkvgKHI0SIPIS3kOdvgrYGavPLK2CAteQk7Dy1lHnEixmKPxG7eVAFwleUo8ePR82WXFkv5gacCvcrGrRLQ9nC/ygeMVgC5XxcHq3ykkcrstu5yjC1yEYFs23gA1Z4DIctwq1diyO72/FNxghV5ckN5WtJQs1QTT+Ec2NjLrWgFYuaEHYgAGopzTPN8gT9fyIv/lAq1S/l4P/z3EDS42UL+UTM77gyXSYShCKneDnFC34ATlYNDhJFRzLZ6qJG5UlOwrfXxUYeGUpQZlV41jg+VFWmPDAeQTMjGP5fRA3w1hFobBotBVyrtbcovTb4TFVTKJWOC/0wyiwku7YTY/nqMU/hR4IluTyRh9Z4NMn5xT5UW63OZd4DJvE573JxmJmnPc0fbo= |
||||
file_glob: true |
||||
file: |
||||
- "dist/*.zip" |
||||
- "dist/*.deb" |
||||
- "dist/*.tar.gz" |
||||
- "dist/*.AppImage" |
||||
- "dist/*.rpm" |
||||
- "dist/mac/*.zip" |
||||
- "dist/mac/*.dmg" |
||||
skip_cleanup: true |
||||
overwrite: true |
||||
prerelease: true |
||||
on: |
||||
repo: saenzramiro/rambox |
||||
tags: true |
||||
all_branches: true |
||||
|
||||
notifications: |
||||
email: |
||||
recipients: |
||||
- rambox@protonmail.com |
||||
on_success: always |
||||
on_failure: always |
||||
webhooks: |
||||
urls: |
||||
- https://webhooks.gitter.im/e/0f214eb0d0017d3c5561 |
||||
on_success: always # options: [always|never|change] default: always |
||||
on_failure: always # options: [always|never|change] default: always |
||||
on_start: never # options: [always|never|change] default: always |
||||
|
@ -0,0 +1,6 @@
|
||||
# Monthly Donators |
||||
|
||||
[Martin Grünbaum](https://github.com/alathon) |
||||
|
||||
Ivan Toshkov |
||||
[Simon Joda Stößer](https://github.com/SimJoSt) |
@ -1,216 +0,0 @@
|
||||
# Contributor's Guide |
||||
|
||||
We welcome pull requests! Follow these steps to contribute: |
||||
|
||||
1. Find an [issue](https://github.com/ramboxapp/community-edition/issues) that needs assistance. |
||||
1. Let us know you are working on it by posting a comment on the issue. |
||||
1. Follow the [Contribution Guidelines](#contribution-guidelines) to start working on the issue. |
||||
|
||||
Working on your first Pull Request? You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) |
||||
|
||||
##### If you've found a bug that is not on the board, [follow these steps](README.md#found-a-bug). |
||||
|
||||
--- |
||||
|
||||
## Contribution Guidelines |
||||
|
||||
### Setup |
||||
|
||||
- [Prerequisites](#prerequisites) |
||||
- [Forking the Project](#forking-the-project) |
||||
- [Create a Branch](#create-a-branch) |
||||
- [Set Up rambox](#set-up-rambox) |
||||
|
||||
### Create |
||||
|
||||
- [Make Changes](#make-changes) |
||||
- [Run The Test Suite](#run-the-test-suite) |
||||
|
||||
### Submit |
||||
|
||||
- [Creating a Pull Request](#creating-a-pull-request) |
||||
- [Common Steps](#common-steps) |
||||
- [How We Review and Merge Pull Requests](#how-we-review-and-merge-pull-requests) |
||||
- [How We Close Stale Issues](#how-we-close-stale-issues) |
||||
- [Next Steps](#next-steps) |
||||
- [Other Resources](#other-resources) |
||||
|
||||
### Prerequisites |
||||
|
||||
| Prerequisite | Version | |
||||
| ------------------------------------------------------------- | ------- | |
||||
| [Sencha](https://www.sencha.com/products/extjs/cmd-download/) | `=6.6.0.13` | |
||||
| [Ruby](https://www.ruby-lang.org/en/downloads/) | `=2.3` | |
||||
| [Node.js](https://nodejs.org) | `~ ^4.0.0` | |
||||
| npm (comes with Node) | `~ ^3.8.7` | |
||||
|
||||
> _Updating to the latest releases is recommended_. |
||||
|
||||
If Node.js, ruby, or sencha cmd is already installed on your machine, run the following commands to validate the versions: |
||||
|
||||
```shell |
||||
node -v |
||||
ruby -v |
||||
sencha |
||||
``` |
||||
|
||||
If your versions are lower than the prerequisite versions, you should update. |
||||
|
||||
### Forking the Project |
||||
|
||||
#### Setting Up Your System |
||||
|
||||
1. Install [Git](https://git-scm.com/) or your favorite Git client. |
||||
1. (Optional) [Setup an SSH Key](https://help.github.com/articles/generating-an-ssh-key/) for GitHub. |
||||
|
||||
#### Forking rambox |
||||
|
||||
1. Go to the top level rambox repository: <https://github.com/ramboxapp/community-edition> |
||||
1. Click the "Fork" Button in the upper right hand corner of the interface ([More Details Here](https://help.github.com/articles/fork-a-repo/)) |
||||
1. After the repository (repo) has been forked, you will be taken to your copy of the rambox repo at <https://github.com/yourUsername/community-edition> |
||||
|
||||
#### Cloning Your Fork |
||||
|
||||
1. Open a Terminal / Command Line / Bash Shell in your projects directory (_i.e.: `/yourprojectdirectory/`_) |
||||
1. Clone your fork of rambox |
||||
- `git clone https://github.com/yourUsername/community-edition.git` |
||||
|
||||
**(make sure to replace `yourUsername` with your GitHub username)** |
||||
|
||||
This will download the entire rambox repo to your projects directory. |
||||
|
||||
#### Setup Your Upstream |
||||
|
||||
1. Change directory to the new rambox directory (`cd community-edition`) |
||||
1. Add a remote to the official rambox repo: |
||||
- `git remote add upstream https://github.com/ramboxapp/community-edition.git` |
||||
|
||||
Congratulations, you now have a local copy of the rambox repo! :tada: |
||||
|
||||
### Create a Branch |
||||
|
||||
Before you start working, you will need to create a separate branch specific to the issue / feature you're working on. You will push your work to this branch. |
||||
|
||||
#### Naming Your Branch |
||||
|
||||
Name the branch something like `fix/xxx` or `feature/xxx` where `xxx` is a short description of the changes or feature you are attempting to add. For example |
||||
|
||||
`fix/email-login` would be a branch where you fix something specific to email login. |
||||
|
||||
#### Adding Your Branch |
||||
|
||||
To create a branch on your local machine (and switch to this branch): |
||||
|
||||
```shell |
||||
git checkout -b [name_of_your_new_branch] |
||||
``` |
||||
|
||||
and to push to GitHub: |
||||
|
||||
```shell |
||||
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 |
||||
|
||||
Once you have rambox cloned, before you start the application, you first need to install all of the dependencies: |
||||
|
||||
```bash |
||||
# Install NPM dependencies |
||||
npm install |
||||
``` |
||||
|
||||
```bash |
||||
# Compile the files... |
||||
sencha app watch |
||||
npm start # in a new terminal |
||||
``` |
||||
|
||||
### Make Changes |
||||
|
||||
This bit is up to you! |
||||
|
||||
#### How to find the code in the rambox 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 search for a challenge name and the results will display all the files along with line numbers. |
||||
Then you can proceed to the files and verify this is the area that you were looking forward to edit. |
||||
Always feel free to reach out to the chat room when you are not certain of any thing specific in the code. |
||||
|
||||
#### Adding or Editing Services |
||||
|
||||
The services are stored inside the file `./api/services.json` in the `gh-pages` branch: |
||||
|
||||
https://github.com/ramboxapp/community-edition/blob/gh-pages/api/services.json |
||||
|
||||
Add your service to the *BOTTOM* of the array. |
||||
To see these changes you'll need to stop your `npm start` and `sencha app watch`, and then rerun those. |
||||
|
||||
### Creating a Pull Request |
||||
|
||||
#### What is a Pull Request? |
||||
|
||||
A pull request (PR) is a method of submitting proposed changes to the rambox repo (or any repo, for that matter). |
||||
You will make changes to copies of thefiles which make up rambox in a personal fork, then apply to have them accepted by rambox proper. |
||||
|
||||
#### Important: ALWAYS EDIT ON A BRANCH |
||||
|
||||
Take away only one thing from this document: Never, **EVER** make edits to the `master` branch. |
||||
ALWAYS make a new branch BEFORE you edit files. |
||||
This is critical, because your copy of `master` will be forever sullied and the only way to fix it is a difficult hard-reset and force-push process, or deleting your fork and re-forking. |
||||
|
||||
### Common Steps |
||||
|
||||
1. Once the edits have been committed, you will be prompted to create a pull request on your fork's GitHub Page. |
||||
1. By default, all pull requests should be against the rambox main repo, `master` branch. |
||||
- **Make sure that your Base Fork is set to ramboxapp/community-edition when raising a Pull Request.** |
||||
1. Submit a pull request. |
||||
1. The title (also called the subject) of your PR should be descriptive of your changes and succinctly indicates what is being fixed. |
||||
- **Do not add the issue number in the PR title or commit message.** |
||||
- Examples: `Added Service servicename` `Correct typo in menu` |
||||
1. In the body of your PR include a more detailed summary of the changes you made and why. |
||||
- If the PR is meant to fix an existing bug/issue then, at the end of your PR's description, append the keyword `closes` and #xxxx (where xxxx is the issue number). |
||||
- Example: `closes #1337`. This tells GitHub to automatically close the existing issue, if the PR is merged. |
||||
1. Indicate if you have tested on a local copy of the site or not. |
||||
|
||||
### How We Review and Merge Pull Requests |
||||
|
||||
Rambox has a team of volunteer Issue Moderators. These Issue Moderators routinely go through open pull requests in a process called [Quality Assurance](https://en.wikipedia.org/wiki/Quality_assurance) (QA). |
||||
|
||||
1. If an Issue Moderator QA's a pull request and confirms that the new code does what it is supposed without seeming to introduce any new bugs, they will comment: `"LGTM" which means "Looks good to me."` |
||||
1. Another Issue Moderator will QA the same pull request. |
||||
- Once they have also confirmed that the new code does what it is supposed to without seeming to introduce any new bugs, they will merge the pull request. |
||||
|
||||
If you would like to apply to join our Issue Moderator team - which is a Core Team position - message [@BerkeleyTrue](https://gitter.im/berkeleytrue) with links to 5 of your pull requests that have been accepted and 5 issues where you have helped someone else through commenting or QA'ing. |
||||
|
||||
### How We Close Stale Issues |
||||
|
||||
We will close any issues or pull requests that have been inactive for more than 15 days, except those that match the following criteria: |
||||
|
||||
- Bugs that are confirmed |
||||
- Pull requests that are waiting on other pull requests to be merged |
||||
- Features that are a part of a GitHub project |
||||
|
||||
### Next Steps |
||||
|
||||
#### If your PR is accepted |
||||
|
||||
Once your PR is accepted, you may delete the branch you created to submit it. |
||||
This keeps your working fork clean. |
||||
|
||||
You can do this with a press of a button on the GitHub PR interface. You can delete the local copy of the branch with: `git branch -D branch/to-delete-name` |
||||
|
||||
#### If your PR is rejected |
||||
|
||||
Don't despair! You should receive solid feedback as to why it was rejected and what changes are needed. |
||||
|
||||
Many Pull Requests, especially first Pull Requests, require correction or updating. |
||||
If you have used the GitHub interface to create your PR, you will need to close your PR, create a new branch, and re-submit. |
||||
|
||||
If you have a local copy of the repo, you can make the requested changes and amend your commit with: `git commit --amend` |
||||
This will update your existing commit. |
||||
When you push it to your fork you will need to do a force push to overwrite your old commit: `git push --force` |
||||
|
||||
Be sure to post in the PR conversation that you have made the requested changes. |
@ -0,0 +1,6 @@
|
||||
## To Do |
||||
|
||||
- Change theme. |
||||
- Deeplink to add new service. |
||||
- Dock Menu (http://electron.atom.io/docs/tutorial/desktop-environment-integration/#custom-dock-menu-os-x) |
||||
- Crash Reporter. |
@ -1,29 +0,0 @@
|
||||
# ./controller |
||||
|
||||
This folder contains the application's global controllers. |
||||
ViewControllers are located alongside their respective view class in `./view`. |
||||
These controllers are used for routing and other activities that span all views. |
||||
|
||||
# ./model |
||||
|
||||
This folder contains the application's (data) Model classes. |
||||
|
||||
# ./view |
||||
|
||||
This folder contains the views as well as ViewModels and ViewControllers depending on the application's architecture. |
||||
Pure MVC applications may not have ViewModels, for example. |
||||
For MVCVM applications or MVC applications that use ViewControllers, the following directory structure is recommended: |
||||
|
||||
```text |
||||
./view/ |
||||
foo/ # Some meaningful grouping of one or more views |
||||
Foo.js # The view class |
||||
FooController.js # The controller for Foo (a ViewController) |
||||
FooModel.js # The ViewModel for Foo |
||||
``` |
||||
|
||||
This structure helps keep these closely related classes together and easily identifiable in most tabbed IDE's or text editors. |
||||
|
||||
# ./store |
||||
|
||||
This folder contains any number of store instances or types that can then be reused in the application. |
@ -0,0 +1,30 @@
|
||||
# ./controller |
||||
|
||||
This folder contains the application's global controllers. ViewControllers are located |
||||
alongside their respective view class in `"./view"`. These controllers are used for routing |
||||
and other activities that span all views. |
||||
|
||||
# ./model |
||||
|
||||
This folder contains the application's (data) Model classes. |
||||
|
||||
# ./view |
||||
|
||||
This folder contains the views as well as ViewModels and ViewControllers depending on the |
||||
application's architecture. Pure MVC applications may not have ViewModels, for example. For |
||||
MVCVM applications or MVC applications that use ViewControllers, the following directory |
||||
structure is recommended: |
||||
|
||||
./view/ |
||||
foo/ # Some meaningful grouping of one or more views |
||||
Foo.js # The view class |
||||
FooController.js # The controller for Foo (a ViewController) |
||||
FooModel.js # The ViewModel for Foo |
||||
|
||||
This structure helps keep these closely related classes together and easily identifiable in |
||||
most tabbed IDE's or text editors. |
||||
|
||||
# ./store |
||||
|
||||
This folder contains any number of store instances or types that can then be reused in the |
||||
application. |
@ -0,0 +1,42 @@
|
||||
{ |
||||
"name": "Rambox", |
||||
"productName": "Rambox", |
||||
"version": "0.5.13", |
||||
"description": "Rambox", |
||||
"main": "electron/main.js", |
||||
"private": true, |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "https://github.com/saenzramiro/rambox.git" |
||||
}, |
||||
"bugs": { |
||||
"url": "https://github.com/saenzramiro/rambox/issues" |
||||
}, |
||||
"homepage": "http://rambox.pro", |
||||
"keywords": [ |
||||
"Rambox", |
||||
"messaging", |
||||
"app", |
||||
"slack", |
||||
"whatsapp", |
||||
"facebook", |
||||
"messenger", |
||||
"telegram", |
||||
"google", |
||||
"hangouts", |
||||
"skype" |
||||
], |
||||
"author": "Ramiro Saenz <saenzramiro@gmail.com>", |
||||
"license": "GPL-3.0", |
||||
"dependencies": { |
||||
"@exponent/electron-cookies": "2.0.0", |
||||
"auth0-js": "^8.10.1", |
||||
"auth0-lock": "^10.22.0", |
||||
"auto-launch-patched": "5.0.2", |
||||
"electron-config": "0.2.1", |
||||
"electron-is-dev": "^0.1.2", |
||||
"mime": "^1.4.0", |
||||
"rimraf": "2.6.1", |
||||
"tmp": "0.0.28" |
||||
} |
||||
} |
@ -0,0 +1,259 @@
|
||||
Ext.define('Rambox.ux.Auth0', { |
||||
singleton: true |
||||
|
||||
// private
|
||||
,lock: null |
||||
,auth0: null |
||||
,backupCurrent: false |
||||
|
||||
,init: function() { |
||||
var me = this; |
||||
|
||||
var Auth0Lock = require('auth0-lock')['default']; |
||||
var Auth0 = require('auth0-js'); |
||||
|
||||
// Auth0 Config
|
||||
me.lock = new Auth0Lock(auth0Cfg.clientID, auth0Cfg.domain, { |
||||
autoclose: true |
||||
,autofocus: true |
||||
,auth: { |
||||
redirect: false |
||||
,params: {scope: 'openid offline_access'} |
||||
} |
||||
,theme: { |
||||
logo: 'resources/Icon.png' |
||||
,primaryColor: '#0675A0' |
||||
} |
||||
,languageDictionary: { |
||||
title: 'Rambox Account' |
||||
} |
||||
,popupOptions: { |
||||
nodeIntegration: 'no' |
||||
} |
||||
,language: localStorage.getItem('locale-auth0') === null ? 'en' : localStorage.getItem('locale-auth0') |
||||
}); |
||||
|
||||
me.auth0 = new Auth0.WebAuth({ clientID: auth0Cfg.clientID, domain : auth0Cfg.domain }); |
||||
|
||||
me.defineEvents(); |
||||
} |
||||
|
||||
,defineEvents: function() { |
||||
var me = this; |
||||
|
||||
me.lock.on("authenticated", function(authResult) { |
||||
me.lock.getProfile(authResult.idToken, function(err, profile) { |
||||
if ( err ) { |
||||
if ( err.error === 401 || err.error === 'Unauthorized' ) return me.renewToken(me.checkConfiguration); |
||||
Ext.Msg.hide(); |
||||
return Ext.Msg.show({ |
||||
title: 'Error' |
||||
,message: 'There was an error getting the profile: ' + err.error_description |
||||
,icon: Ext.Msg.ERROR |
||||
,buttons: Ext.Msg.OK |
||||
}); |
||||
} |
||||
|
||||
// Display a spinner while waiting
|
||||
Ext.Msg.wait(locale['app.window[29]'], locale['app.window[28]']); |
||||
|
||||
// Google Analytics Event
|
||||
ga_storage._trackEvent('Users', 'loggedIn'); |
||||
|
||||
// Set cookies to help Tooltip.io messages segmentation
|
||||
Ext.util.Cookies.set('auth0', true); |
||||
|
||||
// User is logged in
|
||||
// Save the profile and JWT.
|
||||
localStorage.setItem('profile', JSON.stringify(profile)); |
||||
localStorage.setItem('id_token', authResult.idToken); |
||||
localStorage.setItem('refresh_token', authResult.refreshToken); |
||||
|
||||
if ( !Ext.isEmpty(profile.user_metadata) && !Ext.isEmpty(profile.user_metadata.services) && !me.backupCurrent ) { |
||||
Ext.each(profile.user_metadata.services, function(s) { |
||||
var service = Ext.create('Rambox.model.Service', s); |
||||
service.save(); |
||||
Ext.getStore('Services').add(service); |
||||
}); |
||||
|
||||
require('electron').remote.getCurrentWindow().reload(); |
||||
} |
||||
|
||||
Ext.Msg.hide(); |
||||
Ext.cq1('app-main').getViewModel().set('username', profile.name); |
||||
Ext.cq1('app-main').getViewModel().set('avatar', profile.picture); |
||||
}); |
||||
}); |
||||
} |
||||
|
||||
,backupConfiguration: function(callback) { |
||||
var me = this; |
||||
|
||||
Ext.Msg.wait('Saving backup...', 'Please wait...'); |
||||
|
||||
// Getting all services
|
||||
var lastupdate = (new Date()).toJSON(); |
||||
var services = []; |
||||
Ext.getStore('Services').each(function(service) { |
||||
var s = Ext.clone(service); |
||||
delete s.data.id; |
||||
delete s.data.zoomLevel; |
||||
services.push(s.data); |
||||
}); |
||||
|
||||
Ext.Ajax.request({ |
||||
url: 'https://rambox.auth0.com/api/v2/users/'+Ext.decode(localStorage.getItem('profile')).user_id |
||||
,method: 'PATCH' |
||||
,headers: { authorization: "Bearer " + localStorage.getItem('id_token') } |
||||
,jsonData: { user_metadata: { services: services, services_lastupdate: lastupdate } } |
||||
,success: function(response) { |
||||
Ext.Msg.hide(); |
||||
// Save the last update in localStorage
|
||||
var profile = Ext.decode(localStorage.getItem('profile')); |
||||
if ( !profile.user_metadata ) profile.user_metadata = {}; |
||||
profile.user_metadata.services_lastupdate = lastupdate; |
||||
localStorage.setItem('profile', Ext.encode(profile)); |
||||
Ext.cq1('app-main').getViewModel().set('last_sync', new Date(lastupdate).toUTCString()); |
||||
|
||||
Ext.toast({ |
||||
html: '<i class="fa fa-check fa-3x fa-pull-left" aria-hidden="true"></i> Your configuration were successfully backed up.' |
||||
,title: 'Synchronize Configuration' |
||||
,width: 300 |
||||
,align: 't' |
||||
,closable: false |
||||
}); |
||||
|
||||
if ( Ext.isFunction(callback) ) callback.bind(me)(); |
||||
} |
||||
,failure: function(response) { |
||||
if ( response.status === 401 ) return me.renewToken(me.backupConfiguration); |
||||
|
||||
Ext.Msg.hide(); |
||||
Ext.toast({ |
||||
html: '<i class="fa fa-times fa-3x fa-pull-left" aria-hidden="true"></i> Error occurred when trying to backup your configuration.' |
||||
,title: 'Synchronize Configuration' |
||||
,width: 300 |
||||
,align: 't' |
||||
,closable: false |
||||
}); |
||||
|
||||
if ( Ext.isFunction(callback) ) callback.bind(me)(); |
||||
|
||||
console.error(response); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
,restoreConfiguration: function() { |
||||
var me = this; |
||||
|
||||
me.lock.getProfile(localStorage.getItem('id_token'), function (err, profile) { |
||||
if ( err ) { |
||||
if ( err.error === 401 || err.error === 'Unauthorized' ) return me.renewToken(me.checkConfiguration); |
||||
return Ext.Msg.show({ |
||||
title: 'Error' |
||||
,message: 'There was an error getting the profile: ' + err.error_description |
||||
,icon: Ext.Msg.ERROR |
||||
,buttons: Ext.Msg.OK |
||||
}); |
||||
} |
||||
|
||||
// First we remove all current services
|
||||
Ext.cq1('app-main').getController().removeAllServices(false, function() { |
||||
Ext.each(profile.user_metadata.services, function(s) { |
||||
var service = Ext.create('Rambox.model.Service', s); |
||||
service.save(); |
||||
Ext.getStore('Services').add(service); |
||||
}); |
||||
|
||||
require('electron').remote.getCurrentWindow().reload(); |
||||
}); |
||||
}); |
||||
} |
||||
|
||||
,checkConfiguration: function() { |
||||
var me = this; |
||||
|
||||
me.lock.getProfile(localStorage.getItem('id_token'), function (err, profile) { |
||||
if ( err ) { |
||||
if ( err.error === 401 || err.error === 'Unauthorized' ) return me.renewToken(me.checkConfiguration); |
||||
return Ext.Msg.show({ |
||||
title: 'Error' |
||||
,message: 'There was an error getting the profile: ' + err.error_description |
||||
,icon: Ext.Msg.ERROR |
||||
,buttons: Ext.Msg.OK |
||||
}); |
||||
} |
||||
|
||||
if ( !profile.user_metadata ) { |
||||
Ext.toast({ |
||||
html: 'You don\'t have any backup yet.' |
||||
,title: 'Synchronize Configuration' |
||||
,width: 300 |
||||
,align: 't' |
||||
,closable: false |
||||
}); |
||||
return; |
||||
} |
||||
|
||||
if ( Math.floor(new Date(profile.user_metadata.services_lastupdate) / 1000) > Math.floor(new Date(Ext.decode(localStorage.getItem('profile')).user_metadata.services_lastupdate) / 1000) ) { |
||||
Ext.toast({ |
||||
html: 'Your settings are out of date.' |
||||
,title: 'Synchronize Configuration' |
||||
,width: 300 |
||||
,align: 't' |
||||
,closable: false |
||||
}); |
||||
} else { |
||||
Ext.toast({ |
||||
html: 'Latest backup is already applied.' |
||||
,title: 'Synchronize Configuration' |
||||
,width: 300 |
||||
,align: 't' |
||||
,closable: false |
||||
}); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
,renewToken: function(callback) { |
||||
var me = this; |
||||
|
||||
Ext.Ajax.request({ |
||||
url: 'https://rambox.auth0.com/delegation' |
||||
,method: 'POST' |
||||
,jsonData: { |
||||
grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer' |
||||
,client_id: auth0Cfg.clientID |
||||
,refresh_token: localStorage.getItem('refresh_token') |
||||
,api_type: 'app' |
||||
} |
||||
,success: function(response) { |
||||
var json = Ext.decode(response.responseText); |
||||
localStorage.setItem('id_token', json.id_token); |
||||
|
||||
if ( Ext.isFunction(callback) ) callback.bind(me)(); |
||||
} |
||||
,failure: function(response) { |
||||
console.error(response); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
,login: function() { |
||||
var me = this; |
||||
|
||||
me.lock.show(); |
||||
} |
||||
|
||||
,logout: function() { |
||||
var me = this; |
||||
|
||||
localStorage.removeItem('profile'); |
||||
localStorage.removeItem('id_token'); |
||||
localStorage.removeItem('refresh_token'); |
||||
|
||||
// Set cookies to help Tooltip.io messages segmentation
|
||||
Ext.util.Cookies.set('auth0', false); |
||||
} |
||||
}); |
@ -1,29 +1,19 @@
|
||||
const { app, ipcMain, BrowserWindow } = require('electron'); |
||||
const { autoUpdater } = require("electron-updater"); |
||||
|
||||
// autoUpdater.logger = require("electron-log");
|
||||
// autoUpdater.logger.transports.file.level = "debug";
|
||||
// autoUpdater.currentVersion = '0.8.0';
|
||||
// autoUpdater.updateConfigPath = path.join(__dirname, 'dev-app-update.yml');
|
||||
|
||||
autoUpdater.setFeedURL({ |
||||
"provider": "github", |
||||
"owner": "ramboxapp", |
||||
"repo": "download", |
||||
"vPrefixedTagName": true |
||||
}); |
||||
const {app, autoUpdater, ipcMain} = require('electron'); |
||||
const version = app.getVersion(); |
||||
const platform = process.platform === 'darwin' ? 'osx' : process.platform; |
||||
const url = `https://getrambox.herokuapp.com/update/${platform}/${version}`; |
||||
|
||||
const initialize = (window) => { |
||||
const webContents = window.webContents; |
||||
const send = webContents.send.bind(window.webContents); |
||||
autoUpdater.on('checking-for-update', (event) => send('autoUpdater:checking-for-update')); |
||||
autoUpdater.on('update-downloaded', (...args) => send('autoUpdater:update-downloaded', ...args)); |
||||
ipcMain.on('autoUpdater:quit-and-install', (event) => { |
||||
app.removeAllListeners('window-all-closed'); |
||||
BrowserWindow.getAllWindows().forEach((browserWindow) => browserWindow.removeAllListeners('close')); |
||||
autoUpdater.quitAndInstall(true, true); |
||||
}); |
||||
autoUpdater.on('checking-for-update', (event) => send('autoUpdater:checking-for-update:')); |
||||
autoUpdater.on('update-downloaded', (event, ...args) => send('autoUpdater:update-downloaded', ...args)); |
||||
ipcMain.on('autoUpdater:quit-and-install', (event) => autoUpdater.quitAndInstall()); |
||||
ipcMain.on('autoUpdater:check-for-updates', (event) => autoUpdater.checkForUpdates()); |
||||
webContents.on('did-finish-load', () => { |
||||
autoUpdater.setFeedURL(url); |
||||
//autoUpdater.checkForUpdates();
|
||||
}); |
||||
}; |
||||
|
||||
module.exports = {initialize}; |
||||
|
@ -1,3 +1,3 @@
|
||||
# ext-aria/resources |
||||
|
||||
This folder contains static resources (typically an `images` folder as well). |
||||
This folder contains static resources (typically an `"images"` folder as well). |
||||
|
@ -1,3 +1,3 @@
|
||||
# ext-aria/resources |
||||
|
||||
This folder contains static resources (typically an `images` folder as well). |
||||
This folder contains static resources (typically an `"images"` folder as well). |
||||
|
@ -1,4 +1,4 @@
|
||||
# ext-aria/sass/etc |
||||
|
||||
This folder contains miscellaneous SASS files. |
||||
Unlike `ext-aria/sass/etc`, these files need to be used explicitly. |
||||
This folder contains miscellaneous SASS files. Unlike `"ext-aria/sass/etc"`, these files |
||||
need to be used explicitly. |
||||
|
@ -1 +1,2 @@
|
||||
# rambox-default-theme - Read Me |
||||
|
||||
|
@ -1,45 +1,38 @@
|
||||
# rambox-default-theme/examples |
||||
|
||||
This folder contains example applications demonstrating this package. |
||||
Each of these applications will be built as part of the package build: |
||||
This folder contains example applications demonstrating this package. Each of |
||||
these applications will be built as part of the package build: |
||||
|
||||
```bash |
||||
cd /path/to/package |
||||
sencha package build |
||||
``` |
||||
cd /path/to/package |
||||
sencha package build |
||||
|
||||
As applications, they can also be built individually: |
||||
|
||||
```bash |
||||
cd /path/to/package/examples/example-app |
||||
sencha app build |
||||
``` |
||||
cd /path/to/package/examples/example-app |
||||
sencha app build |
||||
|
||||
Or you can build all examples as a group: |
||||
|
||||
```bash |
||||
cd /path/to/package |
||||
sencha ant examples |
||||
``` |
||||
cd /path/to/package |
||||
sencha ant examples |
||||
|
||||
The ideal location for the example builds to reside is the `"./build"` folder: |
||||
|
||||
```text |
||||
/path/to/package/ |
||||
src/ |
||||
resources/ |
||||
... |
||||
examples/ |
||||
example-app/ |
||||
other-example/ |
||||
... |
||||
build/ |
||||
/path/to/package/ |
||||
src/ |
||||
resources/ |
||||
... |
||||
examples/ |
||||
example-app/ |
||||
other-example/ |
||||
``` |
||||
... |
||||
build/ |
||||
resources/ |
||||
examples/ |
||||
example-app/ |
||||
other-example/ |
||||
|
||||
This can be specified in the `".sencha/app/build.properties"` file for the example applications: |
||||
This can be specified in the `".sencha/app/build.properties"` file for the |
||||
example applications: |
||||
|
||||
`build.dir=${package.build.dir}/examples/${app.name}` |
||||
build.dir=${package.build.dir}/examples/${app.name} |
||||
|
@ -1,4 +1,4 @@
|
||||
# rambox-default-theme/sass/etc |
||||
|
||||
This folder contains miscellaneous SASS files. |
||||
Unlike `"rambox-default-theme/sass/etc"`, these files need to be used explicitly. |
||||
This folder contains miscellaneous SASS files. Unlike `"rambox-default-theme/sass/etc"`, these files |
||||
need to be used explicitly. |
||||
|
@ -1,4 +1,4 @@
|
||||
# rambox-default-theme/sass/src |
||||
|
||||
This folder contains SASS sources that mimic the component-class hierarchy. |
||||
These files are gathered in to a build of the CSS based on classes that are used by the build. |
||||
This folder contains SASS sources that mimic the component-class hierarchy. These files |
||||
are gathered in to a build of the CSS based on classes that are used by the build. |
||||
|
@ -1,3 +1,4 @@
|
||||
# rambox-default-theme/src |
||||
|
||||
This folder contains source code that will automatically be added to the classpath when the package is used. |
||||
This folder contains source code that will automatically be added to the classpath when |
||||
the package is used. |
||||
|
@ -0,0 +1,4 @@
|
||||
# Rambox/resources |
||||
|
||||
This folder contains resources (such as images) needed by the application. This file can |
||||
be removed if not needed. |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 48 KiB |