diff --git a/app.vue b/app.vue index 3dfef03..f3eb9f3 100644 --- a/app.vue +++ b/app.vue @@ -1,12 +1,12 @@ + + diff --git a/components/calendar/CalendarCurrentDate.vue b/components/calendar/CalendarCurrentDate.vue index 6447d5e..279e514 100644 --- a/components/calendar/CalendarCurrentDate.vue +++ b/components/calendar/CalendarCurrentDate.vue @@ -1,8 +1,8 @@ @@ -29,7 +29,9 @@ const { revealAdvancedSearch } = useCalendar()
  • - + + +
  • diff --git a/components/calendar/CalendarMenuNav.vue b/components/calendar/CalendarMenuNav.vue index 67c9402..45a8ac9 100644 --- a/components/calendar/CalendarMenuNav.vue +++ b/components/calendar/CalendarMenuNav.vue @@ -1,13 +1,13 @@ + + diff --git a/components/calendar/dialog/Delete.vue b/components/calendar/dialog/Delete.vue new file mode 100644 index 0000000..f1accfe --- /dev/null +++ b/components/calendar/dialog/Delete.vue @@ -0,0 +1,95 @@ + + + diff --git a/components/calendar/form/Create.vue b/components/calendar/form/Create.vue new file mode 100644 index 0000000..f9fbb7d --- /dev/null +++ b/components/calendar/form/Create.vue @@ -0,0 +1,132 @@ + + + diff --git a/components/calendar/form/CreateEvent.vue b/components/calendar/form/CreateEvent.vue index 755e963..41153a0 100644 --- a/components/calendar/form/CreateEvent.vue +++ b/components/calendar/form/CreateEvent.vue @@ -1,9 +1,9 @@ + + diff --git a/components/calendar/input/RPGDate.vue b/components/calendar/input/RPGDate.vue index a46dccd..3cd9ad2 100644 --- a/components/calendar/input/RPGDate.vue +++ b/components/calendar/input/RPGDate.vue @@ -1,9 +1,9 @@ + + diff --git a/components/calendar/search/CalendarSearch.vue b/components/calendar/search/CalendarSearch.vue index 74dba7b..5e9fdb3 100644 --- a/components/calendar/search/CalendarSearch.vue +++ b/components/calendar/search/CalendarSearch.vue @@ -2,49 +2,46 @@ import { isCharacter, type Character, -} from '@/models/Characters' -import type { RPGDateOrder } from '@/models/Date' +} from "@/models/Characters" +import type { RPGDateOrder } from "@/models/Date" import { isCalendarEvent, type CalendarEvent, -} from '~/models/CalendarEvent' -import { useCharacters } from '@/stores/CharacterStore' -import { useCalendarEvents } from '@/stores/EventStore' -import { capitalize } from '@/utils/Strings' -import { useMagicKeys, useScroll, useStorage, whenever } from '@vueuse/core' -import { computed, ref, watch } from 'vue' -import { searchUnifier, type SearchMode } from '../SearchMode' +} from "~/models/CalendarEvent" +import { capitalize } from "@/utils/Strings" +import { useMagicKeys, useScroll, useStorage, whenever } from "@vueuse/core" +import { computed, ref, watch } from "vue" +import { searchUnifier, type SearchMode } from "../SearchMode" -import { PhClockClockwise, PhClockCounterClockwise, PhMagnifyingGlass } from '@phosphor-icons/vue' +import { PhClockClockwise, PhClockCounterClockwise, PhMagnifyingGlass } from "@phosphor-icons/vue" import { ComboboxAnchor, ComboboxInput, ComboboxPortal, ComboboxRoot, VisuallyHidden -} from 'radix-vue' +} from "radix-vue" -import SearchList from './lists/SearchList.vue' -import type { Category } from '~/models/Category' +import SearchList from "./lists/SearchList.vue" +import type { Category } from "~/models/Category" -const { isAdvancedSearchOpen } = storeToRefs(useCalendar()) -const { allEvents } = storeToRefs(useCalendarEvents()) +const { isAdvancedSearchOpen, allEvents } = storeToRefs(useCalendar()) const { characters } = storeToRefs(useCharacters()) -const searchQuery = ref('') +const searchQuery = ref("") // const searchEnough = computed(() => searchQuery.value.length >= 2) -const selectedEntity = useStorage('se', 'events' as SearchMode) +const selectedEntity = useStorage("se", "events" as SearchMode) // Order -const selectedOrder = ref('asc') +const selectedOrder = ref("asc") function setOrderAsc() { - selectedOrder.value = 'asc' + selectedOrder.value = "asc" resetPage() } function setOrderDesc() { - selectedOrder.value = 'desc' + selectedOrder.value = "desc" resetPage() } @@ -68,9 +65,9 @@ const searchResults = computed<(Character | CalendarEvent)[]>(() => { // Assign data to loop over and filter // They are assigned this way for readability - if (selectedEntity.value === 'events') { + if (selectedEntity.value === "events") { dataToFilter = allEvents.value - } else if (selectedEntity.value === 'characters') { + } else if (selectedEntity.value === "characters") { dataToFilter = characters.value } else { dataToFilter = [...allEvents.value, ...characters.value] @@ -83,15 +80,15 @@ const searchResults = computed<(Character | CalendarEvent)[]>(() => { // Filter calendar events if (isCalendarEvent(item)) { const queryString = new String(searchQuery.value) - .replace(searchUnifier, '') + .replace(searchUnifier, "") .toLocaleLowerCase() const hitTitle = item.title - .replace(searchUnifier, '') + .replace(searchUnifier, "") .toLocaleLowerCase() .includes(queryString) const hitDesc = item.description - ?.replace(searchUnifier, '') + ?.replace(searchUnifier, "") .toLocaleLowerCase() .includes(queryString) @@ -121,11 +118,11 @@ const searchResults = computed<(Character | CalendarEvent)[]>(() => { // Filter characters if (isCharacter(item)) { const queryString = new String(searchQuery.value) - .replace(searchUnifier, '') + .replace(searchUnifier, "") .toLocaleLowerCase() const hitTitle = item.name - .replace(searchUnifier, '') + .replace(searchUnifier, "") .toLocaleLowerCase() .includes(queryString) @@ -160,7 +157,7 @@ const searchResults = computed<(Character | CalendarEvent)[]>(() => { * Removes the search query, resets the pagination and removes all selected categories */ function resetSearch() { - searchQuery.value = '' + searchQuery.value = "" resetPage() selectedCategories.value = [] } @@ -208,7 +205,7 @@ const currentCategories = computed(() => { const selectedCategories = ref<(Category)[]>([]) const categoryFilterOpened = ref(false) -const searchCategory = ref('') +const searchCategory = ref("") const filteredCategories = computed(() => currentCategories.value.filter((i) => !selectedCategories.value.includes(i)) @@ -220,8 +217,8 @@ const filteredCategories = computed(() => * @param e Radix Change Event */ function handleCategorySelect(e: (Category)) { - if (typeof e === 'string') { - searchCategory.value = '' + if (typeof e === "string") { + searchCategory.value = "" selectedCategories.value.push(e) } diff --git a/components/calendar/search/lists/CharacterCallout.vue b/components/calendar/search/lists/CharacterCallout.vue index a50649d..70e4d0c 100644 --- a/components/calendar/search/lists/CharacterCallout.vue +++ b/components/calendar/search/lists/CharacterCallout.vue @@ -1,18 +1,18 @@ @@ -48,18 +45,32 @@ const dateDuration: string | null = props.event.endDate -
    +
    +
    + + + + + Évènement privé + + + +

    Cet évènement est uniquement visible pour vous

    +
    +
    +
    +
    @@ -100,18 +111,5 @@ const dateDuration: string | null = props.event.endDate {{ event.description }}
    - - - - - - Évènement privé - - - -

    Cet évènement est uniquement visible pour vous

    -
    -
    -
    diff --git a/components/calendar/search/lists/SearchList.vue b/components/calendar/search/lists/SearchList.vue index 257888c..ab43f09 100644 --- a/components/calendar/search/lists/SearchList.vue +++ b/components/calendar/search/lists/SearchList.vue @@ -1,13 +1,13 @@ diff --git a/components/calendar/state/yearly/DayTile.vue b/components/calendar/state/yearly/DayTile.vue index 0ea59c8..1d37f5a 100644 --- a/components/calendar/state/yearly/DayTile.vue +++ b/components/calendar/state/yearly/DayTile.vue @@ -1,21 +1,16 @@ diff --git a/components/calendar/state/yearly/MonthTile.vue b/components/calendar/state/yearly/MonthTile.vue index 21f2ad6..03d82f9 100644 --- a/components/calendar/state/yearly/MonthTile.vue +++ b/components/calendar/state/yearly/MonthTile.vue @@ -1,5 +1,5 @@ + + diff --git a/components/global/sidebar/Sidebar.vue b/components/global/sidebar/Sidebar.vue index fc92882..8b62724 100644 --- a/components/global/sidebar/Sidebar.vue +++ b/components/global/sidebar/Sidebar.vue @@ -1,18 +1,14 @@ diff --git a/components/ui/alert-dialog/AlertDialog.vue b/components/ui/alert-dialog/AlertDialog.vue index 8fb30de..93a4623 100644 --- a/components/ui/alert-dialog/AlertDialog.vue +++ b/components/ui/alert-dialog/AlertDialog.vue @@ -1,5 +1,5 @@ diff --git a/components/ui/alert-dialog/AlertDialogHeader.vue b/components/ui/alert-dialog/AlertDialogHeader.vue index c61c449..b5e5540 100644 --- a/components/ui/alert-dialog/AlertDialogHeader.vue +++ b/components/ui/alert-dialog/AlertDialogHeader.vue @@ -1,9 +1,9 @@ diff --git a/components/ui/alert-dialog/AlertDialogTitle.vue b/components/ui/alert-dialog/AlertDialogTitle.vue index 50c583d..0498b1e 100644 --- a/components/ui/alert-dialog/AlertDialogTitle.vue +++ b/components/ui/alert-dialog/AlertDialogTitle.vue @@ -1,9 +1,9 @@ diff --git a/components/ui/alert-dialog/index.ts b/components/ui/alert-dialog/index.ts index 91d138a..6991bb7 100644 --- a/components/ui/alert-dialog/index.ts +++ b/components/ui/alert-dialog/index.ts @@ -1,9 +1,9 @@ -export { default as AlertDialog } from './AlertDialog.vue' -export { default as AlertDialogTrigger } from './AlertDialogTrigger.vue' -export { default as AlertDialogContent } from './AlertDialogContent.vue' -export { default as AlertDialogHeader } from './AlertDialogHeader.vue' -export { default as AlertDialogTitle } from './AlertDialogTitle.vue' -export { default as AlertDialogDescription } from './AlertDialogDescription.vue' -export { default as AlertDialogFooter } from './AlertDialogFooter.vue' -export { default as AlertDialogAction } from './AlertDialogAction.vue' -export { default as AlertDialogCancel } from './AlertDialogCancel.vue' +export { default as AlertDialog } from "./AlertDialog.vue" +export { default as AlertDialogTrigger } from "./AlertDialogTrigger.vue" +export { default as AlertDialogContent } from "./AlertDialogContent.vue" +export { default as AlertDialogHeader } from "./AlertDialogHeader.vue" +export { default as AlertDialogTitle } from "./AlertDialogTitle.vue" +export { default as AlertDialogDescription } from "./AlertDialogDescription.vue" +export { default as AlertDialogFooter } from "./AlertDialogFooter.vue" +export { default as AlertDialogAction } from "./AlertDialogAction.vue" +export { default as AlertDialogCancel } from "./AlertDialogCancel.vue" diff --git a/components/ui/avatar/Avatar.vue b/components/ui/avatar/Avatar.vue index 5b7b9fb..c479d77 100644 --- a/components/ui/avatar/Avatar.vue +++ b/components/ui/avatar/Avatar.vue @@ -1,16 +1,16 @@ diff --git a/components/ui/avatar/AvatarFallback.vue b/components/ui/avatar/AvatarFallback.vue index a671a21..440186b 100644 --- a/components/ui/avatar/AvatarFallback.vue +++ b/components/ui/avatar/AvatarFallback.vue @@ -1,5 +1,5 @@ diff --git a/components/ui/avatar/AvatarImage.vue b/components/ui/avatar/AvatarImage.vue index 43499fa..2f4eceb 100644 --- a/components/ui/avatar/AvatarImage.vue +++ b/components/ui/avatar/AvatarImage.vue @@ -1,5 +1,5 @@ diff --git a/components/ui/avatar/index.ts b/components/ui/avatar/index.ts index c4af1a6..9b393a2 100644 --- a/components/ui/avatar/index.ts +++ b/components/ui/avatar/index.ts @@ -1,21 +1,21 @@ -import { type VariantProps, cva } from 'class-variance-authority' +import { type VariantProps, cva } from "class-variance-authority" -export { default as Avatar } from './Avatar.vue' -export { default as AvatarImage } from './AvatarImage.vue' -export { default as AvatarFallback } from './AvatarFallback.vue' +export { default as Avatar } from "./Avatar.vue" +export { default as AvatarImage } from "./AvatarImage.vue" +export { default as AvatarFallback } from "./AvatarFallback.vue" export const avatarVariant = cva( - 'inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden', + "inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden", { variants: { size: { - sm: 'h-10 w-10 text-xs', - base: 'h-16 w-16 text-2xl', - lg: 'h-32 w-32 text-5xl', + sm: "h-10 w-10 text-xs", + base: "h-16 w-16 text-2xl", + lg: "h-32 w-32 text-5xl", }, shape: { - circle: 'rounded-full', - square: 'rounded-md', + circle: "rounded-full", + square: "rounded-md", }, }, }, diff --git a/components/ui/badge/Badge.vue b/components/ui/badge/Badge.vue index 2e8bdff..5b19716 100644 --- a/components/ui/badge/Badge.vue +++ b/components/ui/badge/Badge.vue @@ -1,11 +1,11 @@ diff --git a/components/ui/badge/index.ts b/components/ui/badge/index.ts index d90c2ef..9db7cf6 100644 --- a/components/ui/badge/index.ts +++ b/components/ui/badge/index.ts @@ -1,23 +1,23 @@ -import { type VariantProps, cva } from 'class-variance-authority' +import { type VariantProps, cva } from "class-variance-authority" -export { default as Badge } from './Badge.vue' +export { default as Badge } from "./Badge.vue" export const badgeVariants = cva( - 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', + "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", { variants: { variant: { default: - 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80', + "border-transparent bg-primary text-primary-foreground hover:bg-primary/80", secondary: - 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80', + "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", destructive: - 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80', - outline: 'text-foreground', + "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80", + outline: "text-foreground", }, }, defaultVariants: { - variant: 'default', + variant: "default", }, }, ) diff --git a/components/ui/button/Button.vue b/components/ui/button/Button.vue index 6e56542..f366883 100644 --- a/components/ui/button/Button.vue +++ b/components/ui/button/Button.vue @@ -1,18 +1,18 @@ diff --git a/components/ui/button/index.ts b/components/ui/button/index.ts index eba3552..e782ef6 100644 --- a/components/ui/button/index.ts +++ b/components/ui/button/index.ts @@ -1,30 +1,30 @@ -import { type VariantProps, cva } from 'class-variance-authority' +import { type VariantProps, cva } from "class-variance-authority" -export { default as Button } from './Button.vue' +export { default as Button } from "./Button.vue" export const buttonVariants = cva( - 'inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', + "inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", { variants: { variant: { - default: 'bg-primary text-primary-foreground hover:bg-primary/90', - destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90', - outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', - secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', - ghost: 'hover:bg-accent hover:text-accent-foreground', - link: 'text-primary underline-offset-4 hover:underline' + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground", + secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline" }, size: { - default: 'h-10 px-4 py-2', - xs: 'h-7 rounded-sm px-2 text-xs', - sm: 'h-9 rounded-md px-3 text-sm', - lg: 'h-11 rounded-md px-8', - icon: 'h-10 w-10' + default: "h-10 px-4 py-2", + xs: "h-7 rounded-sm px-2 text-xs", + sm: "h-9 rounded-md px-3 text-sm", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10" } }, defaultVariants: { - variant: 'default', - size: 'default' + variant: "default", + size: "default" } } ) diff --git a/components/ui/card/Card.vue b/components/ui/card/Card.vue index 18bebb2..ca0812f 100644 --- a/components/ui/card/Card.vue +++ b/components/ui/card/Card.vue @@ -1,9 +1,9 @@ @@ -11,7 +11,7 @@ const props = defineProps<{ diff --git a/components/ui/card/CardContent.vue b/components/ui/card/CardContent.vue index 785913a..4c4dfc7 100644 --- a/components/ui/card/CardContent.vue +++ b/components/ui/card/CardContent.vue @@ -1,9 +1,9 @@ diff --git a/components/ui/card/CardDescription.vue b/components/ui/card/CardDescription.vue index 52a5c90..ad948d6 100644 --- a/components/ui/card/CardDescription.vue +++ b/components/ui/card/CardDescription.vue @@ -1,9 +1,9 @@ diff --git a/components/ui/card/CardFooter.vue b/components/ui/card/CardFooter.vue index 1ed2efe..fad3928 100644 --- a/components/ui/card/CardFooter.vue +++ b/components/ui/card/CardFooter.vue @@ -1,9 +1,9 @@ diff --git a/components/ui/card/CardHeader.vue b/components/ui/card/CardHeader.vue index 951d227..119700c 100644 --- a/components/ui/card/CardHeader.vue +++ b/components/ui/card/CardHeader.vue @@ -1,9 +1,9 @@ diff --git a/components/ui/card/CardTitle.vue b/components/ui/card/CardTitle.vue index 842e168..d0c0ea7 100644 --- a/components/ui/card/CardTitle.vue +++ b/components/ui/card/CardTitle.vue @@ -1,9 +1,9 @@ diff --git a/components/ui/card/index.ts b/components/ui/card/index.ts index 8170483..450fe5c 100644 --- a/components/ui/card/index.ts +++ b/components/ui/card/index.ts @@ -1,6 +1,6 @@ -export { default as Card } from './Card.vue' -export { default as CardHeader } from './CardHeader.vue' -export { default as CardTitle } from './CardTitle.vue' -export { default as CardDescription } from './CardDescription.vue' -export { default as CardContent } from './CardContent.vue' -export { default as CardFooter } from './CardFooter.vue' +export { default as Card } from "./Card.vue" +export { default as CardHeader } from "./CardHeader.vue" +export { default as CardTitle } from "./CardTitle.vue" +export { default as CardDescription } from "./CardDescription.vue" +export { default as CardContent } from "./CardContent.vue" +export { default as CardFooter } from "./CardFooter.vue" diff --git a/components/ui/checkbox/Checkbox.vue b/components/ui/checkbox/Checkbox.vue index 4621bf7..6e848aa 100644 --- a/components/ui/checkbox/Checkbox.vue +++ b/components/ui/checkbox/Checkbox.vue @@ -1,11 +1,11 @@ diff --git a/components/ui/command/index.ts b/components/ui/command/index.ts index 95d4b5f..c59454c 100644 --- a/components/ui/command/index.ts +++ b/components/ui/command/index.ts @@ -1,11 +1,11 @@ -export { ComboboxPortal } from 'radix-vue' +export { ComboboxPortal } from "radix-vue" -export { default as Command } from './Command.vue' -export { default as CommandDialog } from './CommandDialog.vue' -export { default as CommandEmpty } from './CommandEmpty.vue' -export { default as CommandGroup } from './CommandGroup.vue' -export { default as CommandInput } from './CommandInput.vue' -export { default as CommandItem } from './CommandItem.vue' -export { default as CommandList } from './CommandList.vue' -export { default as CommandSeparator } from './CommandSeparator.vue' -export { default as CommandShortcut } from './CommandShortcut.vue' +export { default as Command } from "./Command.vue" +export { default as CommandDialog } from "./CommandDialog.vue" +export { default as CommandEmpty } from "./CommandEmpty.vue" +export { default as CommandGroup } from "./CommandGroup.vue" +export { default as CommandInput } from "./CommandInput.vue" +export { default as CommandItem } from "./CommandItem.vue" +export { default as CommandList } from "./CommandList.vue" +export { default as CommandSeparator } from "./CommandSeparator.vue" +export { default as CommandShortcut } from "./CommandShortcut.vue" diff --git a/components/ui/dialog/Dialog.vue b/components/ui/dialog/Dialog.vue index 7f26e47..9374bf3 100644 --- a/components/ui/dialog/Dialog.vue +++ b/components/ui/dialog/Dialog.vue @@ -4,7 +4,7 @@ import { type DialogRootEmits, type DialogRootProps, useForwardPropsEmits -} from 'radix-vue' +} from "radix-vue" const props = defineProps() const emits = defineEmits() diff --git a/components/ui/dialog/DialogClose.vue b/components/ui/dialog/DialogClose.vue index a64703e..7199c71 100644 --- a/components/ui/dialog/DialogClose.vue +++ b/components/ui/dialog/DialogClose.vue @@ -1,5 +1,5 @@ diff --git a/components/ui/dialog/DialogContent.vue b/components/ui/dialog/DialogContent.vue index 76ee2f7..8792702 100644 --- a/components/ui/dialog/DialogContent.vue +++ b/components/ui/dialog/DialogContent.vue @@ -1,5 +1,5 @@