fear: colors
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { Dialog } from "primevue";
|
||||
import { useErrorStore } from "./stores/error.store";
|
||||
import { RouterView, useRoute } from "vue-router";
|
||||
import PosttypeScheme from "./posttype/PosttypeScheme.vue";
|
||||
import { RouterView } from "vue-router";
|
||||
|
||||
const errorStore = useErrorStore();
|
||||
|
||||
const route = useRoute();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -20,6 +17,5 @@ const route = useRoute();
|
||||
</Dialog>
|
||||
<main class="w-screen h-screen">
|
||||
<RouterView />
|
||||
<PosttypeScheme />
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { toSimpleDateString } from "../../utils/date/converters.util"
|
||||
|
||||
type Color = "red" | "yellow" | "blue" | "green" | "pink"
|
||||
|
||||
export class CalendarEvent {
|
||||
id: string
|
||||
title: string
|
||||
description: string
|
||||
color: "red" | "yellow" | "blue"
|
||||
color: Color
|
||||
with?: string
|
||||
time: { start: string; end: string }
|
||||
|
||||
@@ -13,8 +15,8 @@ export class CalendarEvent {
|
||||
description: string,
|
||||
timeStart: Date,
|
||||
timeEnd: Date,
|
||||
withPerson?: string,
|
||||
color: "red" | "yellow" | "blue" = "red"
|
||||
options: { withPerson?: string,
|
||||
color: Color }
|
||||
) {
|
||||
this.title = title
|
||||
this.description = description
|
||||
@@ -22,8 +24,8 @@ export class CalendarEvent {
|
||||
start: toSimpleDateString(timeStart),
|
||||
end: toSimpleDateString(timeEnd),
|
||||
}
|
||||
this.with = withPerson
|
||||
this.color = color
|
||||
this.with = options.withPerson
|
||||
this.color = options.color ?? 'red'
|
||||
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!",
|
||||
new Date("2025-03-11T12:05:00"),
|
||||
new Date("2025-03-12T13:35:00"),
|
||||
"Chandler Bing",
|
||||
"red"
|
||||
{
|
||||
color: 'pink',
|
||||
}
|
||||
)
|
||||
|
||||
events.push(newEvent)
|
||||
|
||||
Reference in New Issue
Block a user