Coder Social home page Coder Social logo

rocketchat / rocket.chat.electron Goto Github PK

View Code? Open in Web Editor NEW
1.6K 119.0 686.0 96.02 MB

Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat

Home Page: https://rocket.chat/

License: MIT License

HTML 0.13% JavaScript 1.30% NSIS 0.26% TypeScript 98.29% CSS 0.02%
electron chat desktop collaboration foss mit opensource windows linux macos

rocket.chat.electron's Introduction

Rocket.Chat Desktop App

Travis CI Build Status AppVeyor Build Status Codacy Badge Project Dependencies GitHub All Releases GitHub

Desktop application for Rocket.Chat available for macOS, Windows and Linux using Electron.

Rocket.Chat Desktop App


Engage with us

Share your story

We’d love to hear about your experience and potentially feature it on our Blog.

Subscribe for Updates

Once a month our marketing team releases an email update with news about product releases, company related topics, events and use cases. Sign Up!


Download

You can download the latest version from the Releases page.

Get it from the Snap Store

Install

Launch the installer and follow the instructions to install.

Windows Options

On Windows you can run a silent install by adding the /S flag. You can also add the options below:

  • /S - Silent install
  • /allusers - Install for all users (requires admin)
  • /currentuser - Install only the for current user (default)
  • /disableAutoUpdates - Disable automatic updates

Development

Quick start

Prerequisites:

Now just clone and start the app:

git clone https://github.com/RocketChat/Rocket.Chat.Electron.git
cd Rocket.Chat.Electron
yarn
yarn start

Structure of the project

The source is located in the src folder. Everything in this folder will be built automatically when running the app with yarn start.

The build process compiles all stuff from the src folder and puts it into the app folder, so after the build has finished, your app folder contains the full, runnable application.

TypeScript

Following the ongoing changes in Rocket.Chat codebase, the app was rewritten in TypeScript 4 to address issues regarding maintainability.

The build pipeline

The build process is founded upon rollup bundler. There are three entry files for your code:

  • src/main.ts, the script running at the main Electron process, orchestrating the whole application;

  • src/rootWindow.ts, the script that renders the UI of the root window, the app's main window;

  • and src/preload.ts, which runs in a privileged mode to connect the app and the webviews rendering Rocket.Chat's web client.

Adding Node.js modules

Remember to respect the split between dependencies and devDependencies in package.json file. Only modules listed in dependencies will be included into distributable app.

Troubleshooting

node-gyp

Follow the installation instruction on node-gyp readme.

Ubuntu

You will need to install the following packages:

build-essential
libevas-dev
libxss-dev

Fedora

You will need to install the following packages:

libX11
libXScrnSaver-devel
gcc-c++

Windows 7

On Windows 7 you may have to follow option 2 of the node-gyp install guide and install Visual Studio.

Testing

Unit tests

yarn test

We use Jest testing framework with the Jest electron runner. It searches for all files in src directory that match the glob pattern *.(spec|test).{js,ts,tsx}.

Making a release

To package your app into an installer use command:

yarn release

It will start the packaging process for operating system you are running this command on. Ready for distribution file will be outputted to dist directory.

All packaging actions are handled by electron-builder. It has a lot of customization options.

Default servers

The servers.json file will define what servers the client will connect to and will populate the server list in the sidebar. It contains a list of default servers which will be added the first time the user runs the app (or when all servers are removed from the list). The file syntax is as follows:

{
  "Demo Rocket Chat": "https://demo.rocket.chat",
  "Open Rocket Chat": "https://open.rocket.chat"
}

Pre-Release Configuration

You can bundle a servers.json with the install package, the file should be located in the root of the project application (same level as the package.json). If the file is found, the initial "Connect to server" screen will be skipped and it will attempt to connect to the first server in the array that has been defined and drop the user right at the login screen. Note that the servers.json will only be checked if no other servers have already been added, even if you uninstall the app without removing older preferences, it will not be triggered again.

Post-Install Configuration

If you can't (or don't want to) bundle the file inside the app, you can create a servers.json in the user preferences folder which will overwrite the packaged one. The file should be located in the %APPDATA%/Rocket.Chat/ folder or the installation folder in case of an installation for all users (Windows only).

For Windows, the full paths are:

  • ~\Users\<username>\AppData\Roaming\Rocket.Chat\
  • ~\Program Files\Rocket.Chat\Resources\

On macOS, the full path is:

  • ~/Users/<username>/Library/Application Support/Rocket.Chat/
  • /Library/Preferences/Rocket.Chat/

On Linux, the full paths are:

  • /home/<username>/.config/Rocket.Chat/
  • /opt/Rocket.Chat/resources/

Overridden settings

You can override the user settings by creating an overridden-settings.json in the user preferences folder. The file should be located in the %APPDATA%/Rocket.Chat/ folder or the installation folder in case of an installation for all users (Windows only).

