diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..1fd2ce5 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,5 @@ +node_modules +dist +.git +*.md +*.log diff --git a/frontend/.gitignore b/frontend/.gitignore deleted file mode 100644 index a547bf3..0000000 --- a/frontend/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e7f0433..c10ed0d 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,20 +1,10 @@ -FROM node:22-alpine AS build - +FROM node:20-alpine AS build WORKDIR /app - -COPY package*.json ./ -RUN npm ci - +COPY package.json package-lock.json* ./ +RUN npm install COPY . . - RUN npm run build - FROM nginx:alpine -RUN apk add --no-cache curl - COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf - EXPOSE 80 - -CMD ["nginx", "-g", "daemon off;"] diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index a36934d..0000000 --- a/frontend/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# React + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) - -## React Compiler - -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js deleted file mode 100644 index ea36dd3..0000000 --- a/frontend/eslint.config.js +++ /dev/null @@ -1,21 +0,0 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import { defineConfig, globalIgnores } from 'eslint/config' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{js,jsx}'], - extends: [ - js.configs.recommended, - reactHooks.configs.flat.recommended, - reactRefresh.configs.vite, - ], - languageOptions: { - globals: globals.browser, - parserOptions: { ecmaFeatures: { jsx: true } }, - }, - }, -]) diff --git a/frontend/index.html b/frontend/index.html index f94d687..dcd313d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,13 +1,12 @@ - - -
- - - -+ Klicken Sie auf zwei Punkte mit bekanntem Abstand im Bild. +
+ {calibPoint1 && !calibPoint2 &&Erster Punkt gesetzt. Bitte zweiten Punkt klicken.
} + {calibPoint1 && calibPoint2 && ( ++ Aktueller Maßstab: {config.scale.toFixed(2)} px/mm +
+ )} +Keine Blöcke in dieser Kategorie.
- )} -Keine Historie vorhanden.
+{state.manifest.description}
+Keine Zeichnungen vorhanden.
- ) : ( -| Name | Zuletzt geändert | Aktionen |
|---|---|---|
| {d.name} | -{new Date(d.updatedAt).toLocaleString()} | -- - - | -
Lade Projekte…
+ ) : projects.length === 0 ? ( +Noch keine Projekte. Erstellen Sie ein neues Projekt.
+ ) : ( +{project.description}
} +{error}
} - -- Kein Konto? Registrieren -
-Anmelden
+ + {error && ( ++ Noch kein Konto?{' '} + +
+{error}
} - -- Bereits registriert? Anmelden -
-Registrieren
+ + {displayError && ( ++ Bereits ein Konto?{' '} + +
+