diff --git a/package.json b/package.json index af1cd98..916f998 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "@mdi/js": "^7.4.47", "@prisma/client": "^5.8.1", "svelte-floating-ui": "^1.5.8", - "svelte-markdown": "^0.4.1", "zod": "^3.22.4" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1ab8cad..9af6efd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,9 +23,6 @@ dependencies: svelte-floating-ui: specifier: ^1.5.8 version: 1.5.8 - svelte-markdown: - specifier: ^0.4.1 - version: 0.4.1(svelte@4.2.9) zod: specifier: ^3.22.4 version: 3.22.4 @@ -859,10 +856,6 @@ packages: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true - /@types/marked@5.0.2: - resolution: {integrity: sha512-OucS4KMHhFzhz27KxmWg7J+kIYqyqoW5kdIEI319hqARQQUTqhao3M/F+uFnDXD0Rg72iDDZxZNxq5gvctmLlg==} - dev: false - /@types/node@20.11.7: resolution: {integrity: sha512-GPmeN1C3XAyV5uybAf4cMLWT9fDWcmQhZVtMFu7OR32WjrqGG+Wnk2V1d0bmtUyE/Zy1QJ9BxyiTih9z8Oks8A==} dependencies: @@ -2103,12 +2096,6 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 - /marked@5.1.2: - resolution: {integrity: sha512-ahRPGXJpjMjwSOlBoTMZAK7ATXkli5qCPxZ21TG44rx1KEo44bii4ekgTDQPNRQ4Kh7JMb9Ub1PVk1NxRSsorg==} - engines: {node: '>= 16'} - hasBin: true - dev: false - /mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} @@ -2885,16 +2872,6 @@ packages: dependencies: svelte: 4.2.9 - /svelte-markdown@0.4.1(svelte@4.2.9): - resolution: {integrity: sha512-pOlLY6EruKJaWI9my/2bKX8PdTeP5CM0s4VMmwmC2prlOkjAf+AOmTM4wW/l19Y6WZ87YmP8+ZCJCCwBChWjYw==} - peerDependencies: - svelte: ^4.0.0 - dependencies: - '@types/marked': 5.0.2 - marked: 5.1.2 - svelte: 4.2.9 - dev: false - /svelte-preprocess@5.1.3(postcss@8.4.33)(svelte@4.2.9)(typescript@5.3.3): resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==} engines: {node: '>= 16.0.0', pnpm: ^8.0.0} diff --git a/prisma/migrations/20240113185049_init/migration.sql b/prisma/migrations/20240113185049_init/migration.sql index e9f7a31..ff8c396 100644 --- a/prisma/migrations/20240113185049_init/migration.sql +++ b/prisma/migrations/20240113185049_init/migration.sql @@ -78,7 +78,7 @@ CREATE TABLE "entry_versions" ( "id" SERIAL NOT NULL, "entry_id" INTEGER NOT NULL, "text" TEXT NOT NULL, - "date" DATE NOT NULL, + "date" TIMESTAMP(3) NOT NULL, "category_id" INTEGER, "priority" BOOLEAN NOT NULL, "author_id" INTEGER NOT NULL, diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 915ca43..aebefd9 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -116,7 +116,7 @@ model EntryVersion { entry_id Int text String - date DateTime @db.Date + date DateTime category Category? @relation(fields: [category_id], references: [id], onDelete: SetNull) category_id Int? diff --git a/src/app.pcss b/src/app.pcss index 4abb4ca..2d53edd 100644 --- a/src/app.pcss +++ b/src/app.pcss @@ -7,10 +7,6 @@ button { text-align: initial; } -.heading { - @apply text-2xl font-bold; -} - .ellipsis { overflow: hidden; white-space: nowrap; diff --git a/src/hooks.client.ts b/src/hooks.client.ts deleted file mode 100644 index 5c7d379..0000000 --- a/src/hooks.client.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { HandleClientError } from "@sveltejs/kit"; -import { TRPCClientError } from "@trpc/client"; - -const CHECK_CONNECTION = - "Die Seite konnte nicht geladen werden, prüfen sie ihre Verbindung"; - -export const handleError: HandleClientError = async ({ error, message, status }) => { - // If there are client-side errors, SvelteKit always returns the nondescript - // "Internal error" message. The most common errors should be mapped to a more - // detailed description - if (status === 500) { - // eslint-disable-next-line no-console - console.error("Client error:", error); - - if ( - error instanceof TypeError && - error.message.includes("dynamically imported module") - ) { - // Could not load JS module - message = CHECK_CONNECTION; - } else if (error instanceof TRPCClientError && !error.data) { - // Could not load fetched data - message = CHECK_CONNECTION; - } - } - - return { message }; -}; diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 065efc2..2b69631 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -65,7 +65,6 @@ export const handle = sequence( return opt.session; }, }, - trustHost: true, }), authorization, createTRPCHandle({ router, createContext }) diff --git a/src/lib/components/filter/Autocomplete.svelte b/src/lib/components/filter/Autocomplete.svelte index 2f34a43..7b55b89 100644 --- a/src/lib/components/filter/Autocomplete.svelte +++ b/src/lib/components/filter/Autocomplete.svelte @@ -22,7 +22,6 @@ export let cacheKey: string | undefined = undefined; export let placeholder: string | undefined = undefined; export let padding = true; - export let cls = ""; /** Selection callback. Returns the new input value after selection */ export let onSelect: (item: SelectionOrText, kb: boolean) => OnSelectResult = ( @@ -196,7 +195,7 @@ }); -