Fix country import; fix layout; bump to 0.3
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.jeudego.pairgoth</groupId>
|
||||
<artifactId>engine-parent</artifactId>
|
||||
<version>0.2</version>
|
||||
<version>0.3</version>
|
||||
</parent>
|
||||
<artifactId>view-webapp</artifactId>
|
||||
|
||||
|
@@ -48,7 +48,7 @@ abstract class OAuthHelper {
|
||||
protected abstract fun getUserInfosURL(accessToken: String): Pair<String, List<NameValuePair>>
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun getUserInfos(accessToken: String): Json {
|
||||
fun getUserInfos(accessToken: String): Json.Object {
|
||||
val (url, params) = getUserInfosURL(accessToken)
|
||||
return JsonApiClient.get(url, *params.toTypedArray()).asObject()
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ object EGFRatingsHandler: RatingsHandler(RatingsManager.Ratings.EGF) {
|
||||
player["origin"] = "EGF"
|
||||
// override rank with rating equivalent
|
||||
player["rating"]?.toString()?.toIntOrNull()?.let { rating ->
|
||||
player["rank"] = ((rating - 2050)/100).let { if (rating < 0) "${-it+1}k" else "${it+1}d" }
|
||||
player["rank"] = ((rating - 2050)/100).let { if (it < 0) "${-it+1}k" else "${it+1}d" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ object CredentialsChecker {
|
||||
private const val CREDENTIALS_DB = "pairgoth.db"
|
||||
private val hasher = MessageDigest.getInstance("SHA-256")
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
fun check(email: String, password: String): String? {
|
||||
fun check(email: String, password: String): Json.Object? {
|
||||
initDatabase()
|
||||
val sha256 = hasher.digest(password.toByteArray(StandardCharsets.UTF_8)).toHexString()
|
||||
DriverManager.getConnection("jdbc:sqlite:$CREDENTIALS_DB").use { conn ->
|
||||
@@ -19,7 +19,7 @@ object CredentialsChecker {
|
||||
setString(1, email)
|
||||
setString(2, password)
|
||||
}.executeQuery()
|
||||
return if (rs.next()) email else null
|
||||
return if (rs.next()) Json.Object("email" to email) else null
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -32,12 +32,12 @@ class LoginServlet: HttpServlet() {
|
||||
}
|
||||
}
|
||||
|
||||
fun checkSesame(payload: Json.Object): Boolean? {
|
||||
fun checkSesame(payload: Json.Object): Json.Object? {
|
||||
val expected = WebappManager.getProperty("auth.sesame") ?: throw Error("sesame wrongly configured")
|
||||
return if (payload.getString("sesame")?.equals(expected) == true) true else null
|
||||
return if (payload.getString("sesame")?.equals(expected) == true) Json.Object("logged" to true) else null
|
||||
}
|
||||
|
||||
fun checkLoginPass(payload: Json.Object): String? {
|
||||
fun checkLoginPass(payload: Json.Object): Json.Object? {
|
||||
return CredentialsChecker.check(
|
||||
payload.getString("email") ?: throw Error("Missing login field"),
|
||||
payload.getString("password") ?: throw Error("missing password field"))
|
||||
|
@@ -77,6 +77,10 @@
|
||||
/* align-items: center; */
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
> .section {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
, allowing you to tweak it in any possible way. Be sure to contribute back your enhancements! , vous permettant de complètement le modifier. N’oubliez pas de partager vos améliorations !
|
||||
, the well known pairing system software developed by , le logiciel d’appariement très connu développé par
|
||||
, your Go Pairing Engine! , votre logiciel d’appariement de Go !
|
||||
.ui.form input[type=checkbox][name=online] { vertical-align: initial; }
|
||||
, last modified , dernière modification :
|
||||
1st round seeding méthode 1è ronde
|
||||
: If you prefer convenience, you can simply use the : Si vous préférez la commodité, vous pouvez simplement utiliser l’instance
|
||||
: This mode allows you to run : Ce mode vous permet de lancer
|
||||
@@ -37,6 +37,7 @@ Export Exporter
|
||||
Export tournament Exporter le tournoi
|
||||
Family name Nom de famille
|
||||
Filter Filtrer
|
||||
Filter... Filtrer…
|
||||
First name Prénom
|
||||
Fischer timing Cadence Fischer
|
||||
French rules Règles françaises
|
||||
@@ -93,7 +94,7 @@ Results for round Résultats pour la ronde
|
||||
Round-robin Toutes rondes
|
||||
Rounds Rondes
|
||||
Rules Règles
|
||||
Search... Chercher…
|
||||
Search... Chercher…
|
||||
Short name Nom de code
|
||||
Since the project is still in beta, the sources are only available to FFG actors. If that's your case, you can access the sources here: Comme le projet est encore en beta, les sources sont seulement accessibles aux acteurs FFG. Si c’est votre cas, vous pouvez accéder aux sources ici :
|
||||
Split and fold Couper-plier
|
||||
|
@@ -23,9 +23,9 @@
|
||||
</script>
|
||||
#else
|
||||
#foreach($tour in $files.entrySet())
|
||||
<a href="tour?id=${tour.key}" class="ui open basic secondary white icon floating button">
|
||||
<a href="tour?id=${tour.key}" class="ui open basic secondary white icon floating button" title="id $tour.key, last modified $tour.value.lastModified">
|
||||
<i class="fa fa-folder-open-o"></i>
|
||||
$tour.value
|
||||
$tour.value.name
|
||||
</a>
|
||||
#end
|
||||
#end
|
||||
|
@@ -40,6 +40,7 @@ function search(needle) {
|
||||
store('searchFormState', searchFormState);
|
||||
api.postJson('search', search)
|
||||
.then(result => {
|
||||
console.log(result)
|
||||
if (Array.isArray(result)) {
|
||||
searchResult = result
|
||||
let html = resultTemplate.render(result);
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<div id="reg-view">
|
||||
<div id="list-header">
|
||||
<div id="filter-box" class="ui icon input">
|
||||
<input type="text" id="filter" placeholder="Search..."/>
|
||||
<input type="text" id="filter" placeholder="Filter..."/>
|
||||
<i class="circular times link icon"></i>
|
||||
</div>
|
||||
<div>
|
||||
@@ -73,6 +73,7 @@
|
||||
<input type="hidden" name="id"/>
|
||||
<div class="popup-content">
|
||||
<div id="search-form" class="five stackable fields">
|
||||
#if($tour.country)
|
||||
<div class="two wide field">
|
||||
<div class="toggle">
|
||||
<input id="countryFilter" name="countryFilter" type="checkbox" value="$tour.country"/>
|
||||
@@ -82,6 +83,7 @@
|
||||
<label>$tour.country.toUpperCase()</label>
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
<div class="ten wide field">
|
||||
<div class="ui icon input">
|
||||
<input id="needle" name="needle" type="text" placeholder="Search...">
|
||||
|
Reference in New Issue
Block a user