- adds lnbits-extension-settings-form. which is just the plain form of the settings component.
- adds lnbits-extension-settings-btn-dialog. which is the form wrapped into a dialog with a cog button.
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
closes#1954
this PR add cache busting to `/static`
additionally i combined `lnbits/core/static` with `lnbits/static`, it was not necessary and added a lot of duplicate code for cache busting. now you have to include all static files inside the html files with `{{ static_url_for("static", "app.css" ) }}`
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* [FEAT] add extension functionality to lnbits-cli
WIP
draft cli commands for vlad :)
* add extension list command
* [feat] lnbits-cli add install, uninstall and upgrade
* feat: load settings from DB
* refactor: simplify settings loading
* feat: show current version if installed
* feat: add mor emessages
* feat: basic DB install
* feat: add extension
* feat: do not install if the server is up
* feat: add logic for uninstall
* refactor: prepare for upgrade
* feat: check extension before upgrade
* refactor: stuff
* fix: have a default value
* feat: use the API logic
* feat: use pi methods for un-install
* refactor: extract _select_release
* feat: add flags
* feat: check if extension already up to date
* refactor: use `_run_async`
* feat: install all extensions
* feat: install online
* fix: api install
* fix: API upgrade & install
* feat: add API uninstall
* failed typo
* typo running
* url duplication
* [fix] provide short-options too (same as upgrade command)
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* make black
* fix: fail if .superuser file not found; add `--admin-user` option
* fix: ambiguous use of `logger.debug`
- register_new_ext_routes must not be None
- `logger.debug` was used because it allowed any arguments, but that was a bad idea
- now an explicit empty `_do_nothing(*_)` function is used
* fix: load settings
* doc: updated `--source-repo`
* chore: rename `upgrade` to `update`
* refactor: use `@annotation` for making commands async
* fix: code checks
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* feat: add useful query helpers for insert and update
i saw this bits of code all over the codebase, this `helpers.py`
tries to abstract that away and make it more readable.