work on purchase view

This commit is contained in:
2023-06-24 09:17:33 +02:00
parent f97d8ab0ec
commit 2d5308b140
4 changed files with 30 additions and 6 deletions

View File

@@ -49,8 +49,8 @@ router.beforeEach( ( to, from ) => {
return { name: 'adminHome' };
} else if ( UserAccountPages.includes( to.name ) && !isUserAuthenticated ) {
return { name: 'login' };
} else if ( !isUserAuthenticated && to.name === 'purchase' && authRequired ) {
return { name: 'login' };
} else if ( isUserAuthenticated && to.name === 'login' ) {
return { name: 'account' };
} else if ( !isUserAuthenticated && to.name === 'pay' ) {
return { name: 'purchase' };
} else if ( to.name.substring( 0, 5 ) === 'setup' && !backendStore.getVisitedSetupPages[ to.name.substring( 5 ).toLowerCase() ] && to.name.substring( 5 ).toLowerCase() !== 'start' && to.name.substring( 5 ).toLowerCase() !== 'root' ) {

View File

@@ -10,7 +10,7 @@
import { defineStore } from "pinia";
export const useUserStore = defineStore ( 'user', {
state: () => ( { 'isUserAuth': false, 'isAdminAuth': true, 'userPermissions': {} } ),
state: () => ( { 'isUserAuth': true, 'isAdminAuth': true, 'userPermissions': {} } ),
getters: {
getUserAuthenticated: ( state ) => state.isUserAuth,
getAdminAuthenticated: ( state ) => state.isAdminAuth,

View File

@@ -19,8 +19,13 @@
<div v-else class="wrapper">
<div class="data">
<h2>Billing</h2>
<router-link to="/pay">Buy now</router-link>
<table class="billing-info-table">
<tr>
<td>Street and house number</td>
<td><input type="text" name="address" id="address"></td>
</tr>
</table>
<router-link to="/pay" id="buy-button">Buy now</router-link>
</div>
<div class="cart">
<div class="cart-list">
@@ -44,6 +49,25 @@
</template>
<style scoped>
#buy-button {
background-color: var( --accent-background );
padding: 2% 4%;
border-radius: 50px;
color: var( --secondary-color );
text-decoration: none;
transition: all 0.5s;
font-size: 100%;
margin-top: 4%;
}
#buy-button:hover {
margin-top: 2%;
border-radius: 20px;
padding: 3% 6%;
font-size: 130%;
background-color: var( --accent-background-hover );
}
.purchase {
height: 100%;
display: flex;

View File

@@ -1,7 +1,7 @@
<!--
* libreevent - StartPageEditorView.vue
*
* Created by Janis Hutz 05/12/2023, Licensed under the GPL V3 License
* Created by Janis Hutz 06/24/2023, Licensed under the GPL V3 License
* https://janishutz.com, development@janishutz.com
*
*