formatting

This commit is contained in:
ben 2022-11-26 02:11:59 +00:00 committed by dni ⚡
parent 2fcf2153c3
commit ce41e4b689
5 changed files with 13 additions and 7 deletions

View file

@ -13,6 +13,7 @@ from .helpers import fetch_onchain_balance
from .models import Charges, CreateCharge, SatsPayThemes
from loguru import logger
###############CHARGES##########################
@ -179,7 +180,6 @@ async def get_themes(user_id: str) -> List[SatsPayThemes]:
return await get_config(row.user)
################## SETTINGS ###################

View file

@ -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)

View file

@ -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()

View file

@ -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