feat: calendar & router configs

This commit is contained in:
opbnq-q
2025-03-11 04:52:09 -07:00
parent e16fce9221
commit a130fb9063
10 changed files with 231 additions and 19 deletions

View File

@@ -1,11 +1,11 @@
<script setup lang="ts">
import { Dialog } from "primevue";
import { useErrorStore } from "./stores/error.store";
import CommentScheme from "./comment/CommentScheme.vue";
import PosttypeScheme from "./posttype/PosttypeScheme.vue";
import PostScheme from "./post/PostScheme.vue";
import { RouterView, useRoute } from "vue-router";
const errorStore = useErrorStore();
const route = useRoute();
</script>
<template>
@@ -18,6 +18,6 @@ const errorStore = useErrorStore();
<h1 class="text-red-500 text-2xl">{{ errorStore.message }}</h1>
</Dialog>
<main class="w-screen h-screen">
<PostScheme></PostScheme>
<RouterView />
</main>
</template>

View File

@@ -0,0 +1,20 @@
<script setup lang="ts">
import { Qalendar } from "qalendar";
const config = {
month: {
showTrailingAndLeadingDates: false,
},
locale: 'ru-RU',
defaultMode: 'month',
isSilent: true,
};
</script>
<template>
<Qalendar :config></Qalendar>
</template>
<style>
@import "qalendar/dist/style.css";
</style>

View File

@@ -0,0 +1,4 @@
declare module 'qalendar' {
import { DefineComponent } from 'vue';
export const Qalendar: DefineComponent<{}, {}, any>;
}

View File

@@ -6,8 +6,9 @@ import Aura from '@primevue/themes/aura'
import 'primeicons/primeicons.css'
import { ru } from 'primelocale/js/ru.js'
import { createPinia } from 'pinia'
import { router } from './router/router'
createApp(App).use(createPinia()).use(Config, {
createApp(App).use(router).use(createPinia()).use(Config, {
theme: {
preset: Aura,
},

View File

@@ -0,0 +1,8 @@
<script setup lang="ts">
import Calendar from '../components/calendar/Calendar.vue';
</script>
<template>
<Calendar />
</template>

View File

@@ -0,0 +1,13 @@
import { createRouter, createWebHistory, type RouteRecordRaw } from "vue-router";
import Index from "../pages/Index.vue";
export const routes: RouteRecordRaw[] = [{
path: "/",
component: Index,
name: 'Главная',
}]
export const router = createRouter({
history: createWebHistory(),
routes,
});