From c2465a42e45964dbb3d375cfcfafda67d580b2a9 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Tue, 26 Nov 2024 12:32:58 +0000 Subject: [PATCH] fix: use quasar screen api --- static/js/tpos.js | 6 +++--- templates/tpos/tpos.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/tpos.js b/static/js/tpos.js index 60d50a2..af69c68 100644 --- a/static/js/tpos.js +++ b/static/js/tpos.js @@ -91,7 +91,7 @@ window.app = Vue.createApp({ }, monochrome: this.$q.localStorage.getItem('lnbits.tpos.color') || false, showPoS: true, - cartDrawer: this.$q.screen.width > 1200, + cartDrawer: this.$q.screen.gt.md, searchTerm: '', categoryFilter: '', cart: new Map(), @@ -180,7 +180,7 @@ window.app = Vue.createApp({ return items }, drawerWidth() { - return this.$q.screen.width < 500 ? 375 : 450 + return this.$q.screen.lt.sm ? 375 : 450 }, formattedCartTax() { return this.formatAmount(this.cartTax, this.currency) @@ -695,7 +695,7 @@ window.app = Vue.createApp({ }, showComplete() { this.complete.show = true - if (this.$q.screen.width < 1200 && this.cartDrawer) { + if (this.$q.screen.lt.lg && this.cartDrawer) { this.cartDrawer = false } } diff --git a/templates/tpos/tpos.html b/templates/tpos/tpos.html index e64ef2f..64e2724 100644 --- a/templates/tpos/tpos.html +++ b/templates/tpos/tpos.html @@ -244,7 +244,7 @@
show-if-above bordered :width="drawerWidth" - :breakpoint="1200" + :breakpoint="1024" >