правка рассчета виртуальной мощности
Gitea Actions Demo / build_and_push (push) Successful in 1m15s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m15s
Details
This commit is contained in:
parent
9521eecd67
commit
c598b1a57f
|
|
@ -2,6 +2,7 @@
|
|||
<h1 class="page-title">Tренировка</h1>
|
||||
<WorkoutItemComponent
|
||||
v-if="workoutItem"
|
||||
:key="dataKey"
|
||||
:workoutItem="workoutItem"
|
||||
:data="data"
|
||||
:mapCenter="mapCenter"
|
||||
|
|
@ -33,6 +34,7 @@ const distances = ref<Array<number>>([]);
|
|||
const workoutItem = ref<WorkoutItem>();
|
||||
const data = ref<ChartDataByMetric>({});
|
||||
const dzenLink = ref("");
|
||||
const dataKey = ref(0);
|
||||
|
||||
const initWorkout = (id: string) => {
|
||||
GetWorkout(`/api/v0/workouts/${id}`)
|
||||
|
|
@ -45,6 +47,7 @@ const initWorkout = (id: string) => {
|
|||
if (d.dzenLink != undefined) {
|
||||
dzenLink.value = d.dzenLink;
|
||||
}
|
||||
dataKey.value++;
|
||||
})
|
||||
.catch((_error: AxiosError) => {
|
||||
init({
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@
|
|||
<div
|
||||
class="workout-chart"
|
||||
v-for="config in chartConfigs"
|
||||
:key="config.key + xAxisMode + vpChartKey"
|
||||
:key="config.key + xAxisMode"
|
||||
>
|
||||
<h4 class="workout-chart-title">
|
||||
{{ config.title }}
|
||||
|
|
@ -1127,9 +1127,6 @@ const workoutNP = computed<number | null>(() =>
|
|||
);
|
||||
// Rebuilt per x-axis mode: labels switch between times and distances and
|
||||
// options get a fresh x-scale, so every canvas must remount on mode change.
|
||||
const vpChartKey = computed(() =>
|
||||
workoutItem?.virtual_power != null ? "-vp" : ""
|
||||
);
|
||||
const chartConfigs = computed<Array<ChartConfig>>(() => {
|
||||
const labels = xAxisMode.value === "time" ? times : distances;
|
||||
const configs: Array<ChartConfig> = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue