fitness: fix GPS preview aspect ratio, theme-reactive colors, and UI polish
All checks were successful
CI / update (push) Successful in 2m17s
All checks were successful
CI / update (push) Successful in 2m17s
- SessionCard SVG: cosine-corrected coordinates with proper aspect ratio (xMidYMid meet) - SessionCard: use --color-primary for track/distance/pace, add Gauge icon for pace - History detail: theme-reactive pace chart colors via MutationObserver + matchMedia - History detail: add Gauge icon, accent color for distance/pace stats, remove "avg" label - Move GPS remove button from info view to edit screen - Add Leaflet map preview to edit screen - Remove data points count from GPS indicators
This commit is contained in:
@@ -25,9 +25,17 @@ export interface ICompletedExercise {
|
||||
restTime?: number;
|
||||
notes?: string;
|
||||
gpsTrack?: IGpsPoint[];
|
||||
gpsPreview?: number[][]; // downsampled [[lat,lng], ...] for card preview
|
||||
totalDistance?: number; // km
|
||||
}
|
||||
|
||||
export interface IPr {
|
||||
exerciseId: string;
|
||||
type: string; // 'est1rm' | 'maxWeight' | 'repMax'
|
||||
value: number;
|
||||
reps?: number;
|
||||
}
|
||||
|
||||
export interface IWorkoutSession {
|
||||
_id?: string;
|
||||
templateId?: string; // Reference to WorkoutTemplate if based on template
|
||||
@@ -37,6 +45,9 @@ export interface IWorkoutSession {
|
||||
startTime: Date;
|
||||
endTime?: Date;
|
||||
duration?: number; // Duration in minutes
|
||||
totalVolume?: number; // Total weight × reps across all exercises
|
||||
totalDistance?: number; // Total distance across all cardio exercises
|
||||
prs?: IPr[];
|
||||
notes?: string;
|
||||
createdBy: string; // username/nickname of the person who performed the workout
|
||||
createdAt?: Date;
|
||||
@@ -118,6 +129,10 @@ const CompletedExerciseSchema = new mongoose.Schema({
|
||||
type: [GpsPointSchema],
|
||||
default: undefined
|
||||
},
|
||||
gpsPreview: {
|
||||
type: [[Number]],
|
||||
default: undefined
|
||||
},
|
||||
totalDistance: {
|
||||
type: Number,
|
||||
min: 0
|
||||
@@ -162,6 +177,21 @@ const WorkoutSessionSchema = new mongoose.Schema(
|
||||
type: Number, // in minutes
|
||||
min: 0
|
||||
},
|
||||
totalVolume: {
|
||||
type: Number,
|
||||
min: 0
|
||||
},
|
||||
totalDistance: {
|
||||
type: Number,
|
||||
min: 0
|
||||
},
|
||||
prs: [{
|
||||
exerciseId: { type: String, required: true },
|
||||
type: { type: String, required: true },
|
||||
value: { type: Number, required: true },
|
||||
reps: Number,
|
||||
_id: false
|
||||
}],
|
||||
notes: {
|
||||
type: String,
|
||||
trim: true,
|
||||
|
||||
Reference in New Issue
Block a user