change prettier and reformat stuff
This commit is contained in:
parent
ca33c276d3
commit
bb05703f2b
5
.github/workflows/formatting.yml
vendored
5
.github/workflows/formatting.yml
vendored
|
@ -27,12 +27,11 @@ jobs:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: |
|
run: |
|
||||||
poetry install
|
poetry install
|
||||||
|
npm install prettier
|
||||||
- name: Check black
|
- name: Check black
|
||||||
run: make checkblack
|
run: make checkblack
|
||||||
- name: Check isort
|
- name: Check isort
|
||||||
run: make checkisort
|
run: make checkisort
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
- name: Check prettier
|
- name: Check prettier
|
||||||
run: |
|
run: make checkprettier
|
||||||
npm install prettier
|
|
||||||
make checkprettier
|
|
||||||
|
|
8
.prettierignore
Normal file
8
.prettierignore
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
**/.git
|
||||||
|
**/.svn
|
||||||
|
**/.hg
|
||||||
|
**/node_modules
|
||||||
|
|
||||||
|
*.yml
|
||||||
|
|
||||||
|
**/lnbits/static
|
8
Makefile
8
Makefile
|
@ -6,8 +6,8 @@ format: prettier isort black
|
||||||
|
|
||||||
check: mypy pyright pylint flake8 checkisort checkblack checkprettier
|
check: mypy pyright pylint flake8 checkisort checkblack checkprettier
|
||||||
|
|
||||||
prettier: $(shell find lnbits -name "*.js" -o -name ".html")
|
prettier:
|
||||||
./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
|
poetry run ./node_modules/.bin/prettier --write lnbits
|
||||||
|
|
||||||
pyright:
|
pyright:
|
||||||
poetry run ./node_modules/.bin/pyright
|
poetry run ./node_modules/.bin/pyright
|
||||||
|
@ -27,8 +27,8 @@ isort:
|
||||||
pylint:
|
pylint:
|
||||||
poetry run pylint *.py lnbits/ tools/ tests/
|
poetry run pylint *.py lnbits/ tools/ tests/
|
||||||
|
|
||||||
checkprettier: $(shell find lnbits -name "*.js" -o -name ".html")
|
checkprettier:
|
||||||
./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
|
poetry run ./node_modules/.bin/prettier --check lnbits
|
||||||
|
|
||||||
checkblack:
|
checkblack:
|
||||||
poetry run black --check .
|
poetry run black --check .
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
filled
|
filled
|
||||||
v-model="formData.lightning_invoice_expiry"
|
v-model="formData.lightning_invoice_expiry"
|
||||||
label="Invoice expiry (seconds)"
|
label="Invoice expiry (seconds)"
|
||||||
mask="#######"
|
mask="#######"
|
||||||
>
|
>
|
||||||
</q-input>
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -58,6 +58,5 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
|
|
@ -395,14 +395,23 @@
|
||||||
addExtensionsManifest() {
|
addExtensionsManifest() {
|
||||||
const addManifest = this.formAddExtensionsManifest.trim()
|
const addManifest = this.formAddExtensionsManifest.trim()
|
||||||
const manifests = this.formData.lnbits_extensions_manifests
|
const manifests = this.formData.lnbits_extensions_manifests
|
||||||
if (addManifest && addManifest.length && !manifests.includes(addManifest)) {
|
if (
|
||||||
this.formData.lnbits_extensions_manifests = [...manifests, addManifest]
|
addManifest &&
|
||||||
|
addManifest.length &&
|
||||||
|
!manifests.includes(addManifest)
|
||||||
|
) {
|
||||||
|
this.formData.lnbits_extensions_manifests = [
|
||||||
|
...manifests,
|
||||||
|
addManifest
|
||||||
|
]
|
||||||
this.formAddExtensionsManifest = ''
|
this.formAddExtensionsManifest = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeExtensionsManifest(manifest) {
|
removeExtensionsManifest(manifest) {
|
||||||
const manifests = this.formData.lnbits_extensions_manifests
|
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() {
|
restartServer() {
|
||||||
LNbits.api
|
LNbits.api
|
||||||
|
|
|
@ -16,4 +16,4 @@ This extension allows users to create "traditional" invoices (not in the lightni
|
||||||
- add one or more line items
|
- add one or more line items
|
||||||
- enter a name & price for each line item
|
- enter a name & price for each line item
|
||||||
3. You can then use share your invoice link with your customer to receive payment\
|
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)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Invoices",
|
"name": "Invoices",
|
||||||
"short_description": "Create invoices for your clients.",
|
"short_description": "Create invoices for your clients.",
|
||||||
"tile": "/invoices/static/image/invoices.png",
|
"tile": "/invoices/static/image/invoices.png",
|
||||||
"contributors": ["leesalminen"]
|
"contributors": ["leesalminen"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,65 +1,67 @@
|
||||||
#invoicePage>.row:first-child>.col-md-6 {
|
#invoicePage > .row:first-child > .col-md-6 {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
#invoicePage>.row:first-child>.col-md-6>.q-card {
|
#invoicePage > .row:first-child > .col-md-6 > .q-card {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#invoicePage .clear {
|
#invoicePage .clear {
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#printQrCode {
|
#printQrCode {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 1024px) {
|
@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;
|
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;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
* {
|
* {
|
||||||
color: black !important;
|
color: black !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
header, button, #payButtonContainer {
|
header,
|
||||||
display: none !important;
|
button,
|
||||||
}
|
#payButtonContainer {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
main, .q-page-container {
|
main,
|
||||||
padding-top: 0px !important;
|
.q-page-container {
|
||||||
}
|
padding-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.q-card {
|
.q-card {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-item {
|
.q-item {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-card__section {
|
.q-card__section {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#printQrCode {
|
#printQrCode {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-bottom: 0px !important;
|
margin-bottom: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#invoicePage .clear {
|
#invoicePage .clear {
|
||||||
margin-bottom: 10px !important;
|
margin-bottom: 10px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user