Skip to content

Commit

Permalink
Use theme from session and user info
Browse files Browse the repository at this point in the history
  • Loading branch information
astares committed Jul 5, 2023
1 parent a473f7d commit 393b31d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Boot-Web-Core/BTSession.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ BTSession >> logout [

userInfo := nil
]

{ #category : #accessing }
BTSession >> userInfo [

^ userInfo
]
6 changes: 6 additions & 0 deletions src/Boot-Web-Core/BTUserInfo.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ BTUserInfo >> initialize [
self setLightTheme
]

{ #category : #testing }
BTUserInfo >> isDarkThemeSet [

^ theme = #dark
]

{ #category : #testing }
BTUserInfo >> isLightThemeSet [

Expand Down
2 changes: 1 addition & 1 deletion src/Boot-Web-UI/BTComponent.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ BTComponent class >> systemIconName [
{ #category : #testing }
BTComponent >> isDarkTheme [

^ false
^ self session userInfo ifNil: [ false ] ifNotNil: [:userInfo | userInfo isDarkThemeSet ]
]

0 comments on commit 393b31d

Please sign in to comment.