|
|
||
|---|---|---|
| data | ||
| tests | ||
| webui-src | ||
| .gitignore | ||
| GSoC_2019.txt | ||
| README.md | ||
| TODO.md | ||
| webui.pro | ||
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:
- Open Retroshare, go to
Preferences > JSON API. - Check the
Enable Retroshare JSON API Serverbox. - In the
Tokenfield, add a new token in the format:login:passwordand click Add. - Click Restart.
Next, you need to download and install the web interface itself:
Install WebUI
- 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
- Build the files:
If you have
qmakeinstalled, 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.