Skip to content

Commit

Permalink
add: workouts type: Kayaking
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-29 committed Nov 21, 2022
1 parent 9fb64bd commit bfb6e9d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
12 changes: 11 additions & 1 deletion scripts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,19 @@ def safeget(dct, *keys):
"rowing": "Rowing",
"RoadTrip": "RoadTrip",
"flight": "Flight",
"kayaking": "Kayaking",
}

MAPPING_TYPE = ["Hike", "Ride", "VirtualRide", "Rowing", "Run", "Swim", "RoadTrip"]
MAPPING_TYPE = [
"Hike",
"Ride",
"VirtualRide",
"Rowing",
"Run",
"Swim",
"RoadTrip",
"Kayaking",
]

STRAVA_GARMIN_TYPE_DICT = {
"Hike": "hiking",
Expand Down
4 changes: 4 additions & 0 deletions src/utils/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const RIDE_TITLE = IS_CHINESE ? '骑行' : 'Ride';
const INDOOR_RIDE_TITLE = IS_CHINESE ? '室内骑行' : 'Indoor Ride';
const HIKE_TITLE = IS_CHINESE ? '徒步' : 'Hike';
const ROWING_TITLE = IS_CHINESE ? '划船' : 'Rowing';
const KAYAKING_TITLE = IS_CHINESE ? '皮划艇' : 'Kayaking';
const ROAD_TRIP_TITLE = IS_CHINESE ? '自驾' : 'RoadTrip';
const FLIGHT_TITLE = IS_CHINESE ? '飞行' : 'Flight';

Expand All @@ -53,6 +54,7 @@ const RUN_TITLES = {
INDOOR_RIDE_TITLE,
HIKE_TITLE,
ROWING_TITLE,
KAYAKING_TITLE,
SWIM_TITLE,
ROAD_TRIP_TITLE,
FLIGHT_TITLE,
Expand Down Expand Up @@ -82,6 +84,7 @@ const wpink = 'rgb(228,212,220)';
const gold = 'rgb(242,190,69)';
const purple = 'rgb(154,118,252)';
const veryPeri = 'rgb(105,106,173)';//长春花蓝
const red = 'rgb(255,0,0)';//大红色

// If your map has an offset please change this line
// issues #92 and #198
Expand All @@ -97,3 +100,4 @@ export const ROAD_TRIP_COLOR = purple;
export const FLIGHT_COLOR = wpink;
export const PROVINCE_FILL_COLOR = '#47b8e0';
export const COUNTRY_FILL_COLOR = wpink;
export const KAYAKING_COLOR = red;
7 changes: 6 additions & 1 deletion src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
ROWING_COLOR,
ROAD_TRIP_COLOR,
FLIGHT_COLOR,
RUN_COLOR
RUN_COLOR,
KAYAKING_COLOR
} from './const';

const titleForShow = (run) => {
Expand Down Expand Up @@ -181,6 +182,8 @@ const titleForRun = (run) => {
return RUN_TITLES.ROAD_TRIP_TITLE;
case 'Flight':
return RUN_TITLES.FLIGHT_TITLE;
case 'Kayaking':
return RUN_TITLES.KAYAKING_TITLE;
default:
return RUN_TITLES.RUN_TITLE;
}
Expand All @@ -205,6 +208,8 @@ const colorFromType = (workoutType) => {
return ROAD_TRIP_COLOR;
case 'Flight':
return FLIGHT_COLOR;
case 'Kayaking':
return KAYAKING_COLOR;
default:
return MAIN_COLOR;
}
Expand Down

0 comments on commit bfb6e9d

Please sign in to comment.