Add Weights and Calisthenics Sport

This commit is contained in:
Alexander Bocken 2024-02-07 14:59:30 +01:00
parent 70c2541035
commit 364a2f5ef1
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8
8 changed files with 129 additions and 0 deletions

View File

@ -0,0 +1,35 @@
"""add weights sport
Revision ID: 4229a42eff8b
Revises: 4d51a4ca8001
Create Date: 2024-02-06 21:50:41.072336
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4229a42eff8b'
down_revision = '4d51a4ca8001'
branch_labels = None
depends_on = None
def upgrade():
op.execute(
"""
INSERT INTO sports (label, is_active, stopped_speed_threshold)
VALUES ('Weights', True, 0.1)
"""
)
def downgrade():
op.execute(
"""
DELETE FROM sports
WHERE label = 'Weights';
"""
)

View File

@ -0,0 +1,34 @@
"""add calisthenics sport
Revision ID: 965bdd65109f
Revises: 4229a42eff8b
Create Date: 2024-02-06 21:51:15.000016
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '965bdd65109f'
down_revision = '4229a42eff8b'
branch_labels = None
depends_on = None
def upgrade():
op.execute(
"""
INSERT INTO sports (label, is_active, stopped_speed_threshold)
VALUES ('Calisthenics', True, 0.1)
"""
)
def downgrade():
op.execute(
"""
DELETE FROM sports
WHERE label = 'Calisthenics';
"""
)

View File

@ -0,0 +1,21 @@
<template>
<svg version="1.1"
id="fi_55249"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 483.791 483.791"
style="enable-background:new 0 0 483.791 483.791;"
xml:space="preserve">
<path
d="M469.779,374.718L331.625,267.175c-14.479-11.915-35.439-11.643-49.602,0.646L181.735,348.68 c-2.386,1.141-4.597,1.461-6.248,0.282c-6.584-4.705-32.618-87.19-37.636-103.498c-0.503-1.633-0.667-3.244-0.577-4.823 l101.372-49.355c11.499-5.596,18.605-17.457,18.12-30.233c-0.482-12.777-8.472-24.065-20.357-28.774L105.614,80.462 c-0.503-0.199-1.009-0.384-1.516-0.556c-0.169-0.059-0.34-0.107-0.511-0.162c-0.339-0.109-0.676-0.218-1.015-0.315 c-0.202-0.058-0.406-0.107-0.608-0.161c-0.309-0.082-0.615-0.165-0.924-0.237c-0.217-0.05-0.434-0.093-0.651-0.139 c-0.295-0.063-0.592-0.126-0.887-0.18c-0.224-0.041-0.448-0.075-0.672-0.11c-0.289-0.047-0.579-0.094-0.869-0.132 c-0.228-0.031-0.457-0.055-0.685-0.081c-0.285-0.031-0.57-0.062-0.854-0.086c-0.231-0.02-0.465-0.034-0.696-0.048 c-0.28-0.018-0.562-0.033-0.841-0.043c-0.233-0.008-0.468-0.013-0.701-0.016c-0.147-0.002-0.296-0.01-0.445-0.01 c-0.082,0-0.164,0.008-0.245,0.009c-0.709,0.005-1.414,0.028-2.116,0.08c-0.058,0.004-0.113,0.012-0.17,0.017 c-0.659,0.052-1.315,0.128-1.969,0.221c-0.16,0.023-0.322,0.045-0.482,0.07c-0.691,0.108-1.379,0.234-2.059,0.388 c-0.088,0.02-0.173,0.043-0.26,0.063c-0.616,0.144-1.228,0.307-1.834,0.486c-0.146,0.043-0.295,0.085-0.442,0.132 c-0.664,0.207-1.322,0.431-1.97,0.68c-0.105,0.041-0.208,0.086-0.313,0.127c-0.574,0.227-1.142,0.471-1.702,0.73 c-0.131,0.061-0.263,0.119-0.393,0.181c-0.626,0.3-1.242,0.619-1.848,0.958c-0.113,0.064-0.227,0.132-0.34,0.198 c-0.531,0.307-1.055,0.628-1.568,0.965c-0.109,0.072-0.222,0.14-0.331,0.214c-0.576,0.387-1.14,0.795-1.692,1.221 c-0.117,0.09-0.23,0.184-0.347,0.275c-0.483,0.385-0.959,0.782-1.422,1.196c-0.087,0.077-0.177,0.151-0.263,0.229 c-0.517,0.471-1.018,0.963-1.505,1.47c-0.11,0.115-0.219,0.232-0.328,0.35c-0.436,0.467-0.86,0.946-1.269,1.441 c-0.06,0.072-0.122,0.141-0.182,0.213c-0.448,0.551-0.875,1.123-1.288,1.708c-0.098,0.139-0.195,0.279-0.291,0.42 c-0.382,0.559-0.752,1.13-1.102,1.718c-0.028,0.05-0.062,0.097-0.092,0.147c-0.367,0.628-0.711,1.276-1.039,1.936 c-0.08,0.16-0.158,0.321-0.236,0.484c-0.321,0.673-0.63,1.357-0.909,2.062c-6.566,16.568,1.545,35.318,18.112,41.881 l49.672,19.679c-4.159,1.391-9.677,3.234-15.84,5.293l-37.791-14.971c-10.685-4.233-19.081-12.372-23.642-22.919 c-4.563-10.547-4.742-22.24-0.509-32.922c6.539-16.513,22.243-27.184,40.005-27.184h0.002c5.427,0,10.754,1.02,15.834,3.032 l36.318,14.388c-11.486-27.321-38.5-46.507-69.996-46.507C33.981,38.345,0,72.325,0,114.243c0,33.815,22.122,62.441,52.679,72.25 c-20.039,6.755-56.589,25.539-21.753,129.59c32.08,95.83,62.902,121.388,91.854,128.189c3.842,1.288,52.445,1.17,52.445,1.17 c9.252,0,15.158-2.513,22.147-8.576l110.491-89.712l113.076,86.909c16.389,13.484,40.607,11.134,54.094-5.254 C488.521,412.422,486.166,388.204,469.779,374.718z M144.581,165.312l-0.392,0.19c-0.058-0.139-0.115-0.278-0.174-0.415 L144.581,165.312z">
</path>
</svg>
</template>
<script lang="ts">
export default {
name: 'Calisthenics',
}
</script>

