Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix shit
Browse files Browse the repository at this point in the history
dni committed Oct 11, 2024

Verified

This commit was signed with the committer’s verified signature.
dni dni ⚡
1 parent 0f7c4a5 commit fa6f162
Showing 5 changed files with 18 additions and 17 deletions.
2 changes: 2 additions & 0 deletions static/js/display.js
Original file line number Diff line number Diff line change
@@ -33,6 +33,8 @@ window.app = Vue.createApp({
},
computed: {
formatDescription() {
console.log(this.info)
debugger
return LNbits.utils.convertMarkdown(this.info)
}
},
7 changes: 4 additions & 3 deletions static/js/register.js
Original file line number Diff line number Diff line change
@@ -47,10 +47,11 @@ window.app = Vue.createApp({
},
decodeQR(res) {
this.sendCamera.show = false
const value = res[0].rawValue.split('//')[1]
LNbits.api
.request('GET', '/events/api/v1/register/ticket/' + res.split('//')[1])
.then(response => {
this.$q.notify({
.request('GET', `/events/api/v1/register/ticket/${value}`)
.then(() => {
Quasar.Notify.create({
type: 'positive',
message: 'Registered!'
})
22 changes: 9 additions & 13 deletions templates/events/error.html
Original file line number Diff line number Diff line change
@@ -18,18 +18,14 @@ <h5 class="q-my-none">{{ event_error }}</h5>
</q-card-section>
</q-card>
</div>
</div>
{% endblock %} {% block scripts %}

{% endblock %} {% block scripts %}

<script>
new Vue({
el: '#vue',
mixins: [windowMixin],
data: function () {
return {}
}
})
</script>
<script>
window.app = Vue.createApp({
el: '#vue',
mixins: [windowMixin],
})
</script>

{% endblock %}
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/events/register.html
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ <h3 class="q-my-none">{{ event_name }} Registration</h3>
<q-card class="q-pa-lg q-pt-xl">
<div class="text-center q-mb-lg">
<qrcode-stream
@decode="decodeQR"
@detect="decodeQR"
class="rounded-borders"
></qrcode-stream>
</div>
2 changes: 2 additions & 0 deletions views_api.py
Original file line number Diff line number Diff line change
@@ -69,6 +69,8 @@ async def api_event_create(
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN, detail="Not your event."
)
for k, v in data.dict().items():
setattr(event, k, v)
event = await update_event(event)
else:
event = await create_event(data)

0 comments on commit fa6f162

Please sign in to comment.