Ran make format
This commit is contained in:
parent
1a17ec08ee
commit
d856d4c920
5 changed files with 18 additions and 32 deletions
|
|
@ -17,10 +17,9 @@ async def m001_initial(db):
|
|||
"""
|
||||
)
|
||||
|
||||
|
||||
async def m002_add_utc_offset_col(db):
|
||||
"""
|
||||
support for UTC offset
|
||||
"""
|
||||
await db.execute(
|
||||
"ALTER TABLE gerty.gertys ADD COLUMN utc_offset INT;"
|
||||
)
|
||||
await db.execute("ALTER TABLE gerty.gertys ADD COLUMN utc_offset INT;")
|
||||
|
|
|
|||
|
|
@ -179,15 +179,13 @@
|
|||
>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.trim="formDialog.data.utc_offset"
|
||||
label="UTC Time Offset (e.g. -1)"
|
||||
>
|
||||
<q-tooltip
|
||||
>Enter a UTC time offset value (e.g. -1)</q-tooltip
|
||||
>
|
||||
<q-tooltip>Enter a UTC time offset value (e.g. -1)</q-tooltip>
|
||||
</q-input>
|
||||
|
||||
<p>Use the toggles below to control what your Gerty will display</p>
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ async def api_gerty_json(gerty_id: str, p: int = None): # page number
|
|||
def get_screen_slug_by_index(index: int, screens_list):
|
||||
logger.debug("Index: {0}".format(index))
|
||||
logger.debug("len(screens_list) - 1: {0} ".format(len(screens_list) - 1))
|
||||
if(index <= len(screens_list) - 1):
|
||||
if index <= len(screens_list) - 1:
|
||||
return list(screens_list)[index - 1]
|
||||
else:
|
||||
return None
|
||||
|
|
@ -302,38 +302,26 @@ async def get_onchain_dashboard(gerty):
|
|||
)
|
||||
text = []
|
||||
stat = round(r.json()["progressPercent"])
|
||||
text.append(
|
||||
get_text_item_dict("Progress through current epoch", 12)
|
||||
)
|
||||
text.append(get_text_item_dict("Progress through current epoch", 12))
|
||||
text.append(get_text_item_dict("{0}%".format(stat), 60))
|
||||
areas.append(text)
|
||||
|
||||
text = []
|
||||
stat = r.json()["estimatedRetargetDate"]
|
||||
dt = datetime.fromtimestamp(stat / 1000).strftime("%e %b %Y at %H:%M")
|
||||
text.append(
|
||||
get_text_item_dict("Date of next difficulty adjustment", 12)
|
||||
)
|
||||
text.append(get_text_item_dict("Date of next difficulty adjustment", 12))
|
||||
text.append(get_text_item_dict(dt, 20))
|
||||
areas.append(text)
|
||||
|
||||
text = []
|
||||
stat = r.json()["remainingBlocks"]
|
||||
text.append(
|
||||
get_text_item_dict(
|
||||
"Blocks until next adjustment", 12
|
||||
)
|
||||
)
|
||||
text.append(get_text_item_dict("Blocks until next adjustment", 12))
|
||||
text.append(get_text_item_dict("{0}".format(format_number(stat)), 60))
|
||||
areas.append(text)
|
||||
|
||||
text = []
|
||||
stat = r.json()["remainingTime"]
|
||||
text.append(
|
||||
get_text_item_dict(
|
||||
"Blocks until next adjustment", 12
|
||||
)
|
||||
)
|
||||
text.append(get_text_item_dict("Blocks until next adjustment", 12))
|
||||
text.append(get_text_item_dict(get_time_remaining(stat / 1000, 4), 60))
|
||||
areas.append(text)
|
||||
|
||||
|
|
|
|||
|
|
@ -797,7 +797,7 @@
|
|||
LNbits.utils.notifyApiError(error)
|
||||
})
|
||||
},
|
||||
clearFormDialoglnurldevice () {
|
||||
clearFormDialoglnurldevice() {
|
||||
this.formDialoglnurldevice.data = {
|
||||
lnurl_toggle: false,
|
||||
show_message: false,
|
||||
|
|
|
|||
|
|
@ -57,13 +57,14 @@
|
|||
/usermanager/api/v1/users/<user_id></code
|
||||
>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
||||
|
||||
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">
|
||||
Returns 200 OK (application/json)
|
||||
</h5>
|
||||
<code
|
||||
>{"id": <string>, "name": <string>, "admin":
|
||||
<string>, "email": <string>, "password": <string>}</code
|
||||
<string>, "email": <string>, "password":
|
||||
<string>}</code
|
||||
>
|
||||
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
|
|
@ -259,15 +260,15 @@
|
|||
<code>{"X-Api-Key": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>curl -X POST {{ request.base_url }}usermanager/api/v1/extensions?extension=withdraw&userid=user_id&active=true -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H
|
||||
"Content-type: application/json"
|
||||
>curl -X POST {{ request.base_url
|
||||
}}usermanager/api/v1/extensions?extension=withdraw&userid=user_id&active=true
|
||||
-H "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type:
|
||||
application/json"
|
||||
</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">
|
||||
Returns 200 OK (application/json)
|
||||
</h5>
|
||||
<code
|
||||
>{"extension": "updated"}</code
|
||||
>
|
||||
<code>{"extension": "updated"}</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-expansion-item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue