Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
7b7ba46f
Commit
7b7ba46f
authored
Sep 21, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(styleguide): fixed theme switching in style guide
parent
4f892ab9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
public/app/features/styleguide/styleguide.ts
+6
-3
No files found.
public/app/features/styleguide/styleguide.ts
View file @
7b7ba46f
...
@@ -13,7 +13,7 @@ class StyleGuideCtrl {
...
@@ -13,7 +13,7 @@ class StyleGuideCtrl {
pages
=
[
'colors'
,
'buttons'
];
pages
=
[
'colors'
,
'buttons'
];
/** @ngInject **/
/** @ngInject **/
constructor
(
private
$http
,
$routeParams
)
{
constructor
(
private
$http
,
private
$routeParams
,
private
$location
)
{
this
.
theme
=
config
.
bootData
.
user
.
lightTheme
?
'light'
:
'dark'
;
this
.
theme
=
config
.
bootData
.
user
.
lightTheme
?
'light'
:
'dark'
;
this
.
page
=
{};
this
.
page
=
{};
...
@@ -37,8 +37,11 @@ class StyleGuideCtrl {
...
@@ -37,8 +37,11 @@ class StyleGuideCtrl {
}
}
switchTheme
()
{
switchTheme
()
{
var
other
=
this
.
theme
===
'dark'
?
'light'
:
'dark'
;
this
.
$routeParams
.
theme
=
this
.
theme
===
'dark'
?
'light'
:
'dark'
;
window
.
location
.
href
=
window
.
location
.
href
+
'?theme='
+
other
;
this
.
$location
.
search
(
this
.
$routeParams
);
setTimeout
(()
=>
{
window
.
location
.
href
=
window
.
location
.
href
;
});
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment