From 4fc25b72d11afa0f5af0e6017a9681288020933f Mon Sep 17 00:00:00 2001 From: Philipp Opheys Date: Tue, 11 Jun 2024 00:09:39 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20fix=20elections=20prompt?= =?UTF-8?q?=20(#406)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rogue-thi-app/.env | 3 ++- rogue-thi-app/components/allCards.jsx | 6 +++--- .../components/cards/ElectionPrompt.jsx | 11 ++++++++--- rogue-thi-app/components/cards/EventPrompt.jsx | 7 ++++--- rogue-thi-app/package-lock.json | 18 +++++++++++------- rogue-thi-app/public/locales/de/common.json | 3 ++- rogue-thi-app/public/locales/de/dashboard.json | 2 +- rogue-thi-app/public/locales/en/common.json | 3 ++- rogue-thi-app/public/locales/en/dashboard.json | 2 +- 9 files changed, 34 insertions(+), 21 deletions(-) diff --git a/rogue-thi-app/.env b/rogue-thi-app/.env index 9b04306d..6994c525 100644 --- a/rogue-thi-app/.env +++ b/rogue-thi-app/.env @@ -6,4 +6,5 @@ NEXT_PUBLIC_GIT_URL=https://github.com/neuland-ingolstadt/THI-App NEXT_PUBLIC_FEEDBACK_URL=mailto:app-feedback@informatik.sexy NEXT_PUBLIC_WEBSITE_URL=https://neuland-ingolstadt.de NEXT_PUBLIC_CTF_URL=https://neuland-ingolstadt.de/ctf-training/ -NEXT_PUBLIC_DEEPL_ENDPOINT=https://api-free.deepl.com/v2/translate \ No newline at end of file +NEXT_PUBLIC_DEEPL_ENDPOINT=https://api-free.deepl.com/v2/translate +NEXT_PUBLIC_ELECTION_URL=https://studverthi.de/jetzt-waehlen \ No newline at end of file diff --git a/rogue-thi-app/components/allCards.jsx b/rogue-thi-app/components/allCards.jsx index 9f52c3f7..2ff6d89d 100644 --- a/rogue-thi-app/components/allCards.jsx +++ b/rogue-thi-app/components/allCards.jsx @@ -11,7 +11,7 @@ import TimetableCard from './cards/TimetableCard' import { GraduationCap, Library, Map, Scroll, User } from 'lucide-react' import { USER_EMPLOYEE, USER_GUEST, USER_STUDENT } from '../lib/hooks/user-kind' -import EventPrompt from "./cards/EventPrompt"; +import ElectionPrompt from './cards/ElectionPrompt' export const PLATFORM_DESKTOP = 'desktop' export const PLATFORM_MOBILE = 'mobile' @@ -28,11 +28,11 @@ export const ALL_DASHBOARD_CARDS = [ ), }, { - key: 'votepromt2024', + key: 'election', label: 'Jetzt wählen!', removable: true, default: [PLATFORM_MOBILE, USER_STUDENT, USER_EMPLOYEE, USER_GUEST], - card: () => + card: () => , }, { key: 'exams', diff --git a/rogue-thi-app/components/cards/ElectionPrompt.jsx b/rogue-thi-app/components/cards/ElectionPrompt.jsx index 2126bc95..ef00c4d9 100644 --- a/rogue-thi-app/components/cards/ElectionPrompt.jsx +++ b/rogue-thi-app/components/cards/ElectionPrompt.jsx @@ -5,8 +5,8 @@ import Card from 'react-bootstrap/Card' import { Vote, X } from 'lucide-react' +import { Trans, useTranslation } from 'next-i18next' import styles from '../../styles/Home.module.css' -import { useTranslation } from 'next-i18next' const electionUrl = process.env.NEXT_PUBLIC_ELECTION_URL @@ -31,10 +31,15 @@ export default function ElectionPrompt({ onHide }) { -

{t('election.text')}

+

+ , br:
}} + /> +

