Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark-theme version of the Share UI. #8941

Merged
merged 2 commits into from
Nov 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/core_plugins/kibana/public/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,
}
}

$scope.$on('$destroy', dash.destroy);

const matchQueryFilter = function (filter) {
return filter.query && filter.query.query_string && !filter.meta;
};
Expand All @@ -103,6 +101,7 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,
$scope.$watchCollection('state.options', function (newVal, oldVal) {
if (!angular.equals(newVal, oldVal)) $state.save();
});

$scope.$watch('state.options.darkTheme', setDarkTheme);

$scope.topNavMenu = [{
Expand Down Expand Up @@ -154,7 +153,14 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,
stateMonitor.onChange((status) => {
$appStatus.dirty = status.dirty;
});
$scope.$on('$destroy', () => stateMonitor.destroy());

$scope.$on('$destroy', () => {
stateMonitor.destroy();
dash.destroy();

// Remove dark theme to keep it from affecting the appearance of other apps.
setDarkTheme(false);
});

$scope.$emit('application.load');
}
Expand Down
32 changes: 31 additions & 1 deletion src/ui/public/share/styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}

.share-panel {
flex: 1 1 0%;
flex: 1 1 50%;
}

.share-panel--left {
Expand All @@ -20,6 +20,11 @@
padding-bottom: 4px;
font-size: 18px;
color: #000000;

// Dark theme.
.theme-dark & {
color: #cecece;
}
}

.share-panel-section {
Expand All @@ -37,6 +42,11 @@
font-size: 14px;
font-weight: 700;
color: #000000;

// Dark theme.
.theme-dark & {
color: #cecece;
}
}

.share-panel-header__actions {
Expand All @@ -57,17 +67,31 @@
margin-bottom: 6px;
border: 0;
border-radius: 4px;

.theme-dark & {
background-color: #444444;
}
}

.share-panel-form-note {
font-size: 14px;
color: #5A5A5A;

// Dark theme.
.theme-dark & {
color: #8e8e8e;
}
}

.share-panel-help-text {
margin-bottom: 16px;
font-size: 14px;
color: #2D2D2D;

// Dark theme.
.theme-dark & {
color: #9e9e9e;
}
}

.share-panel-warning {
Expand All @@ -76,4 +100,10 @@
font-size: 14px;
color: #2D2D2D;
background-color: #e4e4e4;

// Dark theme.
.theme-dark & {
color: #9e9e9e;
background-color: #404040;
}
}