Various cosmetic tweaks
This commit is contained in:
@@ -138,7 +138,17 @@ class FileStore(pathStr: String): Store {
|
|||||||
entries.mapNotNull { entry ->
|
entries.mapNotNull { entry ->
|
||||||
entry.toFile()
|
entry.toFile()
|
||||||
}.firstOrNull()
|
}.firstOrNull()
|
||||||
}?.renameTo(path.resolve(filename + "-${timestamp}").toFile())
|
}?.let { file ->
|
||||||
|
val dest = path.resolve(filename + "-${timestamp}").toFile()
|
||||||
|
if (dest.exists()) {
|
||||||
|
// it means the user performed several actions in the same second...
|
||||||
|
// drop the last occurrence
|
||||||
|
dest.delete()
|
||||||
|
}
|
||||||
|
if (!file.renameTo(dest)) {
|
||||||
|
throw Error("Cannot rename ${file.path} to ${dest.path}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addTournament(tournament)
|
addTournament(tournament)
|
||||||
}
|
}
|
||||||
|
@@ -47,9 +47,11 @@ object RatingsManager: Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const val PERIOD = 3600000L
|
||||||
|
|
||||||
override fun run() {
|
override fun run() {
|
||||||
logger.info("launching ratings manager")
|
logger.info("launching ratings manager")
|
||||||
timer.scheduleAtFixedRate(Task, 0L, 3600000L)
|
timer.scheduleAtFixedRate(Task, 0L, PERIOD)
|
||||||
}
|
}
|
||||||
object Task: TimerTask() {
|
object Task: TimerTask() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
|
@@ -43,6 +43,12 @@
|
|||||||
color: darkred;
|
color: darkred;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
color: darkred;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
/* header, center, footer */
|
/* header, center, footer */
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
@@ -302,17 +308,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#backdrop {
|
#backdrop {
|
||||||
display: none;
|
|
||||||
&.active {
|
|
||||||
display: block;
|
display: block;
|
||||||
|
background-color: rgba(0,0,0,0.2);
|
||||||
|
opacity: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
background-color: rgba(0,0,0,0.2);
|
transition: opacity 500s ease-out;
|
||||||
|
pointer-events: none;
|
||||||
|
&.active {
|
||||||
|
pointer-events: initial;
|
||||||
cursor: wait;
|
cursor: wait;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -341,6 +341,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.player {
|
.player {
|
||||||
|
min-width: 12em;
|
||||||
&.winner {
|
&.winner {
|
||||||
color: darkred;
|
color: darkred;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@@ -189,3 +189,5 @@ Log in using Se connecter avec
|
|||||||
(reserved to FFG actors) (réservé aux acteurs FFG)
|
(reserved to FFG actors) (réservé aux acteurs FFG)
|
||||||
Log in using an email Se connecter avec un email
|
Log in using an email Se connecter avec un email
|
||||||
password mot de passe
|
password mot de passe
|
||||||
|
Warning: publishing partial results at round Attention: publication partielle des résultats à la ronde
|
||||||
|
out of sur
|
@@ -198,8 +198,17 @@ onLoad(() => {
|
|||||||
// $('#player-form')[0].requestSubmit() not working?!
|
// $('#player-form')[0].requestSubmit() not working?!
|
||||||
$('#player-form')[0].dispatchEvent(new CustomEvent('submit', {cancelable: true}));
|
$('#player-form')[0].dispatchEvent(new CustomEvent('submit', {cancelable: true}));
|
||||||
});
|
});
|
||||||
|
$('#search-form').on('submit', e => {
|
||||||
|
// this form is never meant to be submitted
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
$('#player-form').on('submit', e => {
|
$('#player-form').on('submit', e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if ($('#register').hasClass('disabled')) {
|
||||||
|
// user pressed enter
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let form = $('#player-form')[0];
|
let form = $('#player-form')[0];
|
||||||
let player = {
|
let player = {
|
||||||
name: form.val('name'),
|
name: form.val('name'),
|
||||||
|
@@ -221,7 +221,7 @@
|
|||||||
<div class="popup-footer">
|
<div class="popup-footer">
|
||||||
<button id="cancel-register" type="button" class="ui gray right labeled icon floating button">
|
<button id="cancel-register" type="button" class="ui gray right labeled icon floating button">
|
||||||
<i class="times icon"></i>
|
<i class="times icon"></i>
|
||||||
<span class="edition">Close</span>
|
<span class="edition">Cancel</span>
|
||||||
<span class="creation">Close</span>
|
<span class="creation">Close</span>
|
||||||
</button>
|
</button>
|
||||||
<button id="unregister" type="button" class="ui red right labeled icon floating button">
|
<button id="unregister" type="button" class="ui red right labeled icon floating button">
|
||||||
|
@@ -100,6 +100,9 @@
|
|||||||
Publish standings
|
Publish standings
|
||||||
</div>
|
</div>
|
||||||
<div class="popup-content">
|
<div class="popup-content">
|
||||||
|
#if($round < $tour.rounds)
|
||||||
|
<div class="warning">Warning: publishing partial results at round <span>$round</span> out of <span>$tour.rounds</span>!</div>
|
||||||
|
#end
|
||||||
<form class="ui edit form">
|
<form class="ui edit form">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>Encoding</label>
|
<label>Encoding</label>
|
||||||
|
Reference in New Issue
Block a user