[Pharo] Personal fitness tracker web app.
Cards
Changed files
src/MyFitnessTracker/MFTMainPublicCard.class.st
@@ -4,12 +4,6 @@
4
4
#category : #'MyFitnessTracker-Components'
5
5
}
6
6
7
Removed:
{ #category : #adding }
8
Removed:
MFTMainPublicCard >> addWorkoutDialog [
9
Removed:
10
Removed:
self session pageManager activePage call: MFTWorkoutDialog new
11
Removed:
]
12
Removed:
13
7
{ #category : #rendering }
14
8
MFTMainPublicCard >> renderContentOn: html [
15
9
@@ -29,6 +23,6 @@
29
23
bePrimary;
30
24
beLarge;
31
25
class: 'mt-3';
32
Removed:
callback: [ self addWorkoutDialog ];
26
Added:
callback: [ self session pageManager activePage call: MFTWorkoutTask new ];
33
27
with: 'Log a workout' ] ] ]
34
28
]
src/MyFitnessTracker/MFTPromisesCard.class.st
@@ -23,6 +23,6 @@
23
23
with: [
24
24
html outlineButton
25
25
bePrimary;
26
Removed:
callback: [ self session pageManager activePage: 5 ];
26
Added:
callback: [ self session pageManager activePage: #about ];
27
27
with: 'Why did I create this web app?' ] ] ]
28
28
]
src/MyFitnessTracker/MFTWeightsCard.class.st
@@ -10,7 +10,9 @@
10
10
| newWeight |
11
11
newWeight := self session pageManager activePage call:
12
12
MFTWeightDialog new.
13
Removed:
newWeight value ifNotNil: [ self session user weights add: newWeight ]
13
Added:
(newWeight isNotNil and: [
14
Added:
(#( '' '0' nil ) includes: newWeight value) not ]) ifTrue: [
15
Added:
self session user weights add: newWeight ]
14
16
]
15
17
16
18
{ #category : #rendering }
src/MyFitnessTracker/MFTWorkoutsCard.class.st
@@ -4,12 +4,6 @@
4
4
#category : #'MyFitnessTracker-Components'
5
5
}
6
6
7
Removed:
{ #category : #adding }
8
Removed:
MFTWorkoutsCard >> addWorkoutDialog [
9
Removed:
10
Removed:
self session pageManager activePage call: MFTWorkoutDialog new
11
Removed:
]
12
Removed:
13
7
{ #category : #rendering }
14
8
MFTWorkoutsCard >> renderContentOn: html [
15
9
@@ -27,7 +21,8 @@
27
21
with: [
28
22
html outlineButton
29
23
bePrimary;
30
Removed:
callback: [ self addWorkoutDialog ];
24
Added:
callback: [
25
Added:
self session pageManager activePage call: MFTWorkoutTask new ];
31
26
with: 'Log workout'.
32
27
html outlineButton
33
28
beSecondary;