Skip to content

Commit

Permalink
feat: add walk workout type
Browse files Browse the repository at this point in the history
  • Loading branch information
Coder-ZJQ committed Feb 10, 2025
1 parent 0c219bb commit feedd94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions run_page/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def safeget(dct, *keys):
MAPPING_TYPE = [
"Hike",
"Ride",
"Walk",
"VirtualRide",
"Rowing",
"Run",
Expand Down
3 changes: 2 additions & 1 deletion src/utils/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const RIDE_TITLE = IS_CHINESE ? '骑行' : 'Ride';
const INDOOR_RIDE_TITLE = IS_CHINESE ? '室内骑行' : 'Indoor Ride';
const VIRTUAL_RIDE_TITLE = IS_CHINESE ? '虚拟骑行' : 'Virtual Ride';
const HIKE_TITLE = IS_CHINESE ? '徒步' : 'Hike';
const WALK_TITLE = IS_CHINESE ? '散步' : 'Walk';
const ROWING_TITLE = IS_CHINESE ? '划船' : 'Rowing';
const KAYAKING_TITLE = IS_CHINESE ? '皮划艇' : 'Kayaking';
const SNOWBOARD_TITLE = IS_CHINESE ? '单板滑雪' : 'Snowboard';
Expand All @@ -77,7 +78,7 @@ const RUN_TITLES = {
HALF_MARATHON_RUN_TITLE,
RUN_TITLE,
TRAIL_RUN_TITLE,

WALK_TITLE,
RIDE_TITLE,
INDOOR_RIDE_TITLE,
VIRTUAL_RIDE_TITLE,
Expand Down
4 changes: 4 additions & 0 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ const titleForType = (type: string): string => {
return RUN_TITLES.VIRTUAL_RIDE_TITLE;
case 'Hike':
return RUN_TITLES.HIKE_TITLE;
case 'Walk':
return RUN_TITLES.WALK_TITLE;
case 'Rowing':
return RUN_TITLES.ROWING_TITLE;
case 'Swim':
Expand Down Expand Up @@ -263,6 +265,8 @@ const typeForRun = (run: Activity): string => {
return 'VirtualRide';
case 'Hike':
return 'Hike';
case 'Walk':
return 'Walk';
case 'Rowing':
return 'Rowing';
case 'Swim':
Expand Down

0 comments on commit feedd94

Please sign in to comment.