PrusaLink Web is a web interface for Prusa printers. Web interface is specified using the OpenAPI format in this file: spec/openapi.yaml.
npm install
npm run {command}[:{config}] [option]
Where {command}
is one of the following:
build
-> build static files with productionstart
-> run a dev server, including virtual printer mockup- start [http-*] -> run a dev server with authentication
{config}
is one of the following:
sl1
-> Prusa SL1 printer configuration (seeconfig.sl1.js
)m1
-> Prusa SL1 printer configuration (seeconfig.m1.js
)mini
-> Prusa Mini printer configuration (seeconfig.mini.js
)custom
-> Tries to use custom configuration fileconfig.custom.js
(not a part of the git repository)- if not set, default configuration from
webpack.config.js
is being used
option
is one of the following:
http-basic
-> enables Basic authentication on virtual printerhttp-apikey
-> enables API-KEY authentication on virtual printer
Examples:
npm run build
npm run build:mini
npm run start
npm run start http-basic
npm run start http-apikey
npm run start:sl1
BACKEND_URL="http://192.168.1.100/" npm run start:mini
- Append all new keys in
src/locales/source/en.json
and add default english translation. - Send
src/locales/source/en.json
file to the content - Copy all files from translators in
src/locales/source
folder. Name of the files should becs_CZ.json
,en_US.json
, ... - Run
src/locales/update_translations.py
script to extract only used strings. - Check the diff.
- Delete
cs_CZ.json
,en_US.json
, ... files. - Commit
- Add icons into the
src/assets/
directory. - Run the
npm run recolor
script, it will do the following:- Fix the primary (orange) color to use only the correct one.
- Create a green version for m1 printers.
The script may not recognize the primary (orange) color. If that happens, you have two choices:
- Add this color into
tools\recolor_icons\config\fix_primary_color.js
. - Or manually change the color of an icon and run the script again.