From 69b969b1bdb90c3fea6a79c2b33628de6c6b9314 Mon Sep 17 00:00:00 2001 From: thomasrosen Date: Sat, 3 Jul 2021 18:52:55 +0200 Subject: [PATCH] Added basic and not finished qr-code generation --- package.json | 1 + src/index.css | 1 + src/index.js | 8 +- src/locales/de.ftl | 7 + src/locales/en.ftl | 8 + src/pages/App.js | 2 + src/pages/Generator.js | 150 + src/pages/Generator.module.css | 17 + yarn.lock | 11987 +++++++++++++++++++++++++++++++ 9 files changed, 12177 insertions(+), 4 deletions(-) create mode 100644 src/pages/Generator.js create mode 100644 src/pages/Generator.module.css create mode 100644 yarn.lock diff --git a/package.json b/package.json index 23d6c62..18c0e12 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@testing-library/user-event": "^12.1.10", "intl-pluralrules": "^1.2.2", "iso-639-1": "^2.1.9", + "qrcode": "^1.4.4", "react": "^17.0.2", "react-beautiful-dnd": "^13.1.0", "react-dom": "^17.0.2", diff --git a/src/index.css b/src/index.css index 7e7ee26..39e018b 100644 --- a/src/index.css +++ b/src/index.css @@ -216,6 +216,7 @@ textarea { resize: vertical; padding-bottom: var(--basis_x2); min-height: 20px; /* TODO: Find out why this is value works. */ + box-sizing: border-box; } button, diff --git a/src/index.js b/src/index.js index fd39c38..8c6d96e 100644 --- a/src/index.js +++ b/src/index.js @@ -9,10 +9,10 @@ import 'intl-pluralrules' import { AppLocalizationProvider, locales } from './fluent/l10n.js' window.domains = { - frontend: 'https://qrcode.volt.link', - // frontend: 'http://localhost:3000/', - backend: 'https://volt.link/', - // backend: 'http://localhost:4000/', + // frontend: 'https://qrcode.volt.link', + frontend: 'http://localhost:3000/', + // backend: 'https://volt.link/', + backend: 'http://localhost:4000/', } function AppLanguageWrapper() { diff --git a/src/locales/de.ftl b/src/locales/de.ftl index 7d154a5..31371f9 100644 --- a/src/locales/de.ftl +++ b/src/locales/de.ftl @@ -1,4 +1,11 @@ default_locale = de +website_title = Volt QR-Code Generator + contact = Kontakt source_code = Quellcode + +text_content_input_placeholder = https:// … oder Text + +filetype_headline = Als Vektor (VSG) oder Pixel (PNG) laden +error_correction_level_headline = Fehlerresistenz diff --git a/src/locales/en.ftl b/src/locales/en.ftl index f3fc22f..e451a92 100644 --- a/src/locales/en.ftl +++ b/src/locales/en.ftl @@ -1,4 +1,12 @@ default_locale = en +website_title = Volt QR-Code Generator + contact = Contact source_code = Source Code + +content_placeholder = https:// … or Text + +filetype_headline = Choose between Vector (VSG) or Pixel (PNG) Image. +error_correction_level_headline = Error Resistance + diff --git a/src/pages/App.js b/src/pages/App.js index 56de243..1cd504a 100644 --- a/src/pages/App.js +++ b/src/pages/App.js @@ -1,10 +1,12 @@ import classes from './App.module.css' import Localized from '../fluent/Localized.js' +import Generator from './Generator.js' function App() { return (<>
+