Compare commits

...

2 Commits

Author SHA1 Message Date
5140eafc51 ui: Also color score on works page
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-03 12:38:13 +01:00
675c462a55 Don't force current promo when loggin via kerberos 2023-03-03 12:35:35 +01:00
2 changed files with 11 additions and 2 deletions

View File

@ -83,7 +83,7 @@ func checkAuthKrb5(c *gin.Context) {
return
}
if usr, err := completeAuth(c, lf.Login, lf.Login+"@epita.fr", "", "", currentPromo, "", nil); err != nil {
if usr, err := completeAuth(c, lf.Login, lf.Login+"@epita.fr", "", "", 0, "", nil); err != nil {
c.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{"errmsg": err.Error()})
return
} else {

View File

@ -120,7 +120,16 @@
{#await getScore(work)}
<div class="spinner-border spinner-border-sm" role="status"></div>
{:then score}
<span
class="badge"
class:bg-success={score.score >= 18}
class:bg-info={score.score < 18 && score.score >= 15}
class:bg-warning={score.score < 15 && score.score >= 9}
class:bg-danger={score.score < 9}
class:bg-dark={score.score == "N/A"}
>
{score.score}
</span>
{:catch error}
<i class="bi text-warning bi-exclamation-triangle-fill" title={error}></i>
{/await}