prusa3d / Prusa-Link-Web

Prusa Web interface resources
GNU General Public License v3.0
114 stars 50 forks source link

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:

{config} is one of the following:

option is one of the following:

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

  1. Append all new keys in src/locales/source/en.json and add default english translation.
  2. Send src/locales/source/en.json file to the content
  3. Copy all files from translators in src/locales/source folder. Name of the files should be cs_CZ.json, en_US.json, ...
  4. Run src/locales/update_translations.py script to extract only used strings.
  5. Check the diff.
  6. Delete cs_CZ.json, en_US.json, ... files.
  7. Commit

Icons

  1. Add icons into the src/assets/ directory.
  2. Run the npm run recolor script, it will do the following:
    1. Fix the primary (orange) color to use only the correct one.
    2. Create a green version for m1 printers.

The script may not recognize the primary (orange) color. If that happens, you have two choices:

  1. Add this color into tools\recolor_icons\config\fix_primary_color.js.
  2. Or manually change the color of an icon and run the script again.