2023-11-19 16:25:31 +01:00
|
|
|
# BTClock WebUI
|
2023-11-17 01:05:35 +01:00
|
|
|
|
2023-11-19 16:25:31 +01:00
|
|
|
[](https://github.com/btclock/webui2/actions/workflows/workflow.yml)
|
2023-11-17 01:05:35 +01:00
|
|
|
|
2023-11-19 16:25:31 +01:00
|
|
|
The web user-interface for the BTClock, based on Svelte-kit. It uses Bootstrap for the lay-out.
|
2023-11-17 01:05:35 +01:00
|
|
|
|
2023-11-19 16:25:31 +01:00
|
|
|

|
|
|
|

|
2023-11-17 01:05:35 +01:00
|
|
|
|
|
|
|
## Developing
|
|
|
|
|
2023-11-19 16:25:31 +01:00
|
|
|
After installed dependencies with `yarn`, start a development server:
|
2023-11-17 01:05:35 +01:00
|
|
|
|
|
|
|
```bash
|
2023-11-19 16:25:31 +01:00
|
|
|
yarn dev
|
2023-11-17 01:05:35 +01:00
|
|
|
|
|
|
|
# or start the server and open the app in a new browser tab
|
2023-11-19 16:25:31 +01:00
|
|
|
yarn dev -- --open
|
2023-11-17 01:05:35 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Building
|
|
|
|
|
2023-11-19 16:25:31 +01:00
|
|
|
To create a production version of the WebUI:
|
2023-11-17 01:05:35 +01:00
|
|
|
|
|
|
|
```bash
|
2023-11-19 16:25:31 +01:00
|
|
|
yarn build
|
2023-11-17 01:05:35 +01:00
|
|
|
```
|
|
|
|
|
2023-11-19 16:25:31 +01:00
|
|
|
Make sure the postinstall script is ran, because otherwise the filenames are to long for the LittleFS filesystem.
|
|
|
|
|
|
|
|
## Deploying
|
|
|
|
|
|
|
|
To upload the firmware to the BTClock, you need to GZIP all the files. You can use the python script `gzip_build.py` for that.
|
|
|
|
|
|
|
|
Then you can make a `LittleFS.bin` with mklittlefs:
|
|
|
|
|
|
|
|
```bash
|
2023-11-19 20:27:22 +01:00
|
|
|
mklittlefs -c build_gz -s 409600 littlefs.bin
|
2023-11-19 16:25:31 +01:00
|
|
|
```
|
2023-11-17 01:05:35 +01:00
|
|
|
|
2023-11-19 20:27:22 +01:00
|
|
|
You can preview the production build with `yarn preview`.
|