Prospect e-mail registering header is now dismissible for the duration of the session.

Commit
0ed4665bbc88e007332cbee3f623a1cfb3492938
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
src/MyFitnessTracker/MFTRegisterProspectEmailHeader.class.st
index 5dd4278f..3b42d44d 100644..100644
@@ -4,7 +4,8 @@
4 4 #instVars : [
5 5 'email',
6 6 'localPart',
7 Removed: 'domain'
7 Added: 'domain',
8 Added: 'isDismissed'
8 9 ],
9 10 #category : #'MyFitnessTracker-Components'
10 11 }
@@ -22,17 +23,35 @@
22 23 MFTSQLite3Database storeProspectEmail: email
23 24 ]
24 25
26 Added: { #category : #initialization }
27 Added: MFTRegisterProspectEmailHeader >> initialize [
28 Added:
29 Added: super initialize.
30 Added: isDismissed := false
31 Added: ]
32 Added:
33 Added: { #category : #accessing }
34 Added: MFTRegisterProspectEmailHeader >> isDismissed [
35 Added:
36 Added: ^ isDismissed
37 Added: ]
38 Added:
39 Added: { #category : #accessing }
40 Added: MFTRegisterProspectEmailHeader >> isDismissed: anObject [
41 Added:
42 Added: isDismissed := anObject
43 Added: ]
44 Added:
25 45 { #category : #rendering }
26 46 MFTRegisterProspectEmailHeader >> renderContentOn: html [
27 47
48 Added: isDismissed ifTrue: [ ^ self ].
28 49 email
29 50 ifNil: [
30 51 html alert
31 52 beWarning;
32 Removed: beDismissible;
33 53 marginBottom: 0;
34 54 with: [
35 Removed: html closeButton dataDismiss: 'alert'.
36 55 html alertHeading: 'This app is still in beta.'.
37 56 html paragraph: [
38 57 html
@@ -44,10 +63,15 @@
44 63 html label
45 64 style: 'margin-right: 1em';
46 65 with: [ html strong: 'Want to know when version 1.0 is out?' ].
47 Removed: html formButton
48 Removed: beInfo;
49 Removed: callback: [ self addUserEmail ];
50 Removed: with: 'E-mail me!' ] ] ]
66 Added: html buttonGroup: [
67 Added: html formButton
68 Added: beInfo;
69 Added: callback: [ self addUserEmail ];
70 Added: with: 'E-mail me!'.
71 Added: html formButton
72 Added: beSecondary;
73 Added: callback: [ isDismissed := true ];
74 Added: with: 'I''m not interested' ] ] ] ]
51 75 ifNotNil: [
52 76 html alert
53 77 beSuccess;
@@ -55,18 +79,21 @@
55 79 marginBottom: 0;
56 80 with: [
57 81 html closeButton dataDismiss: 'alert'.
58 Removed: html text: email , ' will be notified when v1 is released!' ] ]
82 Added: html
83 Added: text: 'You''ll be notified at ';
84 Added: strong: email;
85 Added: text: ' when My Fitness Tracker is ready for you!' ] ]
59 86 ]
60 87
61 88 { #category : #rendering }
62 89 MFTRegisterProspectEmailHeader >> renderEmailInputModalButtonOn: html [
63 90
64 Removed: ^ html formButton
65 Removed: bePrimary;
66 Removed: beSmall;
67 Removed: dataToggle: 'modal';
68 Removed: dataTarget: '#emailInputModal';
69 Removed: with: 'E-mail me!'
91 Added: html formButton
92 Added: bePrimary;
93 Added: beSmall;
94 Added: dataToggle: 'modal';
95 Added: dataTarget: '#emailInputModal';
96 Added: with: 'E-mail me!'
70 97 ]
71 98
72 99 { #category : #rendering }