Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 68 additions & 10 deletions assets/_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,33 +218,68 @@ header.session {

// ── Completed exercise log ─────────────────────────────────────────────────
article.log {
padding: 15px;
padding: 12px;
margin-bottom: var(--spacing);
position: relative;
overflow: hidden;
transition: transform 0.15s ease-out;
touch-action: pan-y pinch-zoom;
user-select: none;

>header {
margin-bottom: 8px;
margin-bottom: 0;
min-width: 0;
gap: calc(var(--spacing) / 2);
align-items: center;

h4 {
margin: 0;
padding: 0;
color: var(--primary);
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

>div {
>ul.log-stats {
display: flex;
gap: var(--spacing);
align-items: center;
flex-wrap: nowrap;
gap: calc(var(--spacing) / 2);
list-style: none;
margin: 0;
padding: 0;
min-width: 0;

>li {
padding: 3px 8px;
border-radius: var(--radius);
background: var(--separation);
color: var(--secondary);
white-space: nowrap;
font-size: 0.85em;
}
}

button {
font-size: 1em;
padding: 2px 6px;
opacity: 0.7;
>.log-pointer-actions {
display: flex;
align-items: center;
gap: calc(var(--spacing) / 2);
flex-shrink: 0;
}
}

>.log-delete-progress {
position: absolute;
left: 0;
bottom: 0;
height: 3px;
background: var(--less);
transition: width 0.1s linear;
display: none;
}

>form {
display: flex;
flex-direction: column;
Expand All @@ -258,6 +293,29 @@ article.log {
}
}

p.log-gestures-hint {
display: none;
margin-top: 0;
margin-bottom: var(--spacing);
font-size: 0.9em;
}

@media (hover: none) and (pointer: coarse) {
article.log {
>header >.log-pointer-actions {
display: none;
}

>.log-delete-progress {
display: block;
}
}

p.log-gestures-hint {
display: block;
}
}

// ── Search results dropdown ────────────────────────────────────────────────
ul.results {
list-style: none;
Expand Down Expand Up @@ -449,4 +507,4 @@ ul.results {
transition: stroke-dashoffset 0.1s linear;
}
}
}
}
1 change: 1 addition & 0 deletions assets/en.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ rest-duration-label = Rest duration

## Active session – completed exercises
completed-exercises-title = Completed Exercises
completed-exercises-gestures-hint = Tap a log to replay · swipe right to edit · swipe left and hold 3s to delete

## Exercise input form
exercise-complete-title = Complete Exercise
Expand Down
1 change: 1 addition & 0 deletions assets/es.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ rest-duration-label = Duración del descanso

## Sesión activa – ejercicios completados
completed-exercises-title = Ejercicios completados
completed-exercises-gestures-hint = Toca un registro para repetir · desliza a la derecha para editar · desliza a la izquierda y mantén 3s para eliminar

## Formulario de ejercicio
exercise-complete-title = Completar ejercicio
Expand Down
1 change: 1 addition & 0 deletions assets/fr.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ rest-duration-label = Durée du repos

## Séance active – exercices complétés
completed-exercises-title = Exercices complétés
completed-exercises-gestures-hint = Touchez une entrée pour rejouer · glissez à droite pour modifier · glissez à gauche et maintenez 3s pour supprimer

## Formulaire d'exercice
exercise-complete-title = Valider l'exercice
Expand Down
7 changes: 5 additions & 2 deletions src/components/active_session/completed_exercises.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use dioxus::prelude::*;
use dioxus_i18n::prelude::i18n;
use dioxus_i18n::t;

/// Antichronological list of completed exercise logs with replay and edit actions.
/// Fires `on_replay` with the exercise ID when the user taps 🔁.
/// Antichronological list of completed exercise logs with gesture-based replay/edit/delete actions.
/// Fires `on_replay` with the exercise ID when the user taps a completed log tile.
///
/// When no exercise is active and the last completed exercise was also done
/// earlier in the session, a quick-action button is shown at the top suggesting
Expand Down Expand Up @@ -49,6 +49,9 @@ pub fn CompletedExercisesSection(


h3 { {t!("completed-exercises-title")} }
if no_exercise_active {
p { class: "log-gestures-hint", {t!("completed-exercises-gestures-hint")} }
}
if no_exercise_active {
if let Some((next_id, next_name)) = suggestion_label() {
button {
Expand Down
Loading