This commit is contained in:
Tiago Vasconcelos 2025-02-06 13:10:16 +00:00 committed by GitHub
parent 432b3a0fe0
commit 736699af94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,8 @@
{% extends "public.html" %} {% block page_container %} {% extends "public.html" %} {% block page_container %}
<div class="row q-col-gutter-md justify-center main"> <q-page-container>
<q-page class="q-px-md q-py-lg" :class="{'q-px-lg': $q.screen.gt.xs}">
{% block page %}
<div class="row q-col-gutter-md justify-center main">
<div class="col-10 col-md-8 col-lg-6 q-gutter-y-md"> <div class="col-10 col-md-8 col-lg-6 q-gutter-y-md">
<q-card> <q-card>
<q-card-section class="grid"> <q-card-section class="grid">
@ -58,9 +61,9 @@
</q-card-section> </q-card-section>
</q-card> </q-card>
</div> </div>
</div> </div>
{% endblock %} {% block scripts %} {% endblock %} {% block scripts %}
<style> <style>
main { main {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -95,8 +98,8 @@
padding: 1rem; padding: 1rem;
} }
} }
</style> </style>
<script> <script>
window.app = Vue.createApp({ window.app = Vue.createApp({
el: '#vue', el: '#vue',
mixins: [window.windowMixin], mixins: [window.windowMixin],
@ -122,11 +125,16 @@
methods: { methods: {
async setPassword() { async setPassword() {
try { try {
await LNbits.api.request('PUT', '/api/v1/auth/first_install', null, { await LNbits.api.request(
'PUT',
'/api/v1/auth/first_install',
null,
{
username: this.loginData.username, username: this.loginData.username,
password: this.loginData.password, password: this.loginData.password,
password_repeat: this.loginData.passwordRepeat password_repeat: this.loginData.passwordRepeat
}) }
)
window.location.href = '/admin' window.location.href = '/admin'
} catch (e) { } catch (e) {
@ -135,5 +143,8 @@
} }
} }
}) })
</script> </script>
{% endblock %}
</q-page>
</q-page-container>
{% endblock %} {% endblock %}