app endpoints, enforce email verification

This commit is contained in:
2023-08-19 14:10:40 +02:00
parent 71a2927372
commit 5505313e3e
6 changed files with 169 additions and 77 deletions

View File

@@ -18,7 +18,9 @@
</div>
<div v-else class="wrapper">
<div class="data">
<h2>Billing</h2>
<h2>Purchase</h2>
<p>Ready to buy? Please once again check that all the right items are in your cart.</p>
<!--<h2>Billing</h2>
<table class="billing-info-table">
<tr v-if="settings.requiresAddress">
<td>Street and house number</td>
@@ -39,8 +41,8 @@
</table>
<div v-if="settings.requiresSpecialToken">
<!-- TODO: FUTURE: Implement -->
</div>
TODO: FUTURE: Implement
</div> -->
<button id="buy-button" @click="preparePayment();">Buy now</button>
</div>
<div class="cart">
@@ -293,6 +295,13 @@ export default {
window.location.href = text;
}, 300 );
} );
} else if ( res.status === 428 ) {
res.text().then( text => {
if ( text === 'ERR_MAIL_UNCONFIRMED' ) {
this.$refs.notification.cancelNotification( prep );
this.$refs.notification.createNotification( 'Please confirm your email address to proceed', 10, 'error', 'high' );
}
} );
}
} ).catch( err => {
console.error( err );