Go to file
Mohammed Saud 6bbdb04824
Fix misplaced braces in lint config (#31)
* fix misplaced braces in lint config

* add lint instructions
2021-04-18 16:58:36 +05:30
data added missing retroshare icon 2019-09-09 13:54:43 +02:00
tests first brand, extracted from old web UI 2018-12-30 23:33:28 +01:00
webui-src Fix misplaced braces in lint config (#31) 2021-04-18 16:58:36 +05:30
.gitignore use webui-src/make-src/build.sh instead 2020-12-19 14:27:35 +01:00
GSoC_2019.txt Reflect pogress updates in TODO list 2019-06-10 17:22:14 +05:30
README.md Fix misplaced braces in lint config (#31) 2021-04-18 16:58:36 +05:30
TODO.md added Todo from https://github.com/RetroShare/RetroShare/issues/2160#issue-765440195 2020-12-22 09:17:17 +01:00
webui.pro fixed .pro so as to add retroshare.svg icon into local data/ directory 2019-11-23 21:44:23 +01:00

Web Interface for Retroshare

A web-based frontend for Retroshare. Communicates with the client through the JSON API.

Requirements

  • Retroshare v0.6.5+ with JSON API enabled(see instructions below)
  • A modern JavaScript-enabled web browser
  • qmake(optional)

Installation

The web interface will be shipped by default in the next release of Retroshare once it gets merged. Until then, it needs to be installed separately.

Compile Retroshare with JSON API

Go to the Preferences tab, if there is a section called JSON API then you can skip this step. Otherwise, you need to compile Retroshare with the JSON API. To do so, use the qmake flag rs_jsonapi:

qmake CONFIG+="rs_jsonapi"
make

See the Retroshare repo for more detailed instructions.

Enable JSON API

You need to enable the JSON API, through which the web interface communicates with the client:

  1. Open Retroshare, go to Preferences > JSON API.
  2. Check the Enable Retroshare JSON API Server box.
  3. In the Token field, add a new token in the format: login:password and click Add.
  4. Click Restart.

Next, you need to download and install the web interface itself:

Install WebUI

  1. Clone the repo: You can clone using git, or download the zip file and extract it
git clone https://github.com/Retroshare/RSNewWebUI
cd RSNewWebUI
  1. Build the files: If you have qmake installed, you just need to run it in the base directory:
qmake .

If you do not have qmake, go to webui-src/make-src/ and run the build script.

On Linux/MacOS:
cd webui-src/make-src
sh build.sh
On Windows:
cd webui-src\make-src\
./build.bat

Usage

Go to RsNewWebUI/webui/ and open the index.html file in your browser.

References

  • mithril
  • list files with @jsonapi in libretroshare/src/retroshare of retroshare: grep -c "@jsonapi" *.h|grep -v ":0"

Contributing

Preparing code

Install prettier and eslint (required for linting & formatting code):

npm install -g prettier eslint

Next, run the following in the webui-src directory:

To run the linter: eslint app

To run the formatter: prettier -c app

Linting and formatting can also be done with editor/IDE plugins.

Bug Reports & Feature requests

Please create an issue concisely describing the bug you faced, or the feature you would like to see implemented.

Development

Whether you are a JavaScript developer or a web designer, you can help make the web interface better. Get in touch with us on the Developer forums in Retroshare.