Skip to content

Commit 23ffcdd

Browse files
committed
style: format
1 parent 91c9aaa commit 23ffcdd

4 files changed

Lines changed: 23 additions & 22 deletions

File tree

flake.nix

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,19 @@
197197
'';
198198
# Retrieve server binary from the architecture-specific target dir that dx uses.
199199
installPhase =
200-
if platform == "server" then ''
201-
mkdir -p $out/bin
202-
serverBin=$(find target -maxdepth 5 -name "log-out" -type f -path "*/server-release/*" | head -1)
203-
cp "$serverBin" $out/bin/logout-server
204-
'' else ''
205-
mkdir -p $out
206-
cp -r target/dx/log-out/release/web/public/${
207-
if basePath == "/" then "* $out/" else " $out/${basePath}"
208-
}
209-
'';
200+
if platform == "server" then
201+
''
202+
mkdir -p $out/bin
203+
serverBin=$(find target -maxdepth 5 -name "log-out" -type f -path "*/server-release/*" | head -1)
204+
cp "$serverBin" $out/bin/logout-server
205+
''
206+
else
207+
''
208+
mkdir -p $out
209+
cp -r target/dx/log-out/release/web/public/${
210+
if basePath == "/" then "* $out/" else " $out/${basePath}"
211+
}
212+
'';
210213
doCheck = false;
211214
};
212215
chromiumWrapper = env.pkgs.writeShellScriptBin "google-chrome" ''

src/components/active_session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ fn CompletedExercisesSection(
248248
rsx! {
249249
section { // class: "exercises",
250250

251+
251252
h3 { "Completed Exercises" }
252253
if no_exercise_active {
253254
if let Some((next_id, next_name)) = suggestion_label() {

src/components/completed_exercise_log.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
use super::session_exercise_form::ExerciseInputForm;
2-
use crate::models::{format_time, parse_distance_km, parse_duration_seconds, parse_weight_kg, Category, ExerciseLog, Force, WorkoutSession};
2+
use crate::models::{
3+
format_time, parse_distance_km, parse_duration_seconds, parse_weight_kg, Category, ExerciseLog,
4+
Force, WorkoutSession,
5+
};
36
use crate::services::storage;
47
use dioxus::prelude::*;
58
/// A single completed exercise log entry with inline edit support.
@@ -34,11 +37,7 @@ pub fn CompletedExerciseLog(
3437
.map(|d| format!("{:.2}", f64::from(d.0) / 1000.0))
3538
.unwrap_or_default(),
3639
);
37-
edit_time_input.set(
38-
log.duration_seconds()
39-
.map(format_time)
40-
.unwrap_or_default(),
41-
);
40+
edit_time_input.set(log.duration_seconds().map(format_time).unwrap_or_default());
4241
is_editing.set(true);
4342
}
4443
};

src/components/session_exercise_form.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::session_timers::ExerciseElapsedTimer;
22
use crate::models::{
3-
format_time, parse_distance_km, parse_duration_seconds, parse_weight_kg, Category,
4-
ExerciseLog, Force,
3+
format_time, parse_distance_km, parse_duration_seconds, parse_weight_kg, Category, ExerciseLog,
4+
Force,
55
};
66
use crate::services::{exercise_db, storage};
77
use dioxus::prelude::*;
@@ -76,8 +76,7 @@ pub(super) fn ExerciseInputForm(
7676
tabindex: -1,
7777
onclick: move |_| {
7878
if let Some(mut ti) = time_input {
79-
let secs =
80-
parse_duration_seconds(&ti.read()).unwrap_or(0);
79+
let secs = parse_duration_seconds(&ti.read()).unwrap_or(0);
8180
ti.set(format_time(secs.saturating_sub(5)));
8281
}
8382
},
@@ -107,8 +106,7 @@ pub(super) fn ExerciseInputForm(
107106
tabindex: -1,
108107
onclick: move |_| {
109108
if let Some(mut ti) = time_input {
110-
let secs =
111-
parse_duration_seconds(&ti.read()).unwrap_or(0);
109+
let secs = parse_duration_seconds(&ti.read()).unwrap_or(0);
112110
ti.set(format_time(secs + 5));
113111
}
114112
},

0 commit comments

Comments
 (0)