Every setting set on the file will override the default and user settings. Then you can use it for disabling the default features like auto-update and even create a single server mode.

The settings that can be overridden are:

Setting Description
"isReportEnabled": true, Sets if the bugs will be reported to developers.
"isInternalVideoChatWindowEnabled": true, Sets the video calls will be opened in an internal window.
"isFlashFrameEnabled": true, Sets if the flash frame will be enabled.
"isMinimizeOnCloseEnabled": false, Sets if the app will be minimized on close.
"doCheckForUpdatesOnStartup": true, Sets if the app will check for updates on startup.
"isMenuBarEnabled": true, Sets if the menu bar will be enabled.
"isTrayIconEnabled": true, Enables Tray Icon, the app will be hidden to the tray on close. Overrides "isMinimizeOnCloseEnabled"
"isUpdatingEnabled": true, Sets if the app can be updated by the user.
"isAddNewServersEnabled": true, Sets if the user can add new servers.
Single server mode

If the setting "isAddNewServersEnabled": false is set, the user will not be able to add new servers. The buttons and shortcuts will be disabled. Then you will have to add the server to the servers.json file. With this, you can create a single server mode or just don't let the user to add new servers by his own.

Example configuration

overridden-settings.json file:

{
   "isTrayIconEnabled": false,
   "isMinimizeOnCloseEnabled": false
}

When isTrayIconEnabled is enabled, the app will be hidden on close. When isMinimizeOnCloseEnabled is enabled, the app will be minimized on close. When both are disabled, the app will quit on close.

License

Released under the MIT license.

rocket.chat.electron's People

Contributors

abicur avatar alexbrazier avatar black-snow avatar brandonhamilton avatar brunosquadros avatar cadetmsv avatar cazetto avatar dependabot[bot] avatar edipox avatar engelgabriel avatar floriangoeldi avatar gdelavald avatar geekgonecrazy avatar ggazzo avatar happytobi avatar jeanfbrito avatar jgtoriginal avatar lfcavalcanti avatar lingohub[bot] avatar misteral avatar palanikannan1437 avatar rodrigok avatar romannekhor avatar sampaiodiego avatar subesokun avatar szwacz avatar tassoevan avatar ura14h avatar urbalazs avatar vcapretz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rocket.chat.electron's Issues

Let users know when there is a new release

I wouldn't think this would happen very often.

Could just have it check on start for a new release using github's api

https://api.github.com/repos/RocketChat/Rocket.Chat.Electron/releases

Left click on tray icon should do something

As the title says, left clicking on the tray icon does nothing. At least on (Arch) linux. Right click shows the context menu and you can then hide/show the main window just fine, like quitting the application, but a one-click action would be faster, if the main window is hidden, one (or two) click shows it and brings it to front, and vice versa, if it is shown, then one left click on the tray icon should hide it.

Speaking about the context menu, it would be nice to disable the uneeded option, i.e: hide option disabled when the main window is hidden, and show option hidden when the window is opened, or bring it to front.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Electron interface blank after server goes offline

Problem

When a client is opened and tries to connect to it's last known server and that server is no longer online, the client interface is broken. This can happen if the server has just been shut off, or even if the server changed addresses or ports.

I am running the Rocket.Chat OS X Electron Client (Version 0.0.9).

