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

@ -38,7 +38,7 @@
filled
v-model="formData.lightning_invoice_expiry"
label="Invoice expiry (seconds)"
mask="#######"
mask="#######"
>
</q-input>
</div>

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

@ -16,4 +16,4 @@ This extension allows users to create "traditional" invoices (not in the lightni
- add one or more line items
- enter a name & price for each line item
3. You can then use share your invoice link with your customer to receive payment\
![invoice link](https://imgur.com/a/L0JOj4T.png)
![invoice link](https://imgur.com/a/L0JOj4T.png)

View File

@ -1,6 +1,6 @@
{
"name": "Invoices",
"short_description": "Create invoices for your clients.",
"tile": "/invoices/static/image/invoices.png",
"tile": "/invoices/static/image/invoices.png",
"contributors": ["leesalminen"]
}

View File

@ -1,65 +1,67 @@
#invoicePage>.row:first-child>.col-md-6 {
display: flex;
#invoicePage > .row:first-child > .col-md-6 {
display: flex;
}
#invoicePage>.row:first-child>.col-md-6>.q-card {
flex: 1;
#invoicePage > .row:first-child > .col-md-6 > .q-card {
flex: 1;
}
#invoicePage .clear {
margin-bottom: 25px;
margin-bottom: 25px;
}
#printQrCode {
display: none;
display: none;
}
@media (min-width: 1024px) {
#invoicePage>.row:first-child>.col-md-6:first-child>div {
margin-right: 5px;
}
#invoicePage > .row:first-child > .col-md-6:first-child > div {
margin-right: 5px;
}
#invoicePage>.row:first-child>.col-md-6:nth-child(2)>div {
margin-left: 5px;
}
#invoicePage > .row:first-child > .col-md-6:nth-child(2) > div {
margin-left: 5px;
}
}
@media print {
* {
color: black !important;
}
* {
color: black !important;
}
header, button, #payButtonContainer {
display: none !important;
}
header,
button,
#payButtonContainer {
display: none !important;
}
main, .q-page-container {
padding-top: 0px !important;
}
main,
.q-page-container {
padding-top: 0px !important;
}
.q-card {
box-shadow: none !important;
border: 1px solid black;
}
.q-card {
box-shadow: none !important;
border: 1px solid black;
}
.q-item {
padding: 5px;
}
.q-item {
padding: 5px;
}
.q-card__section {
padding: 5px;
}
.q-card__section {
padding: 5px;
}
#printQrCode {
display: block;
}
#printQrCode {
display: block;
}
p {
margin-bottom: 0px !important;
}
p {
margin-bottom: 0px !important;
}
#invoicePage .clear {
margin-bottom: 10px !important;
}
}
#invoicePage .clear {
margin-bottom: 10px !important;
}
}