Correction de l'acces a la page chrono
This commit is contained in:
@@ -19,6 +19,8 @@
|
|||||||
|| string.Equals(currentPath, "chrono.html", StringComparison.OrdinalIgnoreCase)
|
|| string.Equals(currentPath, "chrono.html", StringComparison.OrdinalIgnoreCase)
|
||||||
|| string.Equals(currentPath, "cube", StringComparison.OrdinalIgnoreCase)
|
|| string.Equals(currentPath, "cube", StringComparison.OrdinalIgnoreCase)
|
||||||
|| string.Equals(currentPath, "cube.html", StringComparison.OrdinalIgnoreCase)
|
|| string.Equals(currentPath, "cube.html", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| string.Equals(currentPath, "application", StringComparison.OrdinalIgnoreCase)
|
||||||
|
|| string.Equals(currentPath, "application.html", StringComparison.OrdinalIgnoreCase)
|
||||||
|| currentPath.StartsWith("authentication/", StringComparison.OrdinalIgnoreCase);
|
|| currentPath.StartsWith("authentication/", StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form class="setup-form" @onsubmit="HandleSubmit">
|
<form class="setup-form" @onsubmit="HandleSubmit" @onsubmit:preventDefault="true" novalidate>
|
||||||
<label class="option-card competition-option span-2 @(Form.CompetitionMode ? "is-selected" : string.Empty)">
|
<label class="option-card competition-option span-2 @(Form.CompetitionMode ? "is-selected" : string.Empty)">
|
||||||
<input @bind="Form.CompetitionMode" id="competitionMode" name="competitionMode" type="checkbox" />
|
<input @bind="Form.CompetitionMode" id="competitionMode" name="competitionMode" type="checkbox" />
|
||||||
<strong>Mode competition</strong>
|
<strong>Mode competition</strong>
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setup-actions span-2">
|
<div class="setup-actions span-2">
|
||||||
<button class="button primary" type="submit">Ouvrir la page chrono</button>
|
<button class="button primary" type="button" @onclick="HandleSubmit">Ouvrir la page chrono</button>
|
||||||
<button class="button secondary" id="loadDemoButton" type="button" @onclick="LoadDemo">Charger une demo</button>
|
<button class="button secondary" id="loadDemoButton" type="button" @onclick="LoadDemo">Charger une demo</button>
|
||||||
<a class="button ghost" href="reglement.html">Consulter le reglement</a>
|
<a class="button ghost" href="reglement.html">Consulter le reglement</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -300,9 +300,20 @@
|
|||||||
|
|
||||||
private async Task HandleSubmit()
|
private async Task HandleSubmit()
|
||||||
{
|
{
|
||||||
|
await Store.EnsureLoadedAsync();
|
||||||
var match = MatchEngine.CreateMatch(Form.ToMatchConfig());
|
var match = MatchEngine.CreateMatch(Form.ToMatchConfig());
|
||||||
Store.SetCurrent(match);
|
Store.SetCurrent(match);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
await Store.SaveAsync();
|
await Store.SaveAsync();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// La navigation vers la phase chrono doit rester possible meme si la persistence
|
||||||
|
// du navigateur echoue ponctuellement.
|
||||||
|
}
|
||||||
|
|
||||||
Navigation.NavigateTo("/chrono.html");
|
Navigation.NavigateTo("/chrono.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Le projet continue a exposer les routes historiques `index.html`, `application.h
|
|||||||
L'application embarque maintenant une authentification OpenID Connect basee sur Keycloak.
|
L'application embarque maintenant une authentification OpenID Connect basee sur Keycloak.
|
||||||
|
|
||||||
- toutes les pages du site restent accessibles sans connexion
|
- toutes les pages du site restent accessibles sans connexion
|
||||||
- un menu general en haut des pages site et application regroupe la navigation et les actions `Se connecter` / `Creer un compte` dans une modal integree
|
- un menu general en haut des pages site regroupe la navigation et les actions `Se connecter` / `Creer un compte` dans une modal integree
|
||||||
- l'action `Creer un compte` ouvre le parcours d'inscription natif de Keycloak
|
- l'action `Creer un compte` ouvre le parcours d'inscription natif de Keycloak
|
||||||
- les roles Keycloak du realm sont exposes dans l'application
|
- les roles Keycloak du realm sont exposes dans l'application
|
||||||
- l'etat du match est isole par utilisateur dans le navigateur grace a une cle de stockage derivee du compte connecte
|
- l'etat du match est isole par utilisateur dans le navigateur grace a une cle de stockage derivee du compte connecte
|
||||||
|
|||||||
Reference in New Issue
Block a user