I was looking to remove all my user data (see #60), but the comments in that thread are Windows specific. I tried deleting ~/Library/Application\ Support/Rocket.Chat, but that didn't solve my problem.

To Reproduce

  1. Start a new Rocket.Chat server, say on 192.168.1.100:3000.
  2. Download and install the Rocket.Chat OS X client.
  3. Register new account and login like normal.
  4. Close Rocket.Chat OS X client.
  5. Stop Rocket.Chat server (on 192.168.1.100:3000)
  6. Open Rocket.Chat OS X client again and observe the interface is now broken. See screenshot below.

screen shot 2015-12-09 at 2 19 35 pm

Windows XP Support

Rocket electron dos not work on win xp, because electron dos not support win xp.

Windows installation wizard images

The wizard installation process on Windows starts with this screen:

instalacao

We can see the boilerplate image and the "harddrive" icon in the window.

Release schedule?

When is the next release planned? We experienced some instabilities on Ubuntu only to be solved with killall rocketchat (perhaps an upstream Electron issue).

Closing/Removing a connection to a connected server

Currently we can only right click over the number for server on the left pane and click Remove Server from the context menu to remove or close the connection to a server.

I don't think it's visually very intuitive.

I personally think a red X button appearing when hovered on the top right corner of the server number would be a nice idea.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Install from source should leave some .desktop files

Perhaps I'm doing something wrong, but installation from source it's a bit unfinished. It compiles and starts perfect, but for a graphical application, it should be executable without the need of a shell.
The installation script should move the application folder to any proper place (/opt at least) and a .desktop file in order to call the application from any desktop environment.

Using Alt+Shift to change input language opens the Rocket.Chat menu on linux

I regularly use Alt+Shift to change input languages. On my Linux box (kubuntu 15.04) pressing Alt+Shift results in the Rocket.Chat menu item being open in addition to changing the input language. As a result I have to press Alt+Shift, Esc to continue the input (which is slower and not a habit).

This might be an Electron issue, I haven't tested with other Electron apps. I haven't tested on Windows either.

Show notifications across Servers

I have two servers setup, one for work, one for family.

Whenever I'm focused on one in the desktop app, notifications for the other go completely unnoticed. I'll click back over to the other server and Whoa! There's a ton of messages waiting over here that I had no idea about.

I want to get notifications for any server I'm logged into, regardless of whether I'm 'focused' on it or not.

Right click -> copy / paste

I keep trying to do this out of habit and it doesn't work.

This could potentially be difficult. I know it was an issue that nodewebkit had. But I know atom now has it. So it should be possible.

Unable to provide a custom port when connecting to a URL

At launch when entering a URL to connect to, entering ":" results in an immediate "Not a valid instance url" message. It appears that no attempt was made to connect. This means that any rocket.chat installations with a custom port number (other than 3000) will not be able to use this gui.

Avatar image doesn't refresh after change (old image stays cached)

Running latest from source on OS X 10.10.4.

After uploading a new avatar, the image refreshes on my local machine but not for anyone else. Removing all files under "~/Application Support/Rocket.Chat/Cache/" does the trick and forces it to refresh, but this has to be performed on each machine.

Is there a way to force a cache refresh whenever someone changes their profile image?

Need a way to clear cookies when app start

Github 2FA (and probably others) messes up if session is disconnected in the middle (high probability since it takes so long to look up 2FA code); and subsequent logons will all fail with some broken saved state. Other 2FA or long auth may have same problem.

Optional cookies clear on start will probably be useful for other 'broken saved state' scenarios as well.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Ability to use your own RC server

It would be useful if we were able to add an option in context menu, or in a sub-menu somewhere, to be able to use our own Rocket Chat server via this client.

Would like support for multiple organizations/servers/accounts in the same client at the same time.

It would be really helpful if the desktop client supported multiple servers at the same time. In my use case I could see wanting the multiple server accounts open at the same time, in a single client. (This would be like slack where you can authenticate with multiple "slack domains" from the same client. The slack client has a third column to the left of the channel chooser, that allows you to pick your account/domain. It doesn't take up much space. Another analogy would be an IRC client that can simultaneously connect to multiple IRC networks.)

Example use case would be simultaneous connections to the following:

  1. Default Demo account, so I can access support, and what not.
  2. Local Computer Club account (Think something like the http://www.nyctechslack.com/)
  3. Company account #1
  4. Company account #2

Desktop notifications?

Is this a planned feature? It would be great to get an OS X system notification with the person chatting and a preview of what they wrote.

Start Page

Hi there,

with the current project configuration, the Rocket.Chat app starts at the url https://rocket.chat/home, so there is not way to set another host url.

I propose:
My [ ] a local start page

  • this start page should look if an host url has already been provided and do a redirect
  • otherwise, it should show an input field for host url
  • if on start, the internet connection is unavailable and appcache is empty, the app should warn the user (right now, the app shows a blank screen)

Add option to hide the server list

In case you're using only one server then this server list on the left hand side is quite irritating. Especially if you resize your window to have a slim messaging window then this server list is quite disturbing. Could it be hidden by default in case you're connected only to a single server? That'd be awesome :)

Spell Check

Needs spell check.

Web-Frame - Will let us handle spelling.

Npm Module nodehun - Give us spelling suggestions.

Down side is we have to bring in spelling dictionaries.

Then we just have to add suggestions to context menu. This will take a bit of work. Maybe we can find someone that has already done all of this?

Mensagem de erro no início (windows/linux)

Nos aplicativos para Windows e Linux é apresentada a seguinte mensagem em vermelho na tela:
"Couldn't find a template named "error" or "error". Are you sure you defined it?"
Imgur

Menu errors on Windows

I got errors like these from all menus except "View > reload":

image

And closing the app on version 0.0.2 does not closes the electron.exe process.

Application crashes when clicking on file:// links

When the user clicks on a file:// link such as file://localhost/Users/user/Documents/somedocument.docx the application first opens an empty window and continues opening more empty windows when clicking on the link repeatedly. If the user closes the empty windows and then proceeds to click on the link again the application crashes, showing a segmentation fault in the crash report. I tested this issue on OS X 10.11.1
I think this may be an issue with electron, not the Rocket.Chat client, not sure though.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.