diff --git a/TODO.md b/TODO.md index 5f73eb2..95b50e3 100644 --- a/TODO.md +++ b/TODO.md @@ -9,13 +9,13 @@ - [ ] View best Answers and Pictures - [ ] All/Best Images gallery - **Hunt User** - - [ ] Create Team - - [ ] Invite Members - - [ ] Join Hunt - - [ ] Answer with text and image - - [ ] Change/Update Answer and image - - [ ] View Answers of other members, check for collisions! - - [ ] View own reviews and score + - [x] Create Team + - [x] Invite Members + - [x] Join Hunt + - [x] Answer with text and image + - [x] Change/Update Answer and image + - [x] View Answers of other members, check for collisions! + - [x] View own reviews and score - **Nice to have** - **Auth** - [ ] Login with LDAP diff --git a/app/components/ClickableImage.vue b/app/components/ClickableImage.vue new file mode 100644 index 0000000..f42288f --- /dev/null +++ b/app/components/ClickableImage.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/app/layouts/default.vue b/app/layouts/default.vue index 597164a..54a2017 100644 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -90,6 +90,8 @@ const slugs = computed(() => checkSlug(route.params)); diff --git a/app/middleware/auth.ts b/app/middleware/auth.ts index cc6a550..2f4faae 100644 --- a/app/middleware/auth.ts +++ b/app/middleware/auth.ts @@ -1,8 +1,8 @@ -export default defineNuxtRouteMiddleware(() => { +export default defineNuxtRouteMiddleware((to) => { const { loggedIn } = useUserSession(); if (!loggedIn.value) { const localePath = useLocalePath(); - return navigateTo(localePath('/login')); + return navigateTo(localePath(`/login?to=${to.path}`)); } }); diff --git a/app/pages/hunt/[huntSlug]/[questSlug]/index.vue b/app/pages/hunt/[huntSlug]/[questSlug]/index.vue index fe61cc8..d8b0df7 100644 --- a/app/pages/hunt/[huntSlug]/[questSlug]/index.vue +++ b/app/pages/hunt/[huntSlug]/[questSlug]/index.vue @@ -1,6 +1,11 @@ diff --git a/app/pages/hunt/[huntSlug]/index.vue b/app/pages/hunt/[huntSlug]/index.vue index 3f1402a..0b1787b 100644 --- a/app/pages/hunt/[huntSlug]/index.vue +++ b/app/pages/hunt/[huntSlug]/index.vue @@ -11,7 +11,7 @@ const { name, id } = app.$slugData.huntSlug!; const titleStore = useTitleStore(); -const { data, pending, refresh } = await useFetch(`/api/hunt/${id}`); +const { data, pending, refresh, error } = await useFetch(`/api/hunt/${id}`); const hideAnswers = ref(true); @@ -50,6 +50,12 @@ async function invite() {

{{ data.description }}

+

Start: {{ @@ -110,7 +116,10 @@ async function invite() { Hide answers

-
+
+ Quests not revealed yet! + Soon all {{ data._count.quests }} quests will be + revealed! + +
+ +
+

{{ $t(parseError(error)) }}

+ Back home
diff --git a/app/pages/index.vue b/app/pages/index.vue index fa8b504..40efea4 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -7,12 +7,14 @@ watch(loggedIn, () => refresh());