add virtual cycling as a sport type

This commit is contained in:
Joshua Taillon 2022-10-26 12:01:30 -06:00 committed by Sam
parent 3ec5257685
commit d249e7b146
7 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,34 @@
"""add virtual cycling as sport type
Revision ID: 5b936821326d
Revises: 84d840ce853b
Create Date: 2022-10-26 17:43:20.114104
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '5b936821326d'
down_revision = '84d840ce853b'
branch_labels = None
depends_on = None
def upgrade():
op.execute(
"""
INSERT INTO sports (label, is_active, stopped_speed_threshold)
VALUES ('Cycling (Virtual)', True, 1)
"""
)
def downgrade():
op.execute(
"""
DELETE FROM sports
WHERE label = 'Cycling (Virtual)';
"""
)

View File

@ -0,0 +1,39 @@
<template>
<svg
version="1.1"
id="Capa_1"
x="0px"
y="0px"
viewBox="0 0 491.737 491.737"
style="enable-background: new 0 0 491.737 491.737"
xml:space="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<desc
id="cyclingVirtualDescription">
silhouette of a person riding a bicycle with virtual indicator
</desc>
<path
d="m 321.097,112.359 c 20.973,12.338 47.985,5.315 60.293,-15.652 12.34,-20.973 5.35,-47.974 -15.623,-60.304 -21.009,-12.332 -47.99,-5.317 -60.314,15.65 -12.324,20.983 -5.35,47.974 15.644,60.306 z"
id="path3" /><path
d="m 393.081,264.102 c -2.414,0 -4.8,0.194 -7.169,0.362 l -14.431,-71.605 4.702,-1.757 c 10.666,-3.987 16.093,-15.868 12.098,-26.54 -3.994,-10.681 -15.946,-16.084 -26.531,-12.09 l -51.823,19.38 -2.321,-18.864 c 6.3,-13.193 5.541,-29.78 -4.767,-41.482 -21.224,-24.092 -47.12,-12.508 -55.191,-5.976 l -106.884,86.555 0.016,0.024 c -3.319,2.893 -6.089,6.485 -7.86,10.842 -2.191,5.396 -2.596,11.067 -1.564,16.384 -8.503,0.669 -15.255,7.571 -15.255,16.246 0,9.085 7.346,16.44 16.432,16.48 l -6.797,15.906 c -8.62,-2.465 -17.674,-3.866 -27.066,-3.866 C 44.27,264.102 0,308.354 0,362.754 c 0,54.403 44.27,98.663 98.668,98.663 54.403,0 98.652,-44.26 98.652,-98.663 0,-36.228 -19.683,-67.867 -48.858,-85.024 l 10.957,-25.652 h 17.767 l 60.281,24.462 -32.201,52.773 c -8.297,13.612 -3.994,31.382 9.615,39.685 4.691,2.86 9.878,4.229 15,4.229 9.729,0 19.234,-4.929 24.677,-13.838 l 29.339,-48.095 19.072,11.511 c -5.447,12.227 -8.54,25.726 -8.54,39.95 0,54.403 44.254,98.663 98.652,98.663 54.402,0 98.656,-44.26 98.656,-98.663 0,-54.401 -44.254,-98.653 -98.656,-98.653 z M 98.668,436.671 c -40.756,0 -73.923,-33.161 -73.923,-73.917 0,-40.756 33.167,-73.909 73.923,-73.909 5.944,0 11.649,0.896 17.188,2.224 L 95.38,338.962 c -11.758,1.619 -20.843,11.598 -20.843,23.792 0,13.323 10.808,24.132 24.13,24.132 8.767,0 16.367,-4.745 20.589,-11.76 h 52.065 c -5.926,34.862 -36.133,61.545 -72.653,61.545 z m 72.654,-86.288 h -52.065 c -0.355,-0.588 -0.708,-1.176 -1.112,-1.732 l 20.476,-47.901 c 17.058,11.026 29.172,28.845 32.701,49.633 z m 125.459,-60.208 7.666,-12.564 c 4.416,-7.233 5.431,-16.038 2.774,-24.084 -2.661,-8.046 -8.718,-14.515 -16.562,-17.704 l -52.725,-21.395 32.443,-26.281 1.804,14.691 c 0.756,6.267 4.366,11.841 9.761,15.12 3.271,1.981 6.979,2.988 10.698,2.988 2.435,0 4.88,-0.435 7.218,-1.306 l 48.15,-18.001 13.627,67.691 c -18.268,6.162 -34.117,17.51 -45.848,32.314 z m 78.615,47.458 -38.003,-22.94 c 7.877,-9.118 17.787,-16.319 29.205,-20.734 z m 17.685,99.038 c -40.757,0 -73.907,-33.161 -73.907,-73.917 0,-9.544 1.965,-18.597 5.268,-26.983 l 44.541,26.888 c 0,0.032 -0.016,0.064 -0.016,0.095 0,13.323 10.808,24.132 24.114,24.132 13.322,0 24.118,-10.81 24.118,-24.132 0,-10.478 -6.721,-19.307 -16.06,-22.64 l -10.277,-51.043 c 0.756,-0.024 1.463,-0.226 2.22,-0.226 40.757,0 73.911,33.153 73.911,73.909 -10e-4,40.756 -33.155,73.917 -73.912,73.917 z"
id="path5" />
<g
id="g10174"
transform="rotate(-45,60.058765,120.50397)"><path
d="m 100.16593,30.670651 c -5.521751,5.521749 -5.521751,14.11256 0,19.638597 17.79324,17.793301 28.22948,42.342094 28.22948,67.502302 0,25.77277 -9.81917,49.70354 -27.61257,67.50231 -5.521761,5.52175 -5.521761,14.11256 0,19.63859 2.45267,2.45269 6.13811,4.29754 9.81916,4.29754 3.68106,0 7.36234,-1.22848 9.81921,-4.29754 23.31927,-23.31932 36.20348,-54.00119 36.20348,-87.1365 0,-33.134258 -12.88856,-63.816092 -36.20348,-87.136525 -6.14243,-5.530298 -14.73279,-5.530298 -20.25443,-0.0085 z"
id="path3370"
style="stroke-width:1.09578" /><path
d="m 83.597679,66.875252 c -5.52175,-5.521722 -14.11255,-5.521722 -19.63857,0 -5.52175,5.521756 -5.52175,14.11259 0,19.6386 8.59071,8.5907 12.88856,19.638598 12.88856,31.294418 0,11.66021 -4.90967,23.31931 -12.88856,31.29441 -5.52175,5.52175 -5.52175,14.11256 0,19.63859 2.45267,2.45269 6.13812,4.29754 9.81917,4.29754 3.68105,0 7.36233,-1.22847 9.81917,-4.29754 13.50002,-13.50004 21.479501,-31.91025 20.862591,-50.93191 0.61209,-19.026028 -6.750211,-37.431868 -20.862591,-50.93189 z"
id="path3372"
style="stroke-width:1.09578" /><path
d="m 54.143079,118.42081 c 0,11.86074 -9.61798,21.47512 -21.4795,21.47512 -11.861488,0 -21.4795,-9.61372 -21.4795,-21.47512 0,-11.86141 9.618012,-21.479498 21.4795,-21.479498 11.86152,0 21.4795,9.618008 21.4795,21.479498"
id="path3378"
style="stroke-width:1.09578" /></g></svg>
</template>
<script>
export default {
name: 'CyclingVirtual',
}
</script>

View File

@ -6,6 +6,7 @@
>
<CyclingSport v-if="sportLabel === 'Cycling (Sport)'" />
<CyclingTransport v-if="sportLabel === 'Cycling (Transport)'" />
<CyclingVirtual v-if="sportLabel === 'Cycling (Virtual)'" />
<Hiking v-if="sportLabel === 'Hiking'" />
<MountainBiking v-if="sportLabel === 'Mountain Biking'" />
<MountainBikingElectric
@ -26,6 +27,7 @@
import CyclingSport from '@/components/Common/Images/SportImage/CyclingSport.vue'
import CyclingTransport from '@/components/Common/Images/SportImage/CyclingTransport.vue'
import CyclingVirtual from '@/components/Common/Images/SportImage/CyclingVirtual.vue'
import Hiking from '@/components/Common/Images/SportImage/Hiking.vue'
import MountainBiking from '@/components/Common/Images/SportImage/MountainBiking.vue'
import MountainBikingElectric from '@/components/Common/Images/SportImage/MountainBikingElectric.vue'

View File

@ -5,6 +5,9 @@
"Cycling (Transport)": {
"LABEL": "Radfahren (Pendeln)"
},
"Cycling (Virtual)": {
"LABEL": "Radfahren (Virtuell)"
},
"Hiking": {
"LABEL": "Wandern"
},

View File

@ -5,6 +5,9 @@
"Cycling (Transport)": {
"LABEL": "Cycling (Transport)"
},
"Cycling (Virtual)": {
"LABEL": "Cycling (Virtual)"
},
"Hiking": {
"LABEL": "Hiking"
},

View File

@ -5,6 +5,9 @@
"Cycling (Transport)": {
"LABEL": "Vélo (Transport)"
},
"Cycling (Virtual)": {
"LABEL": "Vélo (Virtuel)"
},
"Hiking": {
"LABEL": "Randonnée"
},

View File

@ -4,6 +4,7 @@ import { IWorkout } from '@/types/workouts'
export const sportColors: Record<string, string> = {
'Cycling (Sport)': '#4c9792',
'Cycling (Transport)': '#88af98',
'Cycling (Virtual)': '#64a360',
Hiking: '#bb757c',
'Mountain Biking': '#d4b371',
'Mountain Biking (Electric)': '#fc9d6f',