syncthing/next-gen-gui/README.md

66 lines
1.7 KiB
Markdown
Raw Normal View History

2020-03-31 13:54:40 +00:00
# Syncthing Tech UI
2020-03-10 14:57:02 +00:00
2020-04-17 07:33:37 +00:00
## Usage
This is a very bare bones read-only GUI for viewing the status of large
setups. Download a [release
zip](https://github.com/kastelo/syncthing-tech-ui/releases) and unpack it
into the GUI override directory (assuming default Linux setup):
```
$ cd ~/.config/syncthing
$ mkdir -p gui/default
$ cd gui/default
$ unzip ~/tech-ui-v1.0.0.zip
```
Then load the GUI via http://localhost:8384/tech-ui/ or similar. You should see something like this:
![Screenshot](screenshot.png)
2020-03-10 14:57:02 +00:00
## Development server
2020-03-31 13:54:40 +00:00
Run `npm run serve` for a dev server. Navigate to `http://localhost:4200/`. The
app will automatically reload if you change any of the source files.
2020-03-15 16:33:21 +00:00
## Production server
2020-03-31 13:54:40 +00:00
In production we serve the UI through Syncthing itself. The easiest way to
do that is to simply put the built assets in the `gui` subdirectory of
Syncthing's config directory.
2020-03-10 14:57:02 +00:00
2020-03-31 14:14:09 +00:00
```
$ npm run build -- --prod
$ rsync -va --delete dist/tech-ui/ ~/.config/syncthing/gui/default/tech-ui/
```
2020-03-10 14:57:02 +00:00
2020-03-31 13:54:40 +00:00
Adjust for your actual Syncthing config dir if different. Navigate to
`http://localhost:8384/tech-ui/`.
2020-03-10 14:57:02 +00:00
2020-03-31 14:14:09 +00:00
Another option is to start Syncthing with the STGUIASSETS environment
variable pointing to the distribution directory.
```
$ npm run build -- --prod
$ ln -sf . dist/default
$ export STGUIASSETS=$(pwd)/dist
$ syncthing
```
The magic is symlink is because Syncthing will look for the GUI in the
`default` subdirectory. Navigate to `http://localhost:8384/tech-ui/`.
2020-03-31 13:54:40 +00:00
## Code scaffolding
2020-03-10 14:57:02 +00:00
2020-03-31 13:54:40 +00:00
Run `ng generate component component-name` to generate a new component. You
can also use `ng generate
directive|pipe|service|class|guard|interface|enum|module`.
2020-03-10 14:57:02 +00:00
## License
2020-03-10 14:57:02 +00:00
MPLv2
## Copyright
Copyright (c) 2020 The Syncthing Authors