View File

@ -0,0 +1,21 @@
<template>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 481.75 481.75"
style="enable-background:new 0 0 481.75 481.75;"
xml:space="preserve">
<circle cx="240.876" cy="130.292" r="50.279"></circle>
<path
d="M455.362,27.768c-4.006,0-7.57,1.853-9.906,4.744v-8.477c0-7.026-5.691-12.722-12.719-12.722 c-5.142,0-9.563,3.05-11.568,7.437v-6.029c0-7.024-5.695-12.72-12.719-12.72c-7.029,0-12.726,5.696-12.726,12.72v39.706h-46.911 c-3.031-6.854-10.152-11.32-18.017-10.52c-6.555,0.688-11.824,4.895-14.313,10.52H165.271c-2.488-5.625-7.76-9.832-14.314-10.52 c-7.865-0.801-14.984,3.665-18.016,10.52H86.029V12.72C86.029,5.696,80.332,0,73.304,0c-7.023,0-12.717,5.696-12.717,12.72v6.029 c-2.01-4.387-6.432-7.437-11.57-7.437c-7.025,0-12.721,5.695-12.721,12.722v8.478c-2.334-2.892-5.9-4.744-9.904-4.744 c-7.025,0-12.725,5.695-12.725,12.722v49.312c0,7.024,5.699,12.72,12.725,12.72c4.004,0,7.57-1.852,9.904-4.745v8.48 c0,7.024,5.695,12.72,12.721,12.72c5.139,0,9.561-3.05,11.57-7.437v6.028c0,7.024,5.693,12.72,12.717,12.72 c7.027,0,12.725-5.695,12.725-12.72V77.866h43.855c-1.734,31.823-1.367,87.949,19.947,111.313 c16.098,17.644,33.611,27.786,45.289,33.155v90.037c-25.604,7.097-45.365,21.189-62.311,43.779 c-22.859,30.483-23.553,90.421-23.461,102.128C109.45,471.28,120.024,481.75,133,481.75c0.063,0,0.133,0,0.193,0 c13.07-0.104,23.576-10.78,23.475-23.849c-0.176-21.824,4.152-60.232,13.996-73.356c14.041-18.712,30.723-30.336,70.211-30.452 c39.496,0.115,56.172,11.74,70.213,30.452c9.842,13.124,14.17,51.532,13.994,73.356c-0.101,13.067,10.404,23.743,23.475,23.849 c0.063,0,0.131,0,0.193,0c12.979,0,23.553-10.47,23.652-23.472c0.094-11.707-0.601-71.645-23.459-102.128 c-16.945-22.59-36.709-36.683-62.312-43.779v-90.037c11.676-5.37,29.191-15.512,45.287-33.155 c21.316-23.364,21.682-79.49,19.949-111.313h43.854v39.706c0,7.024,5.695,12.72,12.726,12.72c7.022,0,12.719-5.695,12.719-12.72 v-6.028c2.006,4.386,6.428,7.437,11.568,7.437c7.026,0,12.719-5.696,12.719-12.72v-8.479c2.336,2.893,5.899,4.745,9.906,4.745 c7.026,0,12.723-5.696,12.723-12.72V40.49C468.085,33.463,462.39,27.768,455.362,27.768z M305.704,165.261 c-11.121,12.19-29.635,23.104-31.471,23.689s-12.715-2.748-33.357-2.748c-20.645,0-30.07,2.996-33.357,2.748 s-20.348-11.499-31.471-23.689c-9.701-10.633-12.746-50.6-10.621-87.395h150.898 C318.452,114.661,315.405,154.628,305.704,165.261z">
</path>
</svg>
</template>
<script lang="ts">
export default {
name: 'Weights',
}
</script>

