File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
src/app/shared/onboarding Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,35 @@ export class OnboardingService {
67
67
] ) ;
68
68
}
69
69
70
+ async shouldShowOnboardingTutotrial ( ) {
71
+ const shownTutorialVersion = await this . hasShownTutorialVersion ( ) ;
72
+ if (
73
+ shownTutorialVersion === '' ||
74
+ this . isLowerThanRebrandVersion ( shownTutorialVersion )
75
+ ) {
76
+ return true ;
77
+ }
78
+ return false ;
79
+ }
80
+
81
+ // eslint-disable-next-line class-methods-use-this
82
+ private isLowerThanRebrandVersion ( shownTutorialVersion : string ) : boolean {
83
+ const rebrandVersion = '0.65.1' ;
84
+ const rebrandVersionArray = rebrandVersion . split ( '.' ) ;
85
+ const shownTutorialVersionArray = shownTutorialVersion . split ( '.' ) ;
86
+
87
+ for ( const index in shownTutorialVersionArray ) {
88
+ const shownNumber = shownTutorialVersionArray [ index ] ;
89
+ const rebrandNumber = rebrandVersionArray [ index ] ;
90
+ if ( shownNumber < rebrandNumber ) {
91
+ return true ;
92
+ } else if ( shownNumber > rebrandNumber ) {
93
+ return false ;
94
+ }
95
+ }
96
+ return false ;
97
+ }
98
+
70
99
/**
71
100
* @deprecated use `onboard` instead
72
101
*/
You can’t perform that action at this time.
0 commit comments