Merge branch 'master' into feat/personal-highscore
This commit is contained in:
@@ -1,10 +1,5 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const mongoose = require('mongoose');
|
|
||||||
mongoose.connect('mongodb://localhost:27017/vinlottis', {
|
|
||||||
useNewUrlParser: true
|
|
||||||
})
|
|
||||||
|
|
||||||
const Highscore = require(path.join(__dirname + '/../schemas/Highscore'));
|
const Highscore = require(path.join(__dirname + '/../schemas/Highscore'));
|
||||||
const Wine = require(path.join(__dirname + '/../schemas/Wine'));
|
const Wine = require(path.join(__dirname + '/../schemas/Wine'));
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const mongoose = require("mongoose");
|
|
||||||
mongoose.connect("mongodb://localhost:27017/vinlottis", {
|
|
||||||
useNewUrlParser: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const Purchase = require(path.join(__dirname + "/../schemas/Purchase"));
|
const Purchase = require(path.join(__dirname + "/../schemas/Purchase"));
|
||||||
const Wine = require(path.join(__dirname + "/../schemas/Wine"));
|
const Wine = require(path.join(__dirname + "/../schemas/Wine"));
|
||||||
|
|||||||
@@ -2,13 +2,8 @@ const express = require("express");
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
const webpush = require("web-push"); //requiring the web-push module
|
const webpush = require("web-push"); //requiring the web-push module
|
||||||
const mongoose = require("mongoose");
|
|
||||||
const schedule = require("node-schedule");
|
const schedule = require("node-schedule");
|
||||||
|
|
||||||
mongoose.connect("mongodb://localhost:27017/vinlottis", {
|
|
||||||
useNewUrlParser: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const mustBeAuthenticated = require(path.join(
|
const mustBeAuthenticated = require(path.join(
|
||||||
__dirname + "/../middleware/mustBeAuthenticated"
|
__dirname + "/../middleware/mustBeAuthenticated"
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
const express = require("express");
|
const express = require("express");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const mongoose = require("mongoose");
|
|
||||||
mongoose.connect("mongodb://localhost:27017/vinlottis", {
|
|
||||||
useNewUrlParser: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const sub = require(path.join(__dirname + "/../api/subscriptions"));
|
const sub = require(path.join(__dirname + "/../api/subscriptions"));
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { page, event } from "vue-analytics";
|
import { page, event } from "vue-analytics";
|
||||||
|
import { prelottery } from "@/api";
|
||||||
import Banner from "@/ui/Banner";
|
import Banner from "@/ui/Banner";
|
||||||
import Wine from "@/ui/Wine";
|
import Wine from "@/ui/Wine";
|
||||||
|
|
||||||
@@ -25,8 +26,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const _wines = await fetch("/api/wines/prelottery");
|
prelottery().then(wines => this.wines = wines);
|
||||||
this.wines = await _wines.json();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAmIWinner, postWineChosen } from "@/api";
|
import { getAmIWinner, postWineChosen, prelottery } from "@/api";
|
||||||
import Wine from "@/ui/Wine";
|
import Wine from "@/ui/Wine";
|
||||||
export default {
|
export default {
|
||||||
components: { Wine },
|
components: { Wine },
|
||||||
@@ -60,8 +60,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.turn = true;
|
this.turn = true;
|
||||||
this.name = winnerObject.name;
|
this.name = winnerObject.name;
|
||||||
const _wines = await fetch("/api/wines/prelottery");
|
this.wines = await prelottery();
|
||||||
this.wines = await _wines.json();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
chosenWine: async function(name) {
|
chosenWine: async function(name) {
|
||||||
|
|||||||
@@ -133,6 +133,15 @@ textarea {
|
|||||||
// disable-dbl-tap-zoom
|
// disable-dbl-tap-zoom
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
|
|
||||||
|
&.auto-height {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.danger {
|
||||||
|
background-color: $red;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -176,9 +185,14 @@ textarea {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 1px solid $link-color;
|
border-bottom: 1px solid $link-color;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin-left: 15px;
|
cursor: pointer;
|
||||||
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: $matte-text-color;
|
color: $matte-text-color;
|
||||||
|
|
||||||
|
&:focus, &:hover {
|
||||||
|
border-color: $link-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -186,8 +200,35 @@ textarea {
|
|||||||
&-md {
|
&-md {
|
||||||
margin-top: 3rem;
|
margin-top: 3rem;
|
||||||
}
|
}
|
||||||
|
&-sm {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
&-0 {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.margin-left {
|
||||||
|
&-md {
|
||||||
|
margin-left: 3rem;
|
||||||
|
}
|
||||||
|
&-sm {
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
&-0 {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.margin-right {
|
||||||
|
&-md {
|
||||||
|
margin-right: 3rem;
|
||||||
|
}
|
||||||
|
&-sm {
|
||||||
|
margin-right: 1rem;
|
||||||
|
}
|
||||||
|
&-0 {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.margin-bottom {
|
.margin-bottom {
|
||||||
&-md {
|
&-md {
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 3rem;
|
||||||
@@ -230,3 +271,15 @@ textarea {
|
|||||||
background-color: $light-red;
|
background-color: $light-red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.desktop-only {
|
||||||
|
@include mobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-only {
|
||||||
|
@include desktop {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
$mobile-width: 768px;
|
$mobile-width: 768px;
|
||||||
$tablet-max: 1200px;
|
$tablet-max: 1200px;
|
||||||
$desktop-max: 1704;
|
$desktop-max: 2004px;
|
||||||
|
|
||||||
|
|
||||||
@mixin mobile {
|
@mixin mobile {
|
||||||
@@ -15,7 +15,6 @@ $desktop-max: 1704;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@mixin desktop {
|
@mixin desktop {
|
||||||
@media (min-width: #{$tablet-max + 1px}) {
|
@media (min-width: #{$tablet-max + 1px}) {
|
||||||
@content;
|
@content;
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
&.justify-space-between {
|
&.justify-space-between {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
&.justify-end {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
&.justify-start {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
&.align-center {
|
&.align-center {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -27,4 +33,14 @@
|
|||||||
|
|
||||||
.inline-block {
|
.inline-block {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.float {
|
||||||
|
&-left {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-right {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
$primary: #dbeede;
|
$primary: #b7debd;
|
||||||
|
|
||||||
$light-green: #c8f9df;
|
$light-green: #c8f9df;
|
||||||
$green: #0be881;
|
$green: #0be881;
|
||||||
|
|||||||
Reference in New Issue
Block a user