diff --git a/tatort/.eslintignore b/tatort/.eslintignore deleted file mode 100644 index 3897265..0000000 --- a/tatort/.eslintignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example - -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock diff --git a/tatort/.eslintrc.cjs b/tatort/.eslintrc.cjs deleted file mode 100644 index 45450fd..0000000 --- a/tatort/.eslintrc.cjs +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = { - root: true, - extends: ['eslint:recommended', 'prettier'], - plugins: ['svelte3'], - overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2022 - }, - env: { - browser: true, - es2017: true, - node: true - }, - settings: { - 'svelte3/ignore-warnings': (warning) => warning.code.startsWith('a11y-') - }, - rules: { - 'constructor-super': 'error', - 'linebreak-style': ['error', 'unix'], - quotes: ['error', 'single', { avoidEscape: true }], - semi: ['error', 'always'], - 'max-len': ['warn', { code: 132, ignoreComments: true }], - 'no-console': 'warn', - 'no-else-return': ['error', { allowElseIf: false }], - 'no-extra-boolean-cast': 'error', - 'no-extra-bind': 'error', - 'no-implicit-coercion': 'error', - 'no-multi-spaces': 'warn', - 'no-redeclare': 'error', - 'no-self-assign': 'error', - 'no-undef-init': 'error', - 'prefer-template': 'warn', - 'sort-imports': 'off', - 'jsx-a11y/no-autofocus': 'off', - 'jsx-a11y/click-events-have-key-events': 0, - 'a11y-click-events-have-key-events': 0 - } -}; diff --git a/tatort/.gitignore b/tatort/.gitignore deleted file mode 100644 index 7809ee6..0000000 --- a/tatort/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example -vite.config.js.timestamp-* -vite.config.ts.timestamp-* -config.json -package-lock.json diff --git a/tatort/.npmrc b/tatort/.npmrc deleted file mode 100644 index 0c05da4..0000000 --- a/tatort/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -engine-strict=true -resolution-mode=highest diff --git a/tatort/.prettierignore b/tatort/.prettierignore deleted file mode 100644 index 3897265..0000000 --- a/tatort/.prettierignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example - -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock diff --git a/tatort/.prettierrc b/tatort/.prettierrc deleted file mode 100644 index 95d17b4..0000000 --- a/tatort/.prettierrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": ["."], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }], - "svelteSortOrder": "options-styles-scripts-markup" -} diff --git a/tatort/README.md b/tatort/README.md deleted file mode 100644 index 5c91169..0000000 --- a/tatort/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/tatort/config.json.sample b/tatort/config.json.sample deleted file mode 100644 index 6acdf2c..0000000 --- a/tatort/config.json.sample +++ /dev/null @@ -1,17 +0,0 @@ -{ - "minio": { - "endPoint": "s3.home.arpa", - "port": 9000, - "useSSL": true, - "accessKey": "tMhLrfog47lMm0HZ", - "secretKey": "v0e32UlzMsTKMpnizNDWAMbQ9Gk7ZTeV" - }, - "jwt": { - "secret": "@S2!q@@wXz$dCQ8JoVsHLpzaJ6JCfB", - "expiresIn": 3600 - }, - "auth": { - "admin": { "password": "admin", "admin": true }, - "teimar70": { "password": "test", "admin": false } - } -} diff --git a/tatort/daten/1.glb b/tatort/daten/1.glb deleted file mode 100644 index 694cdba..0000000 Binary files a/tatort/daten/1.glb and /dev/null differ diff --git a/tatort/daten/2.glb b/tatort/daten/2.glb deleted file mode 100644 index 5f6099f..0000000 Binary files a/tatort/daten/2.glb and /dev/null differ diff --git a/tatort/daten/3.glb b/tatort/daten/3.glb deleted file mode 100644 index 27f19d8..0000000 Binary files a/tatort/daten/3.glb and /dev/null differ diff --git a/tatort/daten/4.glb b/tatort/daten/4.glb deleted file mode 100644 index 88ddabb..0000000 Binary files a/tatort/daten/4.glb and /dev/null differ diff --git a/tatort/daten/5.glb b/tatort/daten/5.glb deleted file mode 100644 index 5527dfe..0000000 Binary files a/tatort/daten/5.glb and /dev/null differ diff --git a/tatort/jsconfig.json b/tatort/jsconfig.json deleted file mode 100644 index fe45e13..0000000 --- a/tatort/jsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true - } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in -} diff --git a/tatort/package.json b/tatort/package.json deleted file mode 100644 index b21d7eb..0000000 --- a/tatort/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "tatort", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", - "test": "playwright test", - "test:unit": "vitest", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@playwright/test": "^1.28.1", - "@sveltejs/adapter-auto": "^2.0.0", - "@sveltejs/kit": "^1.5.0", - "eslint": "^8.28.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-svelte3": "^4.0.0", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.8.1", - "svelte": "^3.54.0", - "svelte-check": "^3.0.1", - "typescript": "^5.0.0", - "vite": "^4.3.0", - "vitest": "^0.25.3" - }, - "type": "module", - "dependencies": { - "@google/model-viewer": "^3.1.1", - "@sveltejs/adapter-node": "^1.2.4", - "@tailwindcss/forms": "^0.5.3", - "autoprefixer": "^10.4.14", - "jsonwebtoken": "^9.0.0", - "minio": "^7.1.1", - "postcss": "^8.4.24", - "svelte-cubed": "^0.2.1", - "tailwindcss": "^3.3.2", - "three": "^0.151.2" - } -} diff --git a/tatort/playwright.config.js b/tatort/playwright.config.js deleted file mode 100644 index a43c8c0..0000000 --- a/tatort/playwright.config.js +++ /dev/null @@ -1,11 +0,0 @@ -/** @type {import('@playwright/test').PlaywrightTestConfig} */ -const config = { - webServer: { - command: 'npm run build && npm run preview', - port: 4173 - }, - testDir: 'tests', - testMatch: /(.+\.)?(test|spec)\.[jt]s/ -}; - -export default config; diff --git a/tatort/postcss.config.cjs b/tatort/postcss.config.cjs deleted file mode 100644 index 054c147..0000000 --- a/tatort/postcss.config.cjs +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {} - } -}; diff --git a/tatort/postcss.config.js b/tatort/postcss.config.js deleted file mode 100644 index 2e7af2b..0000000 --- a/tatort/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/tatort/src/app.css b/tatort/src/app.css deleted file mode 100644 index bd6213e..0000000 --- a/tatort/src/app.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; \ No newline at end of file diff --git a/tatort/src/app.d.ts b/tatort/src/app.d.ts deleted file mode 100644 index 5ab1fbb..0000000 --- a/tatort/src/app.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// See https://kit.svelte.dev/docs/types#app -// for information about these interfaces -declare global { - namespace App { - // interface Error {} - interface Locals { - user: any - } - // interface PageData {} - // interface Platform {} - } -} - -export { }; diff --git a/tatort/src/app.html b/tatort/src/app.html deleted file mode 100644 index 6302e29..0000000 --- a/tatort/src/app.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Tatort - - - - - %sveltekit.head% - - -
%sveltekit.body%
- - diff --git a/tatort/src/hooks.server.js b/tatort/src/hooks.server.js deleted file mode 100644 index 19b1bcc..0000000 --- a/tatort/src/hooks.server.js +++ /dev/null @@ -1,16 +0,0 @@ -import { decryptToken } from '$lib/auth'; - -/** @type {import('@sveltejs/kit').Handle} */ -export async function handle({ event, resolve }) { - const jwt = event.cookies.get('session'); - try { - if (jwt) { - event.locals.user = decryptToken(jwt); - return resolve(event); - } - } catch (err) { - await event.cookies.delete('session'); - event.locals.user = null; - } - return resolve(event); -} diff --git a/tatort/src/index.test.js b/tatort/src/index.test.js deleted file mode 100644 index e07cbbd..0000000 --- a/tatort/src/index.test.js +++ /dev/null @@ -1,7 +0,0 @@ -import { describe, it, expect } from 'vitest'; - -describe('sum test', () => { - it('adds 1 + 2 to equal 3', () => { - expect(1 + 2).toBe(3); - }); -}); diff --git a/tatort/src/lib/auth.js b/tatort/src/lib/auth.js deleted file mode 100644 index 19d290a..0000000 --- a/tatort/src/lib/auth.js +++ /dev/null @@ -1,29 +0,0 @@ -import jwt from 'jsonwebtoken'; - -import config from '$lib/config'; - -const SECRET = config.jwt.secret; -const EXPIRES_IN = config.jwt.expiresIn; - -const AUTH = config.auth; - -export function createToken(userData) { - return jwt.sign(userData, SECRET, { expiresIn: EXPIRES_IN }); -} - -export function decryptToken(token) { - return jwt.verify(token, SECRET); -} - -export function authenticate(user, pass) { - let userData = null; - - if (AUTH[user]) { - const { password, ...data } = AUTH[user]; - if (password && password === pass) userData = data; - } - - if (userData == null) return null; - - return createToken({ id: user, ...userData }); -} diff --git a/tatort/src/lib/components/ui/Alert.svelte b/tatort/src/lib/components/ui/Alert.svelte deleted file mode 100644 index d461847..0000000 --- a/tatort/src/lib/components/ui/Alert.svelte +++ /dev/null @@ -1,57 +0,0 @@ - - - - -
- -
diff --git a/tatort/src/lib/components/ui/Button.svelte b/tatort/src/lib/components/ui/Button.svelte deleted file mode 100644 index dd05a7b..0000000 --- a/tatort/src/lib/components/ui/Button.svelte +++ /dev/null @@ -1,202 +0,0 @@ - - - - -{#if href} - - -{:else} - -{/if} diff --git a/tatort/src/lib/components/ui/DeleteIconButton.svelte b/tatort/src/lib/components/ui/DeleteIconButton.svelte deleted file mode 100644 index e2ef84c..0000000 --- a/tatort/src/lib/components/ui/DeleteIconButton.svelte +++ /dev/null @@ -1,70 +0,0 @@ - - - - -
- - - - {#if active} - - - - {/if} -
diff --git a/tatort/src/lib/components/ui/Modal/Modal.svelte b/tatort/src/lib/components/ui/Modal/Modal.svelte deleted file mode 100644 index bdf0705..0000000 --- a/tatort/src/lib/components/ui/Modal/Modal.svelte +++ /dev/null @@ -1,103 +0,0 @@ - - - - - -
-
- - -
diff --git a/tatort/src/lib/components/ui/Modal/ModalContent.svelte b/tatort/src/lib/components/ui/Modal/ModalContent.svelte deleted file mode 100644 index d791e1a..0000000 --- a/tatort/src/lib/components/ui/Modal/ModalContent.svelte +++ /dev/null @@ -1,28 +0,0 @@ - - - - -
- -
diff --git a/tatort/src/lib/components/ui/Modal/ModalFooter.svelte b/tatort/src/lib/components/ui/Modal/ModalFooter.svelte deleted file mode 100644 index 9a6eb5d..0000000 --- a/tatort/src/lib/components/ui/Modal/ModalFooter.svelte +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/tatort/src/lib/components/ui/Modal/ModalTitle.svelte b/tatort/src/lib/components/ui/Modal/ModalTitle.svelte deleted file mode 100644 index b39036b..0000000 --- a/tatort/src/lib/components/ui/Modal/ModalTitle.svelte +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/tatort/src/lib/components/ui/Notification.svelte b/tatort/src/lib/components/ui/Notification.svelte deleted file mode 100644 index 247e902..0000000 --- a/tatort/src/lib/components/ui/Notification.svelte +++ /dev/null @@ -1,87 +0,0 @@ - - -
- -
-
-
-
- - -
-
-

{title}

-

- -

-
-
- -
-
-
-
-
diff --git a/tatort/src/lib/components/ui/Panel.svelte b/tatort/src/lib/components/ui/Panel.svelte deleted file mode 100644 index ab1a807..0000000 --- a/tatort/src/lib/components/ui/Panel.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - - - -
- -
diff --git a/tatort/src/lib/components/ui/Select.svelte b/tatort/src/lib/components/ui/Select.svelte deleted file mode 100644 index d5752f3..0000000 --- a/tatort/src/lib/components/ui/Select.svelte +++ /dev/null @@ -1,126 +0,0 @@ - - - - -
-
- - -
-
    - - {#each options as option, index} -
  • { - selectOnChange(index); - }} - id="listbox-item-0" - role="option" - class="group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-900 hover:bg-blue-500 hover:text-white" - > -
    - {#if option.img} - {option.alt} - {/if} - - - {option.title} - -
    - {#if selected === index} - - - - {/if} -
  • - {/each} -
-
-
-
diff --git a/tatort/src/lib/config.js b/tatort/src/lib/config.js deleted file mode 100644 index 5c34af3..0000000 --- a/tatort/src/lib/config.js +++ /dev/null @@ -1,3 +0,0 @@ -import { readFileSync } from 'fs'; - -export default JSON.parse(readFileSync('./config.json')); diff --git a/tatort/src/lib/helper/caseNumberOccupied.js b/tatort/src/lib/helper/caseNumberOccupied.js deleted file mode 100644 index 50062e8..0000000 --- a/tatort/src/lib/helper/caseNumberOccupied.js +++ /dev/null @@ -1,22 +0,0 @@ -import { client } from '$lib/minio'; - -/** - * Check if caseNumber is used - * @param {string} caseNumber - * @returns {Promise { - let stream = client.listObjectsV2('tatort', prefix, false, ''); - stream.on('data', () => { - stream.destroy(); - resolve(true); - }); - stream.on('end', () => { - resolve(false); - }); - }); - - return promise; -} diff --git a/tatort/src/lib/helper/shortenFileSize.js b/tatort/src/lib/helper/shortenFileSize.js deleted file mode 100644 index 1525dfb..0000000 --- a/tatort/src/lib/helper/shortenFileSize.js +++ /dev/null @@ -1,22 +0,0 @@ -const KILO = 1024; -const MEGA = KILO * KILO; -const GIGA = MEGA * KILO; - -/** - * Shortens the size in bytes - * @param {number} size - * @returns{string} - */ -export default function shortenFileSize(size) { - const giga = Math.floor(size / GIGA); - let remainder = size % GIGA; - const mega = Math.floor(remainder / MEGA); - remainder %= MEGA; - const kilo = Math.floor(remainder / KILO); - remainder %= KILO; - - if (giga > 0) return `${giga} GB`; - if (mega > 0) return `${mega} MB`; - if (kilo > 0) return `${kilo} kB`; - return `${remainder} B`; -} diff --git a/tatort/src/lib/helper/timeElapsed.js b/tatort/src/lib/helper/timeElapsed.js deleted file mode 100644 index b2f8a73..0000000 --- a/tatort/src/lib/helper/timeElapsed.js +++ /dev/null @@ -1,33 +0,0 @@ -const MINUTE = 60; -const HOUR = 60 * MINUTE; -const DAY = 24 * HOUR; -const YEAR = 365 * DAY; -const MONTH = YEAR / 12; - -/** - * get readable string of time elapsed since date - * @param {Date} date - * @returns string - */ -export default function timeElapsed(date) { - const now = new Date(); - const age = Math.floor((now.getTime() - date.getTime()) / 1000); - - const years = Math.floor(age / YEAR); - let remainder = age % YEAR; - const months = Math.floor(remainder / MONTH); - remainder %= MONTH; - const days = Math.floor(remainder / DAY); - remainder %= DAY; - const hours = Math.floor(remainder / HOUR); - remainder %= HOUR; - const minutes = Math.floor(remainder / MINUTE); - const seconds = remainder % MINUTE; - if (years > 0) return years === 1 ? 'vor 1 Jahr' : `vor ${years} Jahren`; - if (months > 0) return months === 1 ? 'vor 1 Monat' : `vor ${months} Monaten`; - if (days > 0) return days === 1 ? 'vor 1 Tag' : `vor ${days} Tagen`; - if (hours > 0) return hours === 1 ? 'vor 1 Stunde' : `vor ${hours} Stunden`; - if (minutes > 0) return minutes === 1 ? 'vor 1 Minute' : `vor ${minutes} Minuten`; - - return seconds === 1 ? 'vor 1 Sekunde' : `vor ${seconds} Sekunden`; -} diff --git a/tatort/src/lib/icons/Arrow-left.svelte b/tatort/src/lib/icons/Arrow-left.svelte deleted file mode 100644 index 5b98b38..0000000 --- a/tatort/src/lib/icons/Arrow-left.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Arrow-right.svelte b/tatort/src/lib/icons/Arrow-right.svelte deleted file mode 100644 index cb9c9e9..0000000 --- a/tatort/src/lib/icons/Arrow-right.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Bell.svelte b/tatort/src/lib/icons/Bell.svelte deleted file mode 100644 index 0ec709c..0000000 --- a/tatort/src/lib/icons/Bell.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/tatort/src/lib/icons/Book.svelte b/tatort/src/lib/icons/Book.svelte deleted file mode 100644 index 4cc27f3..0000000 --- a/tatort/src/lib/icons/Book.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Check.svelte b/tatort/src/lib/icons/Check.svelte deleted file mode 100644 index 1189789..0000000 --- a/tatort/src/lib/icons/Check.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Chevron-left.svelte b/tatort/src/lib/icons/Chevron-left.svelte deleted file mode 100644 index 2a34fa5..0000000 --- a/tatort/src/lib/icons/Chevron-left.svelte +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/tatort/src/lib/icons/Chevron-right.svelte b/tatort/src/lib/icons/Chevron-right.svelte deleted file mode 100644 index 8b7440d..0000000 --- a/tatort/src/lib/icons/Chevron-right.svelte +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/tatort/src/lib/icons/Chevron.svelte b/tatort/src/lib/icons/Chevron.svelte deleted file mode 100644 index 5440f50..0000000 --- a/tatort/src/lib/icons/Chevron.svelte +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/tatort/src/lib/icons/Drag.svelte b/tatort/src/lib/icons/Drag.svelte deleted file mode 100644 index 97def46..0000000 --- a/tatort/src/lib/icons/Drag.svelte +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/tatort/src/lib/icons/Exclamation-circle.svelte b/tatort/src/lib/icons/Exclamation-circle.svelte deleted file mode 100644 index 0b9c550..0000000 --- a/tatort/src/lib/icons/Exclamation-circle.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Exclamation.svelte b/tatort/src/lib/icons/Exclamation.svelte deleted file mode 100644 index f35ed58..0000000 --- a/tatort/src/lib/icons/Exclamation.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Info.svelte b/tatort/src/lib/icons/Info.svelte deleted file mode 100644 index 560be4c..0000000 --- a/tatort/src/lib/icons/Info.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Login.svelte b/tatort/src/lib/icons/Login.svelte deleted file mode 100644 index b164996..0000000 --- a/tatort/src/lib/icons/Login.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - diff --git a/tatort/src/lib/icons/Play.svelte b/tatort/src/lib/icons/Play.svelte deleted file mode 100644 index 1c78552..0000000 --- a/tatort/src/lib/icons/Play.svelte +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/tatort/src/lib/icons/Plus.svelte b/tatort/src/lib/icons/Plus.svelte deleted file mode 100644 index 50dfeb3..0000000 --- a/tatort/src/lib/icons/Plus.svelte +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/tatort/src/lib/icons/Question-mark-circle.svelte b/tatort/src/lib/icons/Question-mark-circle.svelte deleted file mode 100644 index 4a2645c..0000000 --- a/tatort/src/lib/icons/Question-mark-circle.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Selector.svelte b/tatort/src/lib/icons/Selector.svelte deleted file mode 100644 index 81fdec3..0000000 --- a/tatort/src/lib/icons/Selector.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/icons/Trash.svelte b/tatort/src/lib/icons/Trash.svelte deleted file mode 100644 index 2199194..0000000 --- a/tatort/src/lib/icons/Trash.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/tatort/src/lib/icons/X.svelte b/tatort/src/lib/icons/X.svelte deleted file mode 100644 index 56582da..0000000 --- a/tatort/src/lib/icons/X.svelte +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/tatort/src/lib/minio.js b/tatort/src/lib/minio.js deleted file mode 100644 index 3f1b6b7..0000000 --- a/tatort/src/lib/minio.js +++ /dev/null @@ -1,6 +0,0 @@ -import Minio from 'minio'; -import config from '$lib/config'; - -process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; - -export const client = new Minio.Client(config.minio); diff --git a/tatort/src/routes/(angemeldet)/+layout.server.js b/tatort/src/routes/(angemeldet)/+layout.server.js deleted file mode 100644 index c54cfba..0000000 --- a/tatort/src/routes/(angemeldet)/+layout.server.js +++ /dev/null @@ -1,9 +0,0 @@ -import { redirect } from '@sveltejs/kit'; - -/** @type {import('./$types').PageServerLoad} */ -export function load(event) { - if (!event.locals.user && event.url.pathname !== '/anmeldung') throw redirect(303, '/anmeldung'); - return { - user: event.locals.user - }; -} diff --git a/tatort/src/routes/(angemeldet)/+layout.svelte b/tatort/src/routes/(angemeldet)/+layout.svelte deleted file mode 100644 index bbc47d3..0000000 --- a/tatort/src/routes/(angemeldet)/+layout.svelte +++ /dev/null @@ -1,96 +0,0 @@ - - -
-
-
- -
-
- -
- -
-
diff --git a/tatort/src/routes/(angemeldet)/+page.svelte b/tatort/src/routes/(angemeldet)/+page.svelte deleted file mode 100644 index dc92470..0000000 --- a/tatort/src/routes/(angemeldet)/+page.svelte +++ /dev/null @@ -1,123 +0,0 @@ - - - - -
-
- {#if data.user.admin} -
-
- - - -
- - Liste - - -

- Verschaffe Dir einen Überblick über alle gespeicherten Tatorte. -

-
- {/if} - {#if data.user.admin} -
-
- - - -
- - Neueer Vorgang - - -

Stelle einen weiteren Tatort für die Anwendung bereit.

-
- {/if} - {#if data.user.admin} -
-
- -
- - Hinzufügen - - -

Fügen Sie einem Tatort Bilder hinzu.

-
- {/if} -
-
- - - -
- - Ansicht - - -

Schau Dir einen Tatort in der 3D Ansicht an.

-
-
-
diff --git a/tatort/src/routes/(angemeldet)/list/+page.svelte b/tatort/src/routes/(angemeldet)/list/+page.svelte deleted file mode 100644 index fff40ab..0000000 --- a/tatort/src/routes/(angemeldet)/list/+page.svelte +++ /dev/null @@ -1,75 +0,0 @@ - - - - -
-
-

Liste der Vorgänge

-
-
- -
-
diff --git a/tatort/src/routes/(angemeldet)/list/[vorgang]/+page.svelte b/tatort/src/routes/(angemeldet)/list/[vorgang]/+page.svelte deleted file mode 100644 index 9b4c240..0000000 --- a/tatort/src/routes/(angemeldet)/list/[vorgang]/+page.svelte +++ /dev/null @@ -1,92 +0,0 @@ - - - - - diff --git a/tatort/src/routes/(angemeldet)/tatorte/+page.server.js b/tatort/src/routes/(angemeldet)/tatorte/+page.server.js deleted file mode 100644 index 48f197d..0000000 --- a/tatort/src/routes/(angemeldet)/tatorte/+page.server.js +++ /dev/null @@ -1,37 +0,0 @@ -import { client } from '$lib/minio'; -import { fail } from '@sveltejs/kit'; - -import caseNumberOccupied from '$lib/helper/caseNumberOccupied'; - -/** @type {import('./$types').Actions} */ -export const actions = { - default: async ({ request }) => { - const data = await request.formData(); - const caseNumber = data.get('caseNumber'); - const description = data.get('description'); - - if (!caseNumber) { - return fail(400, { - caseNumber, - description, - error: { caseNumber: 'Es muss eine Vorgangsnummer vorhanden sein.' } - }); - } - - if (await caseNumberOccupied(`${caseNumber}`)) { - return fail(400, { - caseNumber, - description, - error: { caseNumber: 'Die Vorgangsnummer wurde im System bereits angelegt.' } - }); - } - - const config = `${JSON.stringify({ caseNumber, description, version: 1 })}\n`; - - await client.putObject('tatort', `${caseNumber}/config.json`, config, { - 'Content-Type': 'application/json' - }); - - return { success: true }; - } -}; diff --git a/tatort/src/routes/(angemeldet)/tatorte/+page.svelte b/tatort/src/routes/(angemeldet)/tatorte/+page.svelte deleted file mode 100644 index 8b657e5..0000000 --- a/tatort/src/routes/(angemeldet)/tatorte/+page.svelte +++ /dev/null @@ -1,99 +0,0 @@ - - -
-
-

Neuer Vorgang

-
- -
-
-
-

- This information will be displayed publicly so be careful what you share. -

- -
-
- -
-
- -
-
- {#if form?.error?.caseNumber} -

{form.error.caseNumber}

- {/if} -
- -
- -
-