diff --git a/README.md b/README.md index 00570169..6eda7149 100644 --- a/README.md +++ b/README.md @@ -49,3 +49,49 @@ npm run build ### Customize the configuration See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js). + +### Reverse proxy + +For Quasar Vue Router with history mode, add this fallback URL to allow refreshes: https://router.vuejs.org/guide/essentials/history-mode.html#HTML5-Mode + +More info: https://stackoverflow.com/questions/36399319/vue-router-return-404-when-revisit-to-the-url + +`Caddyfile`: + +``` +# CORS snippet by https://kalnytskyi.com/posts/setup-cors-caddy-2/ +(cors) { + @cors_preflight method OPTIONS + @cors header Origin {args.0} + + handle @cors_preflight { + header Access-Control-Allow-Origin "{args.0}" + header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE" + header Access-Control-Allow-Headers "Content-Type" + header Access-Control-Max-Age "3600" + respond "" 204 + } + + handle @cors { + header Access-Control-Allow-Origin "{args.0}" + header Access-Control-Expose-Headers "Link" + } +} +host.com { + import cors * + encode gzip + + header /service-worker.js { + Service-Worker-Allowed "/" + Cache-Control "no-cache" + } + + # SPA root + root * /usr/share/caddy/cashu.me/ + + # quasar vue router fallback history mode + try_files {path} /index.html + + file_server +} +``` diff --git a/src/components/AndroidPWAPrompt.vue b/src/components/AndroidPWAPrompt.vue new file mode 100644 index 00000000..88df2bfa --- /dev/null +++ b/src/components/AndroidPWAPrompt.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/BalanceView.vue b/src/components/BalanceView.vue index 1518d9c1..7bc2bb1f 100644 --- a/src/components/BalanceView.vue +++ b/src/components/BalanceView.vue @@ -242,3 +242,11 @@ export default defineComponent({ }, }); + diff --git a/src/components/MainHeader.vue b/src/components/MainHeader.vue index 89bcfd52..33ae1343 100644 --- a/src/components/MainHeader.vue +++ b/src/components/MainHeader.vue @@ -9,6 +9,7 @@ color="primary" aria-label="Menu" @click="toggleLeftDrawer" + :disable="uiStore.globalMutexLock" /> @@ -81,6 +83,16 @@ Wallet configuration + Terms + + + + + + Terms + Terms of Service + + Links -
+
- +
Join a mint
@@ -33,7 +38,7 @@ />
-
+ + diff --git a/src/components/PaymentRequestDialog.vue b/src/components/PaymentRequestDialog.vue index c774d13a..41f4d2c7 100644 --- a/src/components/PaymentRequestDialog.vue +++ b/src/components/PaymentRequestDialog.vue @@ -38,9 +38,15 @@
- - - {{ getShortUrl(activeMintUrl) }} + + + {{ getShortUrl(chosenMintUrl) }}
@@ -118,6 +124,8 @@ export default defineComponent({ amountInputValue: "", amountLabelDefault: "Add amount", amountLabel: "Add amount", + chosenMintUrl: "Any mint", + memo: "", }; }, computed: { @@ -134,14 +142,33 @@ export default defineComponent({ toggleUnit() { this.paymentRequestAmount = undefined; this.amountLabel = this.amountLabelDefault; - this.newPaymentRequest(this.paymentRequestAmount); + this.newPaymentRequest( + this.paymentRequestAmount, + this.memo, + this.chosenMintUrl + ); }, newRequest() { - this.newPaymentRequest(this.paymentRequestAmount); + this.newPaymentRequest( + this.paymentRequestAmount, + this.memo, + this.chosenMintUrl + ); }, getShortUrl(url) { return getShortUrl(url); }, + setActiveMintUrl() { + if (this.activeMintUrl == this.chosenMintUrl) { + return; + } + this.chosenMintUrl = this.activeMintUrl; + this.newPaymentRequest( + this.paymentRequestAmount, + this.memo, + this.chosenMintUrl + ); + }, startEditingAmount() { this.isEditingAmount = true; this.$nextTick(() => { @@ -162,7 +189,11 @@ export default defineComponent({ this.activeUnit ); } - this.newPaymentRequest(this.paymentRequestAmount); + this.newPaymentRequest( + this.paymentRequestAmount, + this.memo, + this.chosenMintUrl + ); this.isEditingAmount = false; this.amountInputValue = ""; }, diff --git a/src/components/ReceiveTokenDialog.vue b/src/components/ReceiveTokenDialog.vue index da7889f1..ef9fdade 100644 --- a/src/components/ReceiveTokenDialog.vue +++ b/src/components/ReceiveTokenDialog.vue @@ -25,7 +25,7 @@ label="Paste Cashu token" type="textarea" autofocus - class="q-mb-lg" + class="q-mb-lg cashub-nowrap" @keyup.enter="receiveIfDecodes" >