View File

@ -23,12 +23,15 @@
<Snowshoes v-if="sportLabel === 'Snowshoes'" />
<Trail v-if="sportLabel === 'Trail'" />
<Walking v-if="sportLabel === 'Walking'" />
<Weights v-if="sportLabel === 'Weights'" />
<Calisthenics v-if="sportLabel === 'Calisthenics'" />
</div>
</template>
<script setup lang="ts">
import { inject, toRefs } from 'vue'
import Calisthenics from '@/components/Common/Images/SportImage/Calisthenics.vue'
import CyclingSport from '@/components/Common/Images/SportImage/CyclingSport.vue'
import CyclingTransport from '@/components/Common/Images/SportImage/CyclingTransport.vue'
import CyclingTrekking from '@/components/Common/Images/SportImage/CyclingTrekking.vue'
@ -46,6 +49,7 @@
import Snowshoes from '@/components/Common/Images/SportImage/Snowshoes.vue'
import Trail from '@/components/Common/Images/SportImage/Trail.vue'
import Walking from '@/components/Common/Images/SportImage/Walking.vue'
import Weights from '@/components/Common/Images/SportImage/Weights.vue'
interface Props {
sportLabel: string

View File

@ -49,5 +49,11 @@
},
"Walking": {
"LABEL": "Gehen"
},
"Weights": {
"LABEL": "Gewichte"
},
"Calisthenics": {
"LABEL": "Calisthenics"
}
}

View File

@ -49,5 +49,11 @@
},
"Walking": {
"LABEL": "Walking"
},
"Weights": {
"LABEL": "Weights"
},
"Calisthenics": {
"LABEL": "Calisthenics"
}
}

View File

@ -19,6 +19,8 @@ export const sportColors: Record<string, string> = {
Snowshoes: '#5780a8',
Trail: '#09a98a',
Walking: '#838383',
Weights: '#5E81AC',
Calisthenics: '#BF616A',
}
export const sportIdColors = (sports: ISport[]): Record<number, string> => {