From 4c01e68264180e892c845c161510a327d975381d Mon Sep 17 00:00:00 2001 From: cami Date: Fri, 30 Jul 2021 11:00:02 +0200 Subject: [PATCH] Make a box that the study is finished --- backend/Dockerfile | 3 ++- frontend/src/App.css | 10 ++++++++++ frontend/src/components/HeroSection.jsx | 2 ++ frontend/src/components/StudyFinished.jsx | 11 +++++++++++ frontend/src/components/pages/Privacy.jsx | 2 ++ frontend/src/components/pages/Study.jsx | 2 ++ 6 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/StudyFinished.jsx diff --git a/backend/Dockerfile b/backend/Dockerfile index 8c2b849..b06cd7d 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -4,7 +4,8 @@ WORKDIR /app COPY requirements.txt . -RUN apk install sqlite3 +RUN apt-get -y update +RUN apt-get -y install sqlite3 RUN pip install -r requirements.txt diff --git a/frontend/src/App.css b/frontend/src/App.css index 85703b2..2a480cd 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -97,3 +97,13 @@ h1 { font-weight: bold; user-select: none; } + +.study-finished { + background-color: var(--primary); + padding: 0.5em; +} + +.study-finished > p { + color: var(--error); + font-size: 2em; +} diff --git a/frontend/src/components/HeroSection.jsx b/frontend/src/components/HeroSection.jsx index 2613f3d..33e3968 100644 --- a/frontend/src/components/HeroSection.jsx +++ b/frontend/src/components/HeroSection.jsx @@ -3,6 +3,7 @@ import "../App.css"; import { Button } from "./Button"; import "./HeroSection.css"; import { useAuth } from "../auth/AuthProvider"; +import StudyFinished from "./StudyFinished"; export default function HeroSection() { const [isLoggedIn] = useAuth(); @@ -10,6 +11,7 @@ export default function HeroSection() { return (

Herzlich Willkommen

+
{isLoggedIn ? (
+ ); +} diff --git a/frontend/src/components/pages/Privacy.jsx b/frontend/src/components/pages/Privacy.jsx index 4afd173..9b3bbc2 100644 --- a/frontend/src/components/pages/Privacy.jsx +++ b/frontend/src/components/pages/Privacy.jsx @@ -72,8 +72,10 @@ export default function Privacy() { angegeben haben, verwendet werden.

Weitergabe der Daten

+

Grundsätzlich werden die Daten nicht an Dritte weitergegeben. Folgende Ausnahmen gibt es: +

  • Der Fernfachhochschule Schweiz werden die Daten falls notwendig diff --git a/frontend/src/components/pages/Study.jsx b/frontend/src/components/pages/Study.jsx index cb1c9a9..915b054 100644 --- a/frontend/src/components/pages/Study.jsx +++ b/frontend/src/components/pages/Study.jsx @@ -12,6 +12,7 @@ import BehaviorPhone from "../BehaviorPhone"; import BehaviorStanding from "../BehaviorStanding"; import BehaviorStudyEnd from "../BehaviorStudyEnd"; import { authFetch } from "../../auth/AuthProvider"; +import StudyFinished from "../StudyFinished"; export default function Study() { const _logger = useRef(0); @@ -270,6 +271,7 @@ export default function Study() { <>

    Studie

    + {state === STATES.START ? study_start : null} {state === STATES.NORMAL ? study_normal : null} {state === STATES.PHONE ? study_phone : null}