feat: Test using HTTPS and HTTP2

This commit is contained in:
Alexander Polynomdivision
2018-09-30 20:15:27 +02:00
parent b47b18c373
commit 4a6b40ad72
6 changed files with 31 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ import TableCell from "@material-ui/core/TableCell";
import Typography from "@material-ui/core/Typography";
import { TopTen } from "../models/learner";
import { userScoreToLevel } from "../models/user";
interface IProps {
topTen: TopTen[];
@@ -43,10 +44,12 @@ export default class Scoreboard extends React.Component<IProps> {
<TableCell>
<Typography component="b">{username}</Typography>
</TableCell>
{/*<TableCell numeric>{learner.level}</TableCell>*/}
<TableCell numeric>
{userScoreToLevel(learner.score).level}
</TableCell>
{/* To make this fit on both mobile and desktop, we don't use
numeric, as it would otherwise look weir otherwise look weird */}
<TableCell>{learner.score}</TableCell>
<TableCell numeric>{learner.score}</TableCell>
</TableRow>
}
@@ -66,8 +69,8 @@ export default class Scoreboard extends React.Component<IProps> {
<TableRow>
<TableCell>#</TableCell>
<TableCell>User</TableCell>
{/*<TableCell>Level</TableCell>*/}
<TableCell>Punktzahl</TableCell>
<TableCell numeric>Level</TableCell>
<TableCell numeric>Punktzahl</TableCell>
</TableRow>
</TableHead>
<TableBody>

View File

@@ -1,4 +1,5 @@
// Maximum distance from the answer to be still considered correct
export const LEVENSHTEIN_MAX_DISTANCE = 2;
export const BACKEND_URL = "http://127.0.0.1";
// export const BACKEND_URL = "http://127.0.0.1";
export const BACKEND_URL = "https://192.168.178.100";

View File

@@ -1,6 +1,5 @@
export interface ILearner {
username: string;
level: number;
score: number;
}

View File

@@ -146,7 +146,8 @@ const ReviewPageWithRouter = withRouter(
// W | W | W
// (1)C | - | C
// (2)W | - | W
// @correct: Was the answer given correct?
// Args:
// @correct: Was the answer given correct?
updateGroupSM2 = (correct: boolean) => {
const { id } = this.props.current;
switch (correct) {