fear: colors
This commit is contained in:
@@ -1,12 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Dialog } from "primevue";
|
import { Dialog } from "primevue";
|
||||||
import { useErrorStore } from "./stores/error.store";
|
import { useErrorStore } from "./stores/error.store";
|
||||||
import { RouterView, useRoute } from "vue-router";
|
import { RouterView } from "vue-router";
|
||||||
import PosttypeScheme from "./posttype/PosttypeScheme.vue";
|
|
||||||
|
|
||||||
const errorStore = useErrorStore();
|
const errorStore = useErrorStore();
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -20,6 +17,5 @@ const route = useRoute();
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
<main class="w-screen h-screen">
|
<main class="w-screen h-screen">
|
||||||
<RouterView />
|
<RouterView />
|
||||||
<PosttypeScheme />
|
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import { toSimpleDateString } from "../../utils/date/converters.util"
|
import { toSimpleDateString } from "../../utils/date/converters.util"
|
||||||
|
|
||||||
|
type Color = "red" | "yellow" | "blue" | "green" | "pink"
|
||||||
|
|
||||||
export class CalendarEvent {
|
export class CalendarEvent {
|
||||||
id: string
|
id: string
|
||||||
title: string
|
title: string
|
||||||
description: string
|
description: string
|
||||||
color: "red" | "yellow" | "blue"
|
color: Color
|
||||||
with?: string
|
with?: string
|
||||||
time: { start: string; end: string }
|
time: { start: string; end: string }
|
||||||
|
|
||||||
@@ -13,8 +15,8 @@ export class CalendarEvent {
|
|||||||
description: string,
|
description: string,
|
||||||
timeStart: Date,
|
timeStart: Date,
|
||||||
timeEnd: Date,
|
timeEnd: Date,
|
||||||
withPerson?: string,
|
options: { withPerson?: string,
|
||||||
color: "red" | "yellow" | "blue" = "red"
|
color: Color }
|
||||||
) {
|
) {
|
||||||
this.title = title
|
this.title = title
|
||||||
this.description = description
|
this.description = description
|
||||||
@@ -22,8 +24,8 @@ export class CalendarEvent {
|
|||||||
start: toSimpleDateString(timeStart),
|
start: toSimpleDateString(timeStart),
|
||||||
end: toSimpleDateString(timeEnd),
|
end: toSimpleDateString(timeEnd),
|
||||||
}
|
}
|
||||||
this.with = withPerson
|
this.with = options.withPerson
|
||||||
this.color = color
|
this.color = options.color ?? 'red'
|
||||||
this.id = new Date().getTime().toString()
|
this.id = new Date().getTime().toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,8 +9,9 @@ const newEvent = new CalendarEvent(
|
|||||||
"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores assumenda corporis doloremque et expedita molestias necessitatibus quam quas temporibus veritatis. Deserunt excepturi illum nobis perferendis praesentium repudiandae saepe sapiente voluptatem!",
|
"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores assumenda corporis doloremque et expedita molestias necessitatibus quam quas temporibus veritatis. Deserunt excepturi illum nobis perferendis praesentium repudiandae saepe sapiente voluptatem!",
|
||||||
new Date("2025-03-11T12:05:00"),
|
new Date("2025-03-11T12:05:00"),
|
||||||
new Date("2025-03-12T13:35:00"),
|
new Date("2025-03-12T13:35:00"),
|
||||||
"Chandler Bing",
|
{
|
||||||
"red"
|
color: 'pink',
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
events.push(newEvent)
|
events.push(newEvent)
|
||||||
|
|||||||
Reference in New Issue
Block a user