change prettier and reformat stuff

This commit is contained in:
dni ⚡ 2023-02-20 11:40:10 +01:00
parent ca33c276d3
commit bb05703f2b
9 changed files with 73 additions and 56 deletions

View File

@ -27,12 +27,11 @@ jobs:
- name: Install packages
run: |
poetry install
npm install prettier
- name: Check black
run: make checkblack
- name: Check isort
run: make checkisort
- uses: actions/setup-node@v3
- name: Check prettier
run: |
npm install prettier
make checkprettier
run: make checkprettier

8
.prettierignore Normal file
View File

@ -0,0 +1,8 @@
**/.git
**/.svn
**/.hg
**/node_modules
*.yml
**/lnbits/static

View File

@ -6,8 +6,8 @@ format: prettier isort black
check: mypy pyright pylint flake8 checkisort checkblack checkprettier
prettier: $(shell find lnbits -name "*.js" -o -name ".html")
./node_modules/.bin/prettier --write lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js lnbits/extensions/*/static/components/*/*.js lnbits/extensions/*/static/components/*/*.html
prettier:
poetry run ./node_modules/.bin/prettier --write lnbits
pyright:
poetry run ./node_modules/.bin/pyright
@ -27,8 +27,8 @@ isort:
pylint:
poetry run pylint *.py lnbits/ tools/ tests/
checkprettier: $(shell find lnbits -name "*.js" -o -name ".html")
./node_modules/.bin/prettier --check lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js lnbits/extensions/*/static/components/*/*.js lnbits/extensions/*/static/components/*/*.html
checkprettier:
poetry run ./node_modules/.bin/prettier --check lnbits
checkblack:
poetry run black --check .

View File

@ -58,6 +58,5 @@
</div>
<br />
</div>
</q-card-section>
</q-tab-panel>

View File

@ -395,14 +395,23 @@
addExtensionsManifest() {
const addManifest = this.formAddExtensionsManifest.trim()
const manifests = this.formData.lnbits_extensions_manifests
if (addManifest && addManifest.length && !manifests.includes(addManifest)) {
this.formData.lnbits_extensions_manifests = [...manifests, addManifest]
if (
addManifest &&
addManifest.length &&
!manifests.includes(addManifest)
) {
this.formData.lnbits_extensions_manifests = [
...manifests,
addManifest
]
this.formAddExtensionsManifest = ''
}
},
removeExtensionsManifest(manifest) {
const manifests = this.formData.lnbits_extensions_manifests
this.formData.lnbits_extensions_manifests = manifests.filter(m => m !== manifest)
this.formData.lnbits_extensions_manifests = manifests.filter(
m => m !== manifest
)
},
restartServer() {
LNbits.api

View File

@ -1,8 +1,8 @@
#invoicePage>.row:first-child>.col-md-6 {
#invoicePage > .row:first-child > .col-md-6 {
display: flex;
}
#invoicePage>.row:first-child>.col-md-6>.q-card {
#invoicePage > .row:first-child > .col-md-6 > .q-card {
flex: 1;
}
@ -15,26 +15,28 @@
}
@media (min-width: 1024px) {
#invoicePage>.row:first-child>.col-md-6:first-child>div {
#invoicePage > .row:first-child > .col-md-6:first-child > div {
margin-right: 5px;
}
#invoicePage>.row:first-child>.col-md-6:nth-child(2)>div {
#invoicePage > .row:first-child > .col-md-6:nth-child(2) > div {
margin-left: 5px;
}
}
@media print {
* {
color: black !important;
}
header, button, #payButtonContainer {
header,
button,
#payButtonContainer {
display: none !important;
}
main, .q-page-container {
main,
.q-page-container {
padding-top: 0px !important;
}