Various cosmetic tweaks
This commit is contained in:
@@ -138,7 +138,17 @@ class FileStore(pathStr: String): Store {
|
||||
entries.mapNotNull { entry ->
|
||||
entry.toFile()
|
||||
}.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)
|
||||
}
|
||||
|
@@ -47,9 +47,11 @@ object RatingsManager: Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
const val PERIOD = 3600000L
|
||||
|
||||
override fun run() {
|
||||
logger.info("launching ratings manager")
|
||||
timer.scheduleAtFixedRate(Task, 0L, 3600000L)
|
||||
timer.scheduleAtFixedRate(Task, 0L, PERIOD)
|
||||
}
|
||||
object Task: TimerTask() {
|
||||
override fun run() {
|
||||
|
@@ -43,6 +43,12 @@
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
.warning {
|
||||
color: darkred;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* header, center, footer */
|
||||
|
||||
#header {
|
||||
@@ -302,17 +308,21 @@
|
||||
}
|
||||
|
||||
#backdrop {
|
||||
display: none;
|
||||
&.active {
|
||||
display: block;
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
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;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -341,6 +341,7 @@
|
||||
}
|
||||
}
|
||||
.player {
|
||||
min-width: 12em;
|
||||
&.winner {
|
||||
color: darkred;
|
||||
font-weight: bold;
|
||||
|
@@ -189,3 +189,5 @@ Log in using Se connecter avec
|
||||
(reserved to FFG actors) (réservé aux acteurs FFG)
|
||||
Log in using an email Se connecter avec un email
|
||||
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].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 => {
|
||||
e.preventDefault();
|
||||
if ($('#register').hasClass('disabled')) {
|
||||
// user pressed enter
|
||||
return false;
|
||||
}
|
||||
let form = $('#player-form')[0];
|
||||
let player = {
|
||||
name: form.val('name'),
|
||||
|
@@ -221,7 +221,7 @@
|
||||
<div class="popup-footer">
|
||||
<button id="cancel-register" type="button" class="ui gray right labeled icon floating button">
|
||||
<i class="times icon"></i>
|
||||
<span class="edition">Close</span>
|
||||
<span class="edition">Cancel</span>
|
||||
<span class="creation">Close</span>
|
||||
</button>
|
||||
<button id="unregister" type="button" class="ui red right labeled icon floating button">
|
||||
|
@@ -100,6 +100,9 @@
|
||||
Publish standings
|
||||
</div>
|
||||
<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">
|
||||
<div class="field">
|
||||
<label>Encoding</label>
|
||||
|
Reference in New Issue
Block a user