fix: themes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import PostScheme from './post/PostScheme.vue';
|
||||
import AuthorScheme from "./author/AuthorScheme.vue";
|
||||
import { Dialog } from 'primevue';
|
||||
import { useErrorStore } from './stores/error.store';
|
||||
|
||||
@@ -32,7 +32,7 @@ const setNullIds = () => {
|
||||
|
||||
<template>
|
||||
<div class="relative">
|
||||
<ul class="absolute max-h-48 h-auto overflow-y-auto bg-white rounded-md p-3 w-full border">
|
||||
<ul class="absolute max-h-48 h-auto overflow-y-auto background rounded-md p-3 w-full border-gray-500 border">
|
||||
<li v-for="option in options" :key="option.Id" class="flex items-center gap-2">
|
||||
<Checkbox :checked="selected.some(item => item.Id == option.Id)" @click="pushOrRemove(option)" />
|
||||
<label :for="option.Id.toString()">{{ structView(option, path) }}</label>
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import Table from "../table/Table.vue";
|
||||
import { onMounted, reactive } from "vue";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { getDefaultValues } from "../utils/structs/defaults.util";
|
||||
import Service from "./post.service.ts";
|
||||
import type { Scheme } from "../types/scheme.type";
|
||||
import { Post } from "../../bindings/app/internal/services";
|
||||
|
||||
import AuthorService from "../author/author.service.ts";
|
||||
import type { Validate } from "../types/validate.type.ts";
|
||||
const authorService = new AuthorService();
|
||||
|
||||
const service = new Service();
|
||||
|
||||
onMounted(async () => {
|
||||
const load = async () => {
|
||||
(scheme as any).Author.type!.nested!.values = await authorService.readAll();
|
||||
items.value = await service.readAll();
|
||||
return items.value;
|
||||
};
|
||||
|
||||
const items = ref<Post[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
load()
|
||||
});
|
||||
|
||||
const scheme: Scheme<Post> = reactive({
|
||||
@@ -67,10 +75,16 @@ const scheme: Scheme<Post> = reactive({
|
||||
});
|
||||
|
||||
const getDefaults = () => getDefaultValues(scheme);
|
||||
|
||||
const validate: Validate<Post> = (entity) => {
|
||||
return {
|
||||
status: 'success'
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="w-screen h-screen">
|
||||
<Table :scheme :service :get-defaults></Table>
|
||||
<Table :scheme :service :get-defaults :validate :load :items></Table>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
@tailwind utilities;
|
||||
|
||||
|
||||
html, body {
|
||||
html, body, .background {
|
||||
background: white;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html, body {
|
||||
html, body, .background {
|
||||
background: #121212;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user