diff --git a/src/components/BaseComponents/ConfirmationModal.vue b/src/components/BaseComponents/ConfirmationModal.vue deleted file mode 100644 index 438ff362e01d693aa2d6663c2176e167c5281de1..0000000000000000000000000000000000000000 --- a/src/components/BaseComponents/ConfirmationModal.vue +++ /dev/null @@ -1,38 +0,0 @@ -<!-- ConfirmationModal.vue --> -<template> - <div class="modal" :id="modalId" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true" - data-bs-backdrop="static" data-bs-keyboard="false"> - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <h5 class="modal-title" id="modalLabel">{{ title }}</h5> - <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> - </div> - <div class="modal-body"> - {{ message }} - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ cancelButtonText }}</button> - <button type="button" class="btn btn-primary" @click="confirmAction">{{ confirmButtonText }}</button> - </div> - </div> - </div> - </div> - </template> - - <script setup> - import { ref } from 'vue'; - - const modalId = ref(null); - - const title = 'Confirm Action'; - const message = 'Are you sure you want to proceed?'; - const confirmButtonText = 'Confirm'; - const cancelButtonText = 'Cancel'; - - // Methods - function confirmAction() { - emit('confirm'); - } - </script> - \ No newline at end of file diff --git a/src/components/Shop/ItemShop.vue b/src/components/Shop/ItemShop.vue index 60f544d0c4897cdc076e852ecc38f2a5a629b36b..350603abae74b0c8f6e94b9d5ae33392e42938f8 100644 --- a/src/components/Shop/ItemShop.vue +++ b/src/components/Shop/ItemShop.vue @@ -10,13 +10,13 @@ <div class="container d-flex justify-content-center"> <div class="row col-md-10"> <div class="col-md-12"> - <h1>Stash</h1> + <h1>Utvidelser</h1> <div class="category row mb-2 m-2"> <div class="card text-center justify-content-center align-items-center" style="width: 8rem; border: none"> <img src="../../assets/items/adfree.png" class="card-img-top" alt="..." style="width: 100px; height: 100px;" /> <div class="card-body"> - <h5 class="card-title">Adfree</h5> + <h5 class="card-title">Reklamefri</h5> <button type="button" class="btn btn-primary" id="buttonStyle" data-toggle="modal" data-target="#adfreeModal"> +35kr @@ -37,7 +37,7 @@ </div> </div> <div class="col-md-12"> - <h1>Items</h1> + <h1>Banner</h1> <div class="category row mb-2 m-2"> <div v-for="product in products" :key="product.id" class="card text-center d-flex justify-content-center align-items-center" @@ -47,24 +47,24 @@ <div class="card-body"> <h5 class="card-title">{{ product.itemName }}</h5> <h6>{{ product.price }}<img src="../../assets/items/pigcoin.png" style="width: 2rem" /></h6> - <ShopButton v-if="!product.alreadyBought" button-text="Buy item" :disabled="product.price > points" + <ShopButton v-if="!product.alreadyBought" button-text="Kjøp gjennstand" :disabled="product.price > points" @click="buyItem(product.id)" /> - <p v-else>Owned</p> + <p v-else>Eid</p> </div> </div> </div> </div> <div class="col-md-12"> - <h1>Cool items</h1> + <h1>Tjenester</h1> <div class="category row mb-2 m-2"> <div class="card text-center d-flex justify-content-center align-items-center" style="width: 8rem; border: none"> <img src="../../assets/items/coffee.jpg" class="card-img-top" alt="..." style="width: 100px; height: 100px;"> <div class="card-body"> - <h5 class="card-title">Free Coffee</h5> + <h5 class="card-title">Gratis kaffe</h5> <h6>500<img src="../../assets/items/pigcoin.png" style="width: 2rem"></h6> - <ShopButton button-text="Buy item" :disabled="500 > points" @click="buySomething()" /> + <ShopButton button-text="Kjøp gjennstand" :disabled="500 > points" @click="buySomething()" /> </div> </div> <div class="card text-center d-flex justify-content-center align-items-center" @@ -72,9 +72,9 @@ <img src="../../assets/items/viaplay.jpg" class="card-img-top" alt="..." style="width: 100px; height: 100px;"> <div class="card-body"> - <h5 class="card-title">1 Month</h5> + <h5 class="card-title">1 Måned</h5> <h6>10 000<img src="../../assets/items/pigcoin.png" style="width: 2rem"></h6> - <ShopButton button-text="Buy item" :disabled="10000 > points" @click="buySomething()" /> + <ShopButton button-text="Kjøp gjennstand" :disabled="10000 > points" @click="buySomething()" /> </div> </div> <div class="card text-center d-flex justify-content-center align-items-center" @@ -84,7 +84,7 @@ <div class="card-body"> <h5 class="card-title">-10% rabatt</h5> <h6>1000<img src="../../assets/items/pigcoin.png" style="width: 2rem"></h6> - <ShopButton button-text="Buy item" :disabled="1000 > points" @click="buySomething()" /> + <ShopButton button-text="Kjøp gjennstand" :disabled="1000 > points" @click="buySomething()" /> </div> </div> </div> @@ -157,7 +157,7 @@ import handleUnknownError from '@/components/Exceptions/unkownErrorHandler'; let apiUrl = import.meta.env.VITE_APP_API_URL; const products = ref([] as any); -const points = ref(); +const points = ref(0 as any); /** * Retrieves the store's products and updates the products list. @@ -178,7 +178,9 @@ const getStore = async () => { const getPoints = async () => { try { const response = await UserService.getUser(); - points.value = response.point?.currentPoints; + if (response.point?.currentPoints !== null) { + points.value = response.point?.currentPoints; + } } catch (error) { handleUnknownError(error); console.log(error); diff --git a/src/components/UserProfile/MyProfile.vue b/src/components/UserProfile/MyProfile.vue index e6a4871922b77d5dd24d5903c11ce18e9645f492..9ef9add95c9d8b50f1aa400a82d3d817e584345e 100644 --- a/src/components/UserProfile/MyProfile.vue +++ b/src/components/UserProfile/MyProfile.vue @@ -334,7 +334,7 @@ const toUpdateUserSettings = () => { height: 200px; } -@media (max-width: 940px) { +@media (max-width: 980px) { #banner { height: 320px; }