mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-14 12:14:33 +01:00
Working on arthome
This commit is contained in:
@@ -17,7 +17,6 @@ const items = [
|
|||||||
label: 'Settings',
|
label: 'Settings',
|
||||||
icon: 'i-ph:gear-six-duotone',
|
icon: 'i-ph:gear-six-duotone',
|
||||||
action: () => {
|
action: () => {
|
||||||
console.log('Settings')
|
|
||||||
isSettingsOpen.value = true
|
isSettingsOpen.value = true
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export async function useTabs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function updateTab(tab: UpdateTabSchema) {
|
async function updateTab(tab: UpdateTabSchema) {
|
||||||
console.log(tab)
|
|
||||||
await $fetch(`/api/tabs/${tab.id}`, {
|
await $fetch(`/api/tabs/${tab.id}`, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
body: JSON.stringify(tab),
|
body: JSON.stringify(tab),
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { UpdateTabSchema } from '~~/types/types'
|
|||||||
export default defineEventHandler(async (event) => {
|
export default defineEventHandler(async (event) => {
|
||||||
try {
|
try {
|
||||||
const { id } = await getRouterParams(event)
|
const { id } = await getRouterParams(event)
|
||||||
console.log(await readBody(event))
|
|
||||||
const body = await useValidatedBody(event, UpdateTabSchema)
|
const body = await useValidatedBody(event, UpdateTabSchema)
|
||||||
await useDrizzle()
|
await useDrizzle()
|
||||||
.update(tables.tabs)
|
.update(tables.tabs)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { ParsedContent } from '@nuxt/content'
|
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
|
|
||||||
export const COLORS = ['gray', 'slate', 'zinc', 'neutral', 'stone', 'red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose']
|
export const COLORS = ['gray', 'slate', 'zinc', 'neutral', 'stone', 'red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose']
|
||||||
@@ -61,22 +60,6 @@ export interface TabType {
|
|||||||
link: string
|
link: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: delete
|
|
||||||
export interface AppType extends ParsedContent {
|
|
||||||
primary?: boolean
|
|
||||||
name: string
|
|
||||||
nuxt?: string
|
|
||||||
url: string
|
|
||||||
icon: string
|
|
||||||
color: string
|
|
||||||
tags: Tag[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Tag {
|
|
||||||
name: string
|
|
||||||
color: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface OpenWeatherType {
|
export interface OpenWeatherType {
|
||||||
weather: Array<{
|
weather: Array<{
|
||||||
description: string
|
description: string
|
||||||
|
|||||||
Reference in New Issue
Block a user