survey-end #211
6 changed files with 29 additions and 2 deletions
|
@ -4,7 +4,8 @@ WORKDIR /app
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
RUN apk install sqlite3
|
RUN apt-get -y update
|
||||||
|
RUN apt-get -y install sqlite3
|
||||||
|
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
|
@ -97,3 +97,13 @@ h1 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.study-finished {
|
||||||
|
background-color: var(--primary);
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.study-finished > p {
|
||||||
|
color: var(--error);
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import "../App.css";
|
||||||
import { Button } from "./Button";
|
import { Button } from "./Button";
|
||||||
import "./HeroSection.css";
|
import "./HeroSection.css";
|
||||||
import { useAuth } from "../auth/AuthProvider";
|
import { useAuth } from "../auth/AuthProvider";
|
||||||
|
import StudyFinished from "./StudyFinished";
|
||||||
|
|
||||||
export default function HeroSection() {
|
export default function HeroSection() {
|
||||||
const [isLoggedIn] = useAuth();
|
const [isLoggedIn] = useAuth();
|
||||||
|
@ -10,6 +11,7 @@ export default function HeroSection() {
|
||||||
return (
|
return (
|
||||||
<div className="hero-container">
|
<div className="hero-container">
|
||||||
<h1>Herzlich Willkommen</h1>
|
<h1>Herzlich Willkommen</h1>
|
||||||
|
<StudyFinished />
|
||||||
<div className="hero-btns">
|
<div className="hero-btns">
|
||||||
{isLoggedIn ? (
|
{isLoggedIn ? (
|
||||||
<Button
|
<Button
|
||||||
|
|
11
frontend/src/components/StudyFinished.jsx
Normal file
11
frontend/src/components/StudyFinished.jsx
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import React from "react";
|
||||||
|
import "../App.css"
|
||||||
|
|
||||||
|
export default function StudyFinished() {
|
||||||
|
return (
|
||||||
|
<div className="study-finished">
|
||||||
|
<p>Die Studie wurde beendet.</p>
|
||||||
|
<p>Vielen Dank für die Teilnahme an der Studie</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -72,8 +72,10 @@ export default function Privacy() {
|
||||||
angegeben haben, verwendet werden.
|
angegeben haben, verwendet werden.
|
||||||
</p>
|
</p>
|
||||||
<h2>Weitergabe der Daten</h2>
|
<h2>Weitergabe der Daten</h2>
|
||||||
|
<p>
|
||||||
Grundsätzlich werden die Daten nicht an Dritte weitergegeben. Folgende
|
Grundsätzlich werden die Daten nicht an Dritte weitergegeben. Folgende
|
||||||
Ausnahmen gibt es:
|
Ausnahmen gibt es:
|
||||||
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
Der Fernfachhochschule Schweiz werden die Daten falls notwendig
|
Der Fernfachhochschule Schweiz werden die Daten falls notwendig
|
||||||
|
|
|
@ -12,6 +12,7 @@ import BehaviorPhone from "../BehaviorPhone";
|
||||||
import BehaviorStanding from "../BehaviorStanding";
|
import BehaviorStanding from "../BehaviorStanding";
|
||||||
import BehaviorStudyEnd from "../BehaviorStudyEnd";
|
import BehaviorStudyEnd from "../BehaviorStudyEnd";
|
||||||
import { authFetch } from "../../auth/AuthProvider";
|
import { authFetch } from "../../auth/AuthProvider";
|
||||||
|
import StudyFinished from "../StudyFinished";
|
||||||
|
|
||||||
export default function Study() {
|
export default function Study() {
|
||||||
const _logger = useRef(0);
|
const _logger = useRef(0);
|
||||||
|
@ -33,7 +34,6 @@ export default function Study() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
_logger.current = new Logger({
|
_logger.current = new Logger({
|
||||||
inputs: ["keyboard", "wheel", "cursor", "custom"],
|
inputs: ["keyboard", "wheel", "cursor", "custom"],
|
||||||
apiUrl: "https://behavior.marcocamenzind.ch",
|
|
||||||
});
|
});
|
||||||
_logger.current.init();
|
_logger.current.init();
|
||||||
authFetch("/api/username", {
|
authFetch("/api/username", {
|
||||||
|
@ -270,6 +270,7 @@ export default function Study() {
|
||||||
<>
|
<>
|
||||||
<div className="sitePage">
|
<div className="sitePage">
|
||||||
<h1>Studie</h1>
|
<h1>Studie</h1>
|
||||||
|
<StudyFinished />
|
||||||
{state === STATES.START ? study_start : null}
|
{state === STATES.START ? study_start : null}
|
||||||
{state === STATES.NORMAL ? study_normal : null}
|
{state === STATES.NORMAL ? study_normal : null}
|
||||||
{state === STATES.PHONE ? study_phone : null}
|
{state === STATES.PHONE ? study_phone : null}
|
||||||
|
|
Loading…
Reference in a new issue