{{ event.title }}
@@ -117,7 +111,6 @@ import { computed, Ref, ref } from "vue";
import { useRoute } from "vue-router";
import SMButton from "../components/SMButton.vue";
import SMHTML from "../components/SMHTML.vue";
-import SMMessage from "../components/SMMessage.vue";
import SMAttachments from "../components/SMAttachments.vue";
import { api } from "../helpers/api";
import { Event, EventResponse } from "../helpers/api.types";
@@ -137,11 +130,6 @@ const event: Ref
= ref(null);
const route = useRoute();
const pageLoading = ref(true);
-/**
- * Page message.
- */
-const formMessage = ref("");
-
/**
* Page error.
*/
@@ -256,8 +244,6 @@ const computedAgeNotice = computed(() => {
* Load the page data.
*/
const handleLoad = async () => {
- formMessage.value = "";
-
try {
let result = await api.get({
url: "/events/{event}",
@@ -284,13 +270,7 @@ const handleLoad = async () => {
pageError.value = 404;
}
} catch (error) {
- if (error.status == 404) {
- pageError.value = 404;
- } else {
- formMessage.value =
- error.data?.message ||
- "Could not load event information from the server.";
- }
+ pageError.value = error.status;
} finally {
pageLoading.value = false;
}
@@ -304,17 +284,17 @@ handleLoad();
display: flex;
justify-content: center;
align-items: center;
- min-height: map-get($spacer, 5) * 4;
+ min-height: 256px;
height: 20vw;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
- background-color: #eee;
+ background-color: var(--base-color);
transition: background-image 0.2s;
.workshop-image-loader {
- font-size: 5rem;
- color: $secondary-color;
+ font-size: 350%;
+ color: var(--base-color);
}
}
@@ -322,85 +302,75 @@ handleLoad();
display: flex;
flex-direction: row;
- .workshop-body,
- .workshop-info {
- line-height: 1.5rem;
- }
-
.workshop-body {
flex: 1;
text-align: left;
}
.workshop-title {
- line-height: 1.15em;
margin-bottom: 32px;
}
.workshop-info {
- width: 18rem;
- margin-left: 2rem;
+ width: 288px;
+ margin-left: 32px;
h4 {
- margin-bottom: 0.25rem;
display: flex;
align-items: center;
- height: 1rem;
.icon {
display: inline-block;
- width: 1rem;
- margin-right: 0.5rem;
+ font-size: 20px;
+ margin-right: 8px;
text-align: center;
}
}
p {
margin: 0;
- padding-left: 1.5rem;
+ padding-left: 28px;
font-size: 90%;
}
.workshop-registration {
- margin-top: 1.5rem;
- line-height: 1.25rem;
+ margin-top: 32px;
}
.workshop-registration-none,
.workshop-registration-soon,
.workshop-registration-message {
- border: 1px solid #ffeeba;
- background-color: #fff3cd;
- color: #856404;
+ border: 1px solid var(--warning-color-light);
+ background-color: var(--warning-color-lighter);
+ color: var(--warning-color-dark);
text-align: center;
font-size: 80%;
- padding: 0.5rem;
+ padding: 8px;
}
.workshop-registration-closed,
.workshop-registration-cancelled {
- border: 1px solid #f5c2c7;
- background-color: #f8d7da;
- color: #842029;
+ border: 1px solid var(--danger-color-light);
+ background-color: var(--danger-color-lighter);
+ color: var(--danger-color-dark);
text-align: center;
font-size: 80%;
- padding: 0.5rem;
+ padding: 8px;
}
.workshop-date,
.workshop-location,
.workshop-price,
.workshop-ages {
- padding: 0 1rem;
+ padding: 0 16px;
}
.workshop-ages p {
- margin-top: 0.5rem;
- margin-left: 1rem;
- padding: 0 0 0 0.5rem;
+ margin-top: 8px;
+ margin-left: 16px;
+ padding: 0 0 0 8px;
font-size: 80%;
- border-left: 4px solid $warning-color;
- line-height: 1.2rem;
+ border-left: 4px solid var(--warning-color-darker);
}
}
}
diff --git a/resources/js/views/Home.vue b/resources/js/views/Home.vue
index b7b7231..6d02671 100644
--- a/resources/js/views/Home.vue
+++ b/resources/js/views/Home.vue
@@ -131,11 +131,11 @@ import SMHero from "../components/SMHero.vue";
h2 {
font-size: 400%;
text-align: center;
+ color: var(--accent-1-color-text);
}
p {
font-size: 125%;
- line-height: 150%;
}
}
@@ -150,15 +150,14 @@ import SMHero from "../components/SMHero.vue";
p {
font-size: 125%;
- line-height: 150%;
- max-width: 32rem;
+ max-width: #{calc(map-get($spacing, 6) * 16)};
margin: 16px auto 32px auto;
}
img {
- border-radius: 50rem;
- height: 360px;
- width: 360px;
+ border-radius: 50%;
+ height: #{calc(map-get($spacing, 5) * 15)};
+ width: #{calc(map-get($spacing, 5) * 15)};
}
.button {
@@ -179,11 +178,11 @@ import SMHero from "../components/SMHero.vue";
h2 {
font-size: 300%;
text-align: center;
+ color: #f8f8f8;
}
p {
font-size: 125%;
- line-height: 150%;
text-align: center;
margin: 24px auto;
}
@@ -231,11 +230,11 @@ import SMHero from "../components/SMHero.vue";
font-size: 300%;
text-align: center;
margin-bottom: 16px;
+ color: var(--accent-2-color-text);
}
p {
font-size: 125%;
- line-height: 1.5em;
}
.button-row {
@@ -280,7 +279,7 @@ import SMHero from "../components/SMHero.vue";
.minecraft-image {
float: none;
display: block;
- margin: 0 auto 1rem auto;
+ margin: 0 auto #{map-get($spacing, 3)} auto;
}
}
}
diff --git a/resources/js/views/Minecraft.vue b/resources/js/views/Minecraft.vue
index 4baad6e..b17e5e7 100644
--- a/resources/js/views/Minecraft.vue
+++ b/resources/js/views/Minecraft.vue
@@ -106,10 +106,10 @@ const downloads = [
diff --git a/resources/js/views/Workshops.vue b/resources/js/views/Workshops.vue
index 8856c4e..8b3371d 100644
--- a/resources/js/views/Workshops.vue
+++ b/resources/js/views/Workshops.vue
@@ -1,95 +1,98 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ event["banner"] }}
-
-
-
- {{ formatDateDay(event.start_at) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ event["banner"] }}
-
- {{ formatDateMonth(event.start_at) }}
+
+
+ {{ formatDateDay(event.start_at) }}
+
+
+ {{ formatDateMonth(event.start_at) }}
+
-
-
-
{{ event.title }}
-
-
- {{ computedDate(event) }}
-
-
-
- {{ computedLocation(event) }}
-
-
-
- {{ computedAges(event.ages) }}
-
-
- $
- {{ computedPrice(event.price) }}
-
-
-
-
-
+
+
{{ event.title }}
+
+
+ {{ computedDate(event) }}
+
+
+
+
+ {{ computedLocation(event) }}
+
+
+
+
+
+ {{ computedAges(event.ages) }}
+
+
+
+ $
+
+ {{ computedPrice(event.price) }}
+
+
+
+
+
+
+
-
+
diff --git a/resources/js/views/dashboard/PostEdit.vue b/resources/js/views/dashboard/PostEdit.vue
index 1ce92a2..d7f9570 100644
--- a/resources/js/views/dashboard/PostEdit.vue
+++ b/resources/js/views/dashboard/PostEdit.vue
@@ -325,8 +325,4 @@ loadOptionsAuthors();
loadData();
-
+
diff --git a/resources/js/views/dashboard/PostList.vue b/resources/js/views/dashboard/PostList.vue
index 169a2ec..fa12629 100644
--- a/resources/js/views/dashboard/PostList.vue
+++ b/resources/js/views/dashboard/PostList.vue
@@ -1,7 +1,6 @@
-
+
-
{
serverItemsLength.value = data.total;
} catch (error) {
- formMessage.value = error.data.message || "An unknown error occurred";
+ pageError.value = error.status;
} finally {
formLoading.value = false;
}
@@ -302,8 +300,4 @@ const handleDelete = async (item) => {
};
-
+
diff --git a/resources/js/views/dashboard/UserList.vue b/resources/js/views/dashboard/UserList.vue
index f02ad5a..b30e544 100644
--- a/resources/js/views/dashboard/UserList.vue
+++ b/resources/js/views/dashboard/UserList.vue
@@ -1,15 +1,9 @@
-
+
-
-
{
const loadFromServer = async () => {
formLoading.value = true;
- formMessage.type = "error";
- formMessage.icon = "alert-circle-outline";
- formMessage.message = "";
try {
let params = {};
@@ -163,10 +149,17 @@ const handleDelete = async (user) => {
await api.delete(`users${user.id}`);
loadFromServer();
- formMessage.message = "User deleted successfully";
- formMessage.type = "success";
+ useToastStore().addToast({
+ title: "User Deleted",
+ content: "User deleted successfully.",
+ type: "success",
+ });
} catch (err) {
- formMessage.message = err.response?.data?.message;
+ useToastStore().addToast({
+ title: "Server Error",
+ content: "User could not be deleted because an error occurred.",
+ type: "danger",
+ });
}
}
};