Prusa-Link-Web
Prusa-Link-Web copied to clipboard
Prusa Web interface resources
PrusaLink Web
PrusaLink Web is a web interface for Prusa printers. Web interface is specified using the OpenAPI format in this file: spec/openapi.yaml.
Install
npm install
Commands
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.jsis 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
Custom backend (to try on real printer)
BACKEND_URL="http://192.168.1.100/" npm run start:mini
Translations
- Append all new keys in
src/locales/source/en.jsonand add default english translation. - Send
src/locales/source/en.jsonfile to the content - Copy all files from translators in
src/locales/sourcefolder. Name of the files should becs_CZ.json,en_US.json, ... - Run
src/locales/update_translations.pyscript to extract only used strings. - Check the diff.
- Delete
cs_CZ.json,en_US.json, ... files. - Commit
Icons
- Add icons into the
src/assets/directory. - Run the
npm run recolorscript, 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.