diff --git a/rogue-thi-app/components/cards/EventPrompt.jsx b/rogue-thi-app/components/cards/EventPrompt.jsx index 4a4a3b89..5031cb88 100644 --- a/rogue-thi-app/components/cards/EventPrompt.jsx +++ b/rogue-thi-app/components/cards/EventPrompt.jsx @@ -28,9 +28,10 @@ export default function EventPrompt({ onHide }) {

- Stell dir vor es sind Wahlen, aber keiner geht hin? So macht Demokratie doch keinen Sinn!{' '} - Di. 11.06 bis Do. 13.06 unter:{' '} - studverthi.de/jetzt-waehlen + Interessierst du dich für Informatik? Die Infoveranstaltung von + Neuland Ingolstadt e.V. findet am{' '} + Di, 10.10. um 18:00 in Raum J102 statt. Komm + vorbei!

diff --git a/rogue-thi-app/package-lock.json b/rogue-thi-app/package-lock.json index be75e4c4..8f515028 100644 --- a/rogue-thi-app/package-lock.json +++ b/rogue-thi-app/package-lock.json @@ -1005,11 +1005,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2384,9 +2385,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3263,6 +3265,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -5503,6 +5506,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, diff --git a/rogue-thi-app/public/locales/de/common.json b/rogue-thi-app/public/locales/de/common.json index 0df34fe4..646c4b31 100644 --- a/rogue-thi-app/public/locales/de/common.json +++ b/rogue-thi-app/public/locales/de/common.json @@ -63,7 +63,8 @@ "grades": "Noten & Fächer", "personal": "Profil", "lecturers": "Dozenten", - "exams": "Prüfungen" + "exams": "Prüfungen", + "election": "Hochschulwahlen" }, "prompts": { "close": "Schließen" diff --git a/rogue-thi-app/public/locales/de/dashboard.json b/rogue-thi-app/public/locales/de/dashboard.json index fc52dc4d..459a6084 100644 --- a/rogue-thi-app/public/locales/de/dashboard.json +++ b/rogue-thi-app/public/locales/de/dashboard.json @@ -79,7 +79,7 @@ }, "election": { "title": "Hochschulwahlen", - "text": "Aktuell finden die Hochschulwahlen statt. Deine Teilnahme ist wichtig, um die demokratischen Strukturen an unserer Hochschule zu stärken.", + "text": "Stell dir vor es sind Wahlen, aber keiner geht hin? So macht Demokratie doch keinen Sinn!
Am Di. 11.06 bis Do. 13.06 wählen:", "button": "Stimme online abgeben", "icon.close": "Schließen" }, diff --git a/rogue-thi-app/public/locales/en/common.json b/rogue-thi-app/public/locales/en/common.json index 58274843..7b3b609d 100644 --- a/rogue-thi-app/public/locales/en/common.json +++ b/rogue-thi-app/public/locales/en/common.json @@ -63,7 +63,8 @@ "grades": "Grades & Subjects", "personal": "Profile", "lecturers": "Lecturers", - "exams": "Exams" + "exams": "Exams", + "election": "University Elections" }, "prompts": { "close": "Close" diff --git a/rogue-thi-app/public/locales/en/dashboard.json b/rogue-thi-app/public/locales/en/dashboard.json index 38abb7ba..d0556740 100644 --- a/rogue-thi-app/public/locales/en/dashboard.json +++ b/rogue-thi-app/public/locales/en/dashboard.json @@ -79,7 +79,7 @@ }, "election": { "title": "University Elections", - "text": "The university elections are currently taking place. Your participation is important to strengthen the democratic structures at our university.", + "text": "Imagine there are elections, but nobody goes? Democracy makes no sense like that!
Vote on Tue. 11.06 to Thu. 13.06:", "button": "Vote Online", "icon.close": "Close" },