Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit c0a3275

Browse files
authored
Merge pull request #42 from codewizardshq/voting-and-design
fixes bug causing bypass of intro video
2 parents b673eae + 361c22e commit c0a3275

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1111
-607
lines changed

.github/workflows/code-quality-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
npm install -g yarn
2626
yarn install
2727
- name: Install MySQL Client
28-
run: sudo apt install default-libmysqlclient-dev
28+
run: sudo apt update && sudo apt install default-libmysqlclient-dev
2929
- name: Install Python dependencies
3030
run: |
3131
python -m pip install --upgrade pip

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"serialize-javascript": "^2.1.2",
1515
"vue": "^2.6.10",
1616
"vue-codemirror": "^4.0.6",
17+
"vue-marquee-text-component": "^1.1.1",
1718
"vue-moment": "^4.1.0",
1819
"vue-router": "^3.1.3",
1920
"vue-the-mask": "^0.11.1",
104 KB
Loading

public/images/book.png

78.8 KB
Loading
-605 Bytes
Loading

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta charset="utf-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
77
<meta name="viewport" content="width=device-width,initial-scale=1.0">
8+
<link href="https://fonts.googleapis.com/css?family=Barlow:400,700&display=swap" rel="stylesheet">
89
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
910
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
1011
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">

src/App.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<template>
22
<v-app>
3+
<CWHQ-bar />
34
<app-bar />
45
<quiz-bar />
56
<v-content>
7+
<!-- <v-container> -->
68
<router-view />
9+
<!-- </v-container> -->
710
</v-content>
11+
<leaderboard-bar />
812
<snackbar />
913
</v-app>
1014
</template>
@@ -13,13 +17,17 @@
1317
import AppBar from "@/components/AppBar";
1418
import QuizBar from "@/components/QuizBar";
1519
import Snackbar from "@/components/Snackbar";
20+
import CWHQBar from "@/components/CWHQBar";
21+
import LeaderboardBar from "@/components/LeaderboardBar";
1622
1723
export default {
1824
name: "App",
1925
components: {
2026
AppBar,
2127
QuizBar,
22-
Snackbar
28+
Snackbar,
29+
CWHQBar,
30+
LeaderboardBar
2331
}
2432
};
2533
</script>

src/api/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let state = {
1212
displayName: null,
1313
firstName: null,
1414
lastName: null,
15-
rank: 0
15+
rank: -1
1616
};
1717

1818
async function setState(newState) {
@@ -71,7 +71,7 @@ async function autoLogin() {
7171

7272
async function logout() {
7373
await request(routes.userapi_logout, {}, false);
74-
await setState({ auth: false });
74+
await setState({ auth: false, rank: -1 });
7575
}
7676

7777
function currentUser() {

src/api/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { default as auth } from "./auth";
22
export { default as quiz } from "./quiz";
3+
export { default as voting } from "./voting";

src/api/quiz.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ async function submit(answer) {
2222
return result.correct;
2323
}
2424

25+
async function getLeaderboard() {
26+
return request(routes.questionsapi_leaderboard, { per: 1000000 });
27+
}
28+
2529
async function submitFinal(answer, language, checkOnly) {
2630
const result = await request(routes.questionsapi_answer_final_question, {
2731
data: {
@@ -38,5 +42,6 @@ export default {
3842
submit,
3943
submitFinal,
4044
getRank,
41-
resetRank
45+
resetRank,
46+
getLeaderboard
4247
};

0 commit comments

Comments
 (0)