MFTRootComponent

Commit
7a9747582fa6d5ab5b8c211799c833e6e0766c2f
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
src/MyFitnessTracker/MFTRootComponent.class.st
index 8075675a..8882b661 100644..100644
@@ -17,15 +17,41 @@
17 17 { #category : #'class initialization' }
18 18 MFTRootComponent class >> initialize [
19 19
20 Removed: | app |
21 Removed: app := WAAdmin register: self asApplicationAt: 'MyFitnessTracker'.
22 Removed: app
23 Removed: addLibrary: JQGoogleLibrary;
24 Removed: addLibrary: JQUiGoogleLibrary;
25 Removed: addLibrary: SBSCDNDeploymentLibrary.
26 Removed: ^ app
20 Added: | application libraries |
21 Added: application := WAAdmin register: self asApplicationAt: 'mft'.
22 Added: application preferenceAt: #sessionClass put: MFTSession.
23 Added: libraries := MFTUtils isDevelopmentImage
24 Added: ifTrue: [ self libraries at: #development ]
25 Added: ifFalse: [ self libraries at: #deployment ].
26 Added: libraries do: [ :library | application addLibrary: library ].
27 Added: ^ application
27 28 ]
28 29
30 Added: { #category : #'class initialization' }
31 Added: MFTRootComponent class >> libraries [
32 Added:
33 Added: ^ Dictionary new
34 Added: at: #development put: {
35 Added: JQDevelopmentLibrary.
36 Added: JQUiDevelopmentLibrary.
37 Added: SBSDevelopmentLibrary };
38 Added: at: #deployment put: {
39 Added: JQGoogleLibrary.
40 Added: JQUiGoogleLibrary.
41 Added: SBSCDNDeploymentLibrary };
42 Added: yourself
43 Added: ]
44 Added:
45 Added: { #category : #adding }
46 Added: MFTRootComponent >> addBootstrapJSScriptTo: html [
47 Added:
48 Added: | library |
49 Added: library := MFTUtils isDevelopmentImage
50 Added: ifTrue: [ SBSDeploymentLibrary ]
51 Added: ifFalse: [ SBSCDNDeploymentLibrary ].
52 Added: library addLoadScriptTo: html
53 Added: ]
54 Added:
29 55 { #category : #rendering }
30 56 MFTRootComponent >> children [
31 57
@@ -36,8 +62,7 @@
36 62 MFTRootComponent >> initialize [
37 63
38 64 super initialize.
39 Removed: main := MFTScreenComponent new.
40 Removed: "connection := MFTDatabase newConnectionToSQLite3"
65 Added: main := MFTScreenComponent new
41 66 ]
42 67
43 68 { #category : #initialization }
@@ -49,7 +74,8 @@
49 74 { #category : #rendering }
50 75 MFTRootComponent >> renderContentOn: html [
51 76
52 Removed: html render: main
77 Added: html render: main.
78 Added: self addBootstrapJSScriptTo: html
53 79 ]
54 80
55 81 { #category : #updating }
@@ -61,8 +87,9 @@
61 87 name: 'viewport';
62 88 content: 'width=device-width, initial-scale=1'.
63 89 anHtmlRoot title: 'My Fitness Tracker ' , self version.
64 Removed: anHtmlRoot script url:
65 Removed: '/files/SBSDeploymentLibrary/js/bootstrap.bundle.min.js'
90 Added: anHtmlRoot link
91 Added: beShortcutIcon;
92 Added: url: MFTFileLibrary / #faviconPng
66 93 ]
67 94
68 95 { #category : #versions }