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):
|
async def m002_add_utc_offset_col(db):
|
||||||
"""
|
"""
|
||||||
support for UTC offset
|
support for UTC offset
|
||||||
"""
|
"""
|
||||||
await db.execute(
|
await db.execute("ALTER TABLE gerty.gertys ADD COLUMN utc_offset INT;")
|
||||||
"ALTER TABLE gerty.gertys ADD COLUMN utc_offset INT;"
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -185,9 +185,7 @@
|
||||||
v-model.trim="formDialog.data.utc_offset"
|
v-model.trim="formDialog.data.utc_offset"
|
||||||
label="UTC Time Offset (e.g. -1)"
|
label="UTC Time Offset (e.g. -1)"
|
||||||
>
|
>
|
||||||
<q-tooltip
|
<q-tooltip>Enter a UTC time offset value (e.g. -1)</q-tooltip>
|
||||||
>Enter a UTC time offset value (e.g. -1)</q-tooltip
|
|
||||||
>
|
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<p>Use the toggles below to control what your Gerty will display</p>
|
<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):
|
def get_screen_slug_by_index(index: int, screens_list):
|
||||||
logger.debug("Index: {0}".format(index))
|
logger.debug("Index: {0}".format(index))
|
||||||
logger.debug("len(screens_list) - 1: {0} ".format(len(screens_list) - 1))
|
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]
|
return list(screens_list)[index - 1]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
@ -302,38 +302,26 @@ async def get_onchain_dashboard(gerty):
|
||||||
)
|
)
|
||||||
text = []
|
text = []
|
||||||
stat = round(r.json()["progressPercent"])
|
stat = round(r.json()["progressPercent"])
|
||||||
text.append(
|
text.append(get_text_item_dict("Progress through current epoch", 12))
|
||||||
get_text_item_dict("Progress through current epoch", 12)
|
|
||||||
)
|
|
||||||
text.append(get_text_item_dict("{0}%".format(stat), 60))
|
text.append(get_text_item_dict("{0}%".format(stat), 60))
|
||||||
areas.append(text)
|
areas.append(text)
|
||||||
|
|
||||||
text = []
|
text = []
|
||||||
stat = r.json()["estimatedRetargetDate"]
|
stat = r.json()["estimatedRetargetDate"]
|
||||||
dt = datetime.fromtimestamp(stat / 1000).strftime("%e %b %Y at %H:%M")
|
dt = datetime.fromtimestamp(stat / 1000).strftime("%e %b %Y at %H:%M")
|
||||||
text.append(
|
text.append(get_text_item_dict("Date of next difficulty adjustment", 12))
|
||||||
get_text_item_dict("Date of next difficulty adjustment", 12)
|
|
||||||
)
|
|
||||||
text.append(get_text_item_dict(dt, 20))
|
text.append(get_text_item_dict(dt, 20))
|
||||||
areas.append(text)
|
areas.append(text)
|
||||||
|
|
||||||
text = []
|
text = []
|
||||||
stat = r.json()["remainingBlocks"]
|
stat = r.json()["remainingBlocks"]
|
||||||
text.append(
|
text.append(get_text_item_dict("Blocks until next adjustment", 12))
|
||||||
get_text_item_dict(
|
|
||||||
"Blocks until next adjustment", 12
|
|
||||||
)
|
|
||||||
)
|
|
||||||
text.append(get_text_item_dict("{0}".format(format_number(stat)), 60))
|
text.append(get_text_item_dict("{0}".format(format_number(stat)), 60))
|
||||||
areas.append(text)
|
areas.append(text)
|
||||||
|
|
||||||
text = []
|
text = []
|
||||||
stat = r.json()["remainingTime"]
|
stat = r.json()["remainingTime"]
|
||||||
text.append(
|
text.append(get_text_item_dict("Blocks until next adjustment", 12))
|
||||||
get_text_item_dict(
|
|
||||||
"Blocks until next adjustment", 12
|
|
||||||
)
|
|
||||||
)
|
|
||||||
text.append(get_text_item_dict(get_time_remaining(stat / 1000, 4), 60))
|
text.append(get_text_item_dict(get_time_remaining(stat / 1000, 4), 60))
|
||||||
areas.append(text)
|
areas.append(text)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -797,7 +797,7 @@
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearFormDialoglnurldevice () {
|
clearFormDialoglnurldevice() {
|
||||||
this.formDialoglnurldevice.data = {
|
this.formDialoglnurldevice.data = {
|
||||||
lnurl_toggle: false,
|
lnurl_toggle: false,
|
||||||
show_message: false,
|
show_message: false,
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,8 @@
|
||||||
</h5>
|
</h5>
|
||||||
<code
|
<code
|
||||||
>{"id": <string>, "name": <string>, "admin":
|
>{"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>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
|
|
@ -259,15 +260,15 @@
|
||||||
<code>{"X-Api-Key": <string>}</code>
|
<code>{"X-Api-Key": <string>}</code>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
<code
|
<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
|
>curl -X POST {{ request.base_url
|
||||||
"Content-type: application/json"
|
}}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>
|
</code>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
||||||
Returns 200 OK (application/json)
|
Returns 200 OK (application/json)
|
||||||
</h5>
|
</h5>
|
||||||
<code
|
<code>{"extension": "updated"}</code>
|
||||||
>{"extension": "updated"}</code
|
|
||||||
>
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue