Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DLCM-Portal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DLCM
UI
DLCM-Portal
Commits
4592ef68
Commit
4592ef68
authored
5 years ago
by
Florent Poittevin
Browse files
Options
Downloads
Patches
Plain Diff
fix: wrong theme selected when setting override
parent
5acba934
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/app.component.ts
+5
-1
5 additions, 1 deletion
src/app/app.component.ts
src/app/components/presentationals/theme-selector/theme-selector.presentational.ts
+3
-2
3 additions, 2 deletions
...tationals/theme-selector/theme-selector.presentational.ts
with
8 additions
and
3 deletions
src/app/app.component.ts
+
5
−
1
View file @
4592ef68
...
...
@@ -84,6 +84,7 @@ export class AppComponent extends SharedAbstractPresentational {
this
.
listenCurrentModule
();
this
.
listenThemeChange
();
this
.
observeOfflineOnlineMode
();
this
.
themeChange
(
environment
.
theme
);
}
private
observeOfflineOnlineMode
():
void
{
...
...
@@ -186,7 +187,9 @@ export class AppComponent extends SharedAbstractPresentational {
}
themeChange
(
theme
:
ThemeEnum
):
void
{
this
.
store
.
dispatch
(
new
AppAction
.
ChangeAppTheme
(
theme
));
if
(
theme
!==
this
.
store
.
selectSnapshot
((
state
:
LocalStateModel
)
=>
state
.
application
.
theme
))
{
this
.
store
.
dispatch
(
new
AppAction
.
ChangeAppTheme
(
theme
));
}
}
navigateToHome
():
void
{
...
...
@@ -196,6 +199,7 @@ export class AppComponent extends SharedAbstractPresentational {
private
listenThemeChange
():
void
{
this
.
subscribe
(
this
.
themeObs
.
pipe
(
distinctUntilChanged
(),
tap
((
theme
:
ThemeEnum
)
=>
{
this
.
setTheme
();
this
.
setFavicon
();
...
...
This diff is collapsed.
Click to expand it.
src/app/components/presentationals/theme-selector/theme-selector.presentational.ts
+
3
−
2
View file @
4592ef68
...
...
@@ -37,7 +37,9 @@ export class ThemeSelectorPresentational extends SharedAbstractPresentational {
}
private
set
_theme
(
value
:
ThemeEnum
|
undefined
)
{
this
.
_themeBS
.
next
(
value
);
if
(
this
.
_themeBS
.
value
!==
value
)
{
this
.
_themeBS
.
next
(
value
);
}
}
get
theme
():
ThemeEnum
|
undefined
{
...
...
@@ -52,5 +54,4 @@ export class ThemeSelectorPresentational extends SharedAbstractPresentational {
get
stringUtil
():
typeof
StringUtil
{
return
StringUtil
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment