test
This commit is contained in:
+3
-15
@@ -65,21 +65,9 @@ public class VotingController {
|
|||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
if (motto != null){
|
mottoPhase = false;
|
||||||
mottoPhase = false;
|
votingPhase = false;
|
||||||
addingPhase = true;
|
addingPhase = true;
|
||||||
votingPhase = false;
|
|
||||||
} else if (adding != null){
|
|
||||||
addingPhase = true;
|
|
||||||
} else if (voting != null){
|
|
||||||
votingPhase = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// //TODO: TESTING REMOVE ON SHIPPING
|
|
||||||
// votingPhase = false;
|
|
||||||
// mottoPhase = true;
|
|
||||||
// addingPhase = false;
|
|
||||||
|
|
||||||
LOGGER.info("Program started with arguments: votingPhase="+ votingPhase + " mottoPhase=" + mottoPhase + " addingPhase=" + addingPhase);
|
LOGGER.info("Program started with arguments: votingPhase="+ votingPhase + " mottoPhase=" + mottoPhase + " addingPhase=" + addingPhase);
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class AuthCode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExpired(){
|
public boolean isExpired(){
|
||||||
return System.currentTimeMillis() >= (time + 600*1000);
|
return System.currentTimeMillis() >= (time + 1800*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTime(long time) {
|
public void setTime(long time) {
|
||||||
|
|||||||
@@ -24,25 +24,7 @@ h1 {
|
|||||||
font-size: 75px;
|
font-size: 75px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2.categoryHeader {
|
|
||||||
color: #FFF;
|
|
||||||
font-size: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
color: #FFF;
|
|
||||||
font-size: 35px;
|
|
||||||
font-weight: normal;
|
|
||||||
letter-spacing: .125rem;
|
|
||||||
text-transform: uppercase;
|
|
||||||
text-align: center;
|
|
||||||
transition: opacity .25s .5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submitButton {
|
.submitButton {
|
||||||
margin-top: 5%;
|
|
||||||
padding: .25em 0;
|
padding: .25em 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
|||||||
@@ -9,10 +9,34 @@
|
|||||||
|
|
||||||
<body class="center-screen">
|
<body class="center-screen">
|
||||||
<div class="centered">
|
<div class="centered">
|
||||||
<h1 style="color: red;">Du hast deine Kandidaten schon vorgeschlagen!</h1>
|
<h1>Du hast schon abgestimmt!</h1>
|
||||||
<a href="/">Return to Login-Site</a>
|
<h2 id="time_remain">Nächste Abstimmung in: </h2>
|
||||||
<button type="submit" id="signup_button">Abstimmen</button>
|
<button id="backButton" class="submitButton">Zurück zum Anfang</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById("backButton").onclick = function() {
|
||||||
|
location.href = "/";
|
||||||
|
};
|
||||||
|
|
||||||
|
// We can set endTime to whatever we want here (e.g. Midnight today )
|
||||||
|
// Use moment().endOf('day') to do this.
|
||||||
|
var dateFuture = new Date(2020, 11, 28, 0, 0);
|
||||||
|
|
||||||
|
// Show time remaining now.
|
||||||
|
showTimeRemaining();
|
||||||
|
|
||||||
|
// Set a timer to update the displayed clock every 1000 milliseconds.
|
||||||
|
setInterval(showTimeRemaining, 1000);
|
||||||
|
|
||||||
|
function showTimeRemaining() {
|
||||||
|
var dateNow = Date.now();
|
||||||
|
var days = Math.floor((dateFuture - dateNow) / (1000 * 60 * 60 * 24))
|
||||||
|
var hours = Math.floor(((dateFuture - dateNow) - days * 1000 * 60 * 60 * 24) / (1000 * 60 * 60))
|
||||||
|
var mins = Math.floor(((dateFuture - dateNow) - days * 1000 * 60 * 60 * 24 - hours * 1000 * 60 * 60) / (1000 * 60))
|
||||||
|
var secs = Math.floor(((dateFuture - dateNow) - days * 1000 * 60 * 60 * 24 - hours * 1000 * 60 * 60 - mins * 1000 * 60) / 1000)
|
||||||
|
document.getElementById("time_remain").innerHTML = "Nächste Abstimmung in: " + days + "D " + hours + ":" + mins + ":" + secs;
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user