mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 06:48:02 +01:00
formatting
This commit is contained in:
parent
2fcf2153c3
commit
ce41e4b689
5 changed files with 13 additions and 7 deletions
|
@ -13,6 +13,7 @@ from .helpers import fetch_onchain_balance
|
|||
from .models import Charges, CreateCharge, SatsPayThemes
|
||||
|
||||
from loguru import logger
|
||||
|
||||
###############CHARGES##########################
|
||||
|
||||
|
||||
|
@ -97,7 +98,7 @@ async def update_charge(charge_id: str, **kwargs) -> Optional[Charges]:
|
|||
|
||||
async def get_charge(charge_id: str) -> Charges:
|
||||
row = await db.fetchone("SELECT * FROM satspay.charges WHERE id = ?", (charge_id,))
|
||||
|
||||
|
||||
return Charges.from_row(row) if row else None
|
||||
|
||||
|
||||
|
@ -179,7 +180,6 @@ async def get_themes(user_id: str) -> List[SatsPayThemes]:
|
|||
return await get_config(row.user)
|
||||
|
||||
|
||||
|
||||
################## SETTINGS ###################
|
||||
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@ class Charges(BaseModel):
|
|||
def must_call_webhook(self):
|
||||
return self.webhook and self.paid and self.config.webhook_success == False
|
||||
|
||||
|
||||
class SatsPayThemes(BaseModel):
|
||||
css_id: str = Query(None)
|
||||
title: str = Query(None)
|
||||
|
|
|
@ -23,7 +23,11 @@
|
|||
color="primary"
|
||||
@click="getThemes();formDialogThemes.show = true"
|
||||
>New CSS Theme
|
||||
<q-tooltip>For security reason, custom css is only available to server admins.</q-tooltip></q-btn>
|
||||
<q-tooltip
|
||||
>For security reason, custom css is only available to server
|
||||
admins.</q-tooltip
|
||||
></q-btn
|
||||
>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
|
@ -276,7 +280,7 @@
|
|||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<q-card v-if="admin == 'True'">
|
||||
<q-card v-if="admin == 'True'">
|
||||
<q-card-section>
|
||||
<div class="row items-center no-wrap q-mb-md">
|
||||
<div class="col">
|
||||
|
@ -949,8 +953,8 @@
|
|||
},
|
||||
created: async function () {
|
||||
console.log(this.admin)
|
||||
if(this.admin == "True"){
|
||||
await this.getThemes()
|
||||
if (this.admin == 'True') {
|
||||
await this.getThemes()
|
||||
}
|
||||
await this.getCharges()
|
||||
await this.getWalletConfig()
|
||||
|
|
|
@ -19,6 +19,7 @@ from loguru import logger
|
|||
|
||||
templates = Jinja2Templates(directory="templates")
|
||||
|
||||
|
||||
@satspay_ext.get("/", response_class=HTMLResponse)
|
||||
async def index(request: Request, user: User = Depends(check_user_exists)):
|
||||
admin = False
|
||||
|
|
|
@ -151,7 +151,7 @@ async def api_charge_balance(charge_id):
|
|||
|
||||
return {**public_charge(charge)}
|
||||
|
||||
|
||||
|
||||
#############################THEMES##########################
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue