правка рассчета виртуальной мощности
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>
|
<h1 class="page-title">Tренировка</h1>
|
||||||
<WorkoutItemComponent
|
<WorkoutItemComponent
|
||||||
v-if="workoutItem"
|
v-if="workoutItem"
|
||||||
|
:key="dataKey"
|
||||||
:workoutItem="workoutItem"
|
:workoutItem="workoutItem"
|
||||||
:data="data"
|
:data="data"
|
||||||
:mapCenter="mapCenter"
|
:mapCenter="mapCenter"
|
||||||
|
|
@ -33,6 +34,7 @@ const distances = ref<Array<number>>([]);
|
||||||
const workoutItem = ref<WorkoutItem>();
|
const workoutItem = ref<WorkoutItem>();
|
||||||
const data = ref<ChartDataByMetric>({});
|
const data = ref<ChartDataByMetric>({});
|
||||||
const dzenLink = ref("");
|
const dzenLink = ref("");
|
||||||
|
const dataKey = ref(0);
|
||||||
|
|
||||||
const initWorkout = (id: string) => {
|
const initWorkout = (id: string) => {
|
||||||
GetWorkout(`/api/v0/workouts/${id}`)
|
GetWorkout(`/api/v0/workouts/${id}`)
|
||||||
|
|
@ -45,6 +47,7 @@ const initWorkout = (id: string) => {
|
||||||
if (d.dzenLink != undefined) {
|
if (d.dzenLink != undefined) {
|
||||||
dzenLink.value = d.dzenLink;
|
dzenLink.value = d.dzenLink;
|
||||||
}
|
}
|
||||||
|
dataKey.value++;
|
||||||
})
|
})
|
||||||
.catch((_error: AxiosError) => {
|
.catch((_error: AxiosError) => {
|
||||||
init({
|
init({
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@
|
||||||
<div
|
<div
|
||||||
class="workout-chart"
|
class="workout-chart"
|
||||||
v-for="config in chartConfigs"
|
v-for="config in chartConfigs"
|
||||||
:key="config.key + xAxisMode + vpChartKey"
|
:key="config.key + xAxisMode"
|
||||||
>
|
>
|
||||||
<h4 class="workout-chart-title">
|
<h4 class="workout-chart-title">
|
||||||
{{ config.title }}
|
{{ config.title }}
|
||||||
|
|
@ -1127,9 +1127,6 @@ const workoutNP = computed<number | null>(() =>
|
||||||
);
|
);
|
||||||
// Rebuilt per x-axis mode: labels switch between times and distances and
|
// 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.
|
// 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 chartConfigs = computed<Array<ChartConfig>>(() => {
|
||||||
const labels = xAxisMode.value === "time" ? times : distances;
|
const labels = xAxisMode.value === "time" ? times : distances;
|
||||||
const configs: Array<ChartConfig> = [];
|
const configs: Array<ChartConfig> = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue