-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
811 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script setup lang="ts"> | ||
import Card from 'primevue/card' | ||
const props = defineProps<{ | ||
groupId: string | ||
forumId: string | ||
name: string | ||
description: string | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<NuxtLink prefetch :to="`/dashboard/${props.groupId}/forums/${props.forumId}`"> | ||
<Card :pt="$pt.clickableCard"> | ||
<template #subtitle> | ||
# {{ props.name }} | ||
</template> | ||
<template #content> | ||
{{ props.description }} | ||
</template> | ||
</Card> | ||
</NuxtLink> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script setup lang="ts"> | ||
import Skeleton from 'primevue/skeleton' | ||
import Button from 'primevue/button' | ||
import { Calendar } from 'v-calendar' | ||
const props = defineProps<{ | ||
groupId: string | ||
}>() | ||
const { data: events, isLoading: eventsIsLoading, error: eventsError } = useUpcomingEvents(props.groupId) | ||
const { cookieRaw } = useTheme() | ||
const isDark = computed(() => cookieRaw.value?.includes('dark') ?? true) | ||
const attributes = computed(() => events.value?.map(e => ({ | ||
highlight: true, | ||
dates: { | ||
start: e.startTime, | ||
repeat: e.repeat, | ||
}, | ||
})) ?? undefined) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<Skeleton v-if="eventsIsLoading" height="300px" /> | ||
<div v-else> | ||
<Calendar | ||
:attributes="attributes" | ||
title-position="left" | ||
borderless | ||
transparent | ||
expanded | ||
:is-dark="isDark" | ||
/> | ||
|
||
<NuxtLink prefetch :to="`/dashboard/${props.groupId}/events/new`"> | ||
<Button label="Create" /> | ||
</NuxtLink> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
@import 'v-calendar/style.css'; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { useQuery } from '@tanstack/vue-query' | ||
|
||
export function useUpcomingEvents(groupId: string) { | ||
const { $client } = useNuxtApp() | ||
return useQuery({ | ||
queryKey: ['event', 'upcoming', groupId], | ||
queryFn: () => $client.event.upcoming.query({ groupId }), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export function useTheme() { | ||
const cookieRaw = useCookie('theme') | ||
return { | ||
cookieRaw, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "inprove", | ||
"packageManager": "[email protected].10", | ||
"packageManager": "[email protected].11", | ||
"scripts": { | ||
"build": "nuxt build", | ||
"dev": "nuxt dev", | ||
|
@@ -15,27 +15,29 @@ | |
"docs:preview": "vitepress preview docs" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^0.39.8", | ||
"@antfu/eslint-config": "^0.40.0", | ||
"@iconify-json/tabler": "^1.1.86", | ||
"@nuxt/devtools": "^0.7.1", | ||
"@nuxt/devtools": "^0.7.4", | ||
"@nuxt/image": "1.0.0-rc.1", | ||
"@nuxtjs/html-validator": "^1.5.2", | ||
"@nuxtjs/turnstile": "^0.5.0", | ||
"@prisma/client": "5.0.0", | ||
"@popperjs/core": "^2.11.8", | ||
"@prisma/client": "5.1.0", | ||
"@qingu/vue-email": "^1.0.23", | ||
"@tanstack/vue-query": "^4.32.0", | ||
"@tanstack/vue-query": "^4.32.4", | ||
"@trpc/client": "^10.36.0", | ||
"@trpc/server": "^10.36.0", | ||
"@types/node": "^20.4.5", | ||
"@unocss/eslint-config": "^0.54.0", | ||
"@unocss/nuxt": "^0.54.0", | ||
"@types/node": "^20.4.6", | ||
"@unocss/eslint-config": "^0.54.1", | ||
"@unocss/nuxt": "^0.54.1", | ||
"@vueuse/core": "^10.3.0", | ||
"@vueuse/integrations": "^10.3.0", | ||
"@vueuse/nuxt": "^10.3.0", | ||
"chart.js": "^4.3.2", | ||
"chart.js": "^4.3.3", | ||
"consola": "^3.2.3", | ||
"date-fns": "^2.30.0", | ||
"date-fns-tz": "^2.0.0", | ||
"v-calendar": "^3.0.3", | ||
"eslint": "^8.46.0", | ||
"lint-staged": "^13.2.3", | ||
"nodemailer": "^6.9.4", | ||
|
@@ -45,10 +47,10 @@ | |
"pino-http": "^8.3.3", | ||
"pino-pretty": "^10.2.0", | ||
"primevue": "^3.31.0", | ||
"prisma": "^5.0.0", | ||
"prisma": "^5.1.0", | ||
"qrcode": "^1.5.3", | ||
"resend": "^0.17.2", | ||
"sass": "^1.64.1", | ||
"sass": "^1.64.2", | ||
"sharp": "^0.32.4", | ||
"simple-git-hooks": "^2.9.0", | ||
"std-env": "^3.3.3", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script setup lang="ts"> | ||
const route = useRoute() | ||
</script> | ||
|
||
<template> | ||
<div w-full flex flex-col> | ||
<GroupHeader | ||
:group-id=" | ||
route.params.groupId as string | ||
" | ||
/> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.