refactor(paramètres): section Session (mdp + déconnexion), tâches rattachées à l'onglet AjouterUnverified
f3c2f2c parent: 740c5c0 modified
src/routes/settings.rs +1 -1 | @@ -205,7 +205,7 @@ pub async fn tasks_page( | ||
| 205 | 205 | .collect(); |
| 206 | 206 | Ok(HtmlTemplate(TasksPage { |
| 207 | 207 | csrf: ctx.user.csrf_token(&state), |
| 208 | - shell: shell(&state, &ctx, "Tâches", "settings", toast).await?, | |
| 208 | + shell: shell(&state, &ctx, "Tâches", "add", toast).await?, | |
| 209 | 209 | tasks, |
| 210 | 210 | })) |
| 211 | 211 | } |
| @@ -205,7 +205,7 @@ pub async fn tasks_page( | |||
| 205 | .collect(); | 205 | .collect(); |
| 206 | Ok(HtmlTemplate(TasksPage { | 206 | Ok(HtmlTemplate(TasksPage { |
| 207 | csrf: ctx.user.csrf_token(&state), | 207 | csrf: ctx.user.csrf_token(&state), |
| 208 | - shell: shell(&state, &ctx, "Tâches", "settings", toast).await?, | 208 | + shell: shell(&state, &ctx, "Tâches", "add", toast).await?, |
| 209 | tasks, | 209 | tasks, |
| 210 | })) | 210 | })) |
| 211 | } | 211 | } |
modified
templates/settings.html +3 -6 | @@ -111,7 +111,7 @@ | ||
| 111 | 111 | <p style="font-size:11px;opacity:.45;margin-top:var(--space-2);text-align:center">Tes temps déjà saisis restent dans les stats de l'équipe.</p> |
| 112 | 112 | {% endif %} |
| 113 | 113 | |
| 114 | -<h4 style="margin:var(--space-8) 0 var(--space-3)">Changer de mot de passe</h4> | |
| 114 | +<h4 style="margin:var(--space-8) 0 var(--space-3)">Session</h4> | |
| 115 | 115 | <form method="post" action="/parametres/mot-de-passe"> |
| 116 | 116 | <input type="hidden" name="csrf" value="{{ csrf }}"> |
| 117 | 117 | <div class="field" style="margin-bottom:var(--space-3)"> |
| @@ -127,16 +127,13 @@ | ||
| 127 | 127 | <input class="input" id="confirmation" name="confirmation" type="password" autocomplete="new-password" required minlength="8" style="min-height:44px"> |
| 128 | 128 | </div> |
| 129 | 129 | {% if let Some(e) = error %}<p class="form-error">{{ e }}</p>{% endif %} |
| 130 | - <button type="submit" class="btn btn-primary btn-block" style="min-height:46px">Enregistrer</button> | |
| 130 | + <button type="submit" class="btn btn-primary btn-block" style="min-height:46px">Changer le mot de passe</button> | |
| 131 | 131 | </form> |
| 132 | 132 | |
| 133 | -<h4 style="margin:var(--space-8) 0 var(--space-3)">Tâches</h4> | |
| 134 | -<a class="btn btn-secondary btn-block" href="/parametres/taches" style="min-height:46px">Gérer les tâches</a> | |
| 135 | - | |
| 136 | 133 | <form method="post" action="/logout"> |
| 137 | 134 | <input type="hidden" name="csrf" value="{{ csrf }}"> |
| 138 | 135 | <button type="submit" class="btn btn-block" |
| 139 | - style="min-height:46px;margin-top:var(--space-8);color:var(--color-accent-700);border:1px solid var(--color-accent-300)">Se déconnecter</button> | |
| 136 | + style="min-height:46px;margin-top:var(--space-4);color:var(--color-accent-700);border:1px solid var(--color-accent-300)">Se déconnecter</button> | |
| 140 | 137 | </form> |
| 141 | 138 | <p class="text-muted" style="font-size:11px;margin-top:var(--space-3);text-align:center">Le biscuit de session sera révoqué.</p> |
| 142 | 139 | {% endblock %} |
| @@ -111,7 +111,7 @@ | |||
| 111 | <p style="font-size:11px;opacity:.45;margin-top:var(--space-2);text-align:center">Tes temps déjà saisis restent dans les stats de l'équipe.</p> | 111 | <p style="font-size:11px;opacity:.45;margin-top:var(--space-2);text-align:center">Tes temps déjà saisis restent dans les stats de l'équipe.</p> |
| 112 | {% endif %} | 112 | {% endif %} |
| 113 | 113 | ||
| 114 | -<h4 style="margin:var(--space-8) 0 var(--space-3)">Changer de mot de passe</h4> | 114 | +<h4 style="margin:var(--space-8) 0 var(--space-3)">Session</h4> |
| 115 | <form method="post" action="/parametres/mot-de-passe"> | 115 | <form method="post" action="/parametres/mot-de-passe"> |
| 116 | <input type="hidden" name="csrf" value="{{ csrf }}"> | 116 | <input type="hidden" name="csrf" value="{{ csrf }}"> |
| 117 | <div class="field" style="margin-bottom:var(--space-3)"> | 117 | <div class="field" style="margin-bottom:var(--space-3)"> |
| @@ -127,16 +127,13 @@ | |||
| 127 | <input class="input" id="confirmation" name="confirmation" type="password" autocomplete="new-password" required minlength="8" style="min-height:44px"> | 127 | <input class="input" id="confirmation" name="confirmation" type="password" autocomplete="new-password" required minlength="8" style="min-height:44px"> |
| 128 | </div> | 128 | </div> |
| 129 | {% if let Some(e) = error %}<p class="form-error">{{ e }}</p>{% endif %} | 129 | {% if let Some(e) = error %}<p class="form-error">{{ e }}</p>{% endif %} |
| 130 | - <button type="submit" class="btn btn-primary btn-block" style="min-height:46px">Enregistrer</button> | 130 | + <button type="submit" class="btn btn-primary btn-block" style="min-height:46px">Changer le mot de passe</button> |
| 131 | </form> | 131 | </form> |
| 132 | 132 | ||
| 133 | -<h4 style="margin:var(--space-8) 0 var(--space-3)">Tâches</h4> | ||
| 134 | -<a class="btn btn-secondary btn-block" href="/parametres/taches" style="min-height:46px">Gérer les tâches</a> | ||
| 135 | - | ||
| 136 | <form method="post" action="/logout"> | 133 | <form method="post" action="/logout"> |
| 137 | <input type="hidden" name="csrf" value="{{ csrf }}"> | 134 | <input type="hidden" name="csrf" value="{{ csrf }}"> |
| 138 | <button type="submit" class="btn btn-block" | 135 | <button type="submit" class="btn btn-block" |
| 139 | - style="min-height:46px;margin-top:var(--space-8);color:var(--color-accent-700);border:1px solid var(--color-accent-300)">Se déconnecter</button> | 136 | + style="min-height:46px;margin-top:var(--space-4);color:var(--color-accent-700);border:1px solid var(--color-accent-300)">Se déconnecter</button> |
| 140 | </form> | 137 | </form> |
| 141 | <p class="text-muted" style="font-size:11px;margin-top:var(--space-3);text-align:center">Le biscuit de session sera révoqué.</p> | 138 | <p class="text-muted" style="font-size:11px;margin-top:var(--space-3);text-align:center">Le biscuit de session sera révoqué.</p> |
| 142 | {% endblock %} | 139 | {% endblock %} |
modified
templates/tasks.html +1 -1 | @@ -28,5 +28,5 @@ | ||
| 28 | 28 | </div> |
| 29 | 29 | {% endfor %} |
| 30 | 30 | <p class="text-muted" style="font-size:12px;margin-top:var(--space-3)">Renommer : modifie le nom puis appuie sur Entrée.</p> |
| 31 | -<a class="btn btn-ghost" style="margin-top:var(--space-4)" href="/parametres">← Retour aux réglages</a> | |
| 31 | +<a class="btn btn-ghost" style="margin-top:var(--space-4)" href="/temps/nouveau">← Retour à l'ajout</a> | |
| 32 | 32 | {% endblock %} |
| @@ -28,5 +28,5 @@ | |||
| 28 | </div> | 28 | </div> |
| 29 | {% endfor %} | 29 | {% endfor %} |
| 30 | <p class="text-muted" style="font-size:12px;margin-top:var(--space-3)">Renommer : modifie le nom puis appuie sur Entrée.</p> | 30 | <p class="text-muted" style="font-size:12px;margin-top:var(--space-3)">Renommer : modifie le nom puis appuie sur Entrée.</p> |
| 31 | -<a class="btn btn-ghost" style="margin-top:var(--space-4)" href="/parametres">← Retour aux réglages</a> | 31 | +<a class="btn btn-ghost" style="margin-top:var(--space-4)" href="/temps/nouveau">← Retour à l'ajout</a> |
| 32 | {% endblock %} | 32 | {% endblock %} |