diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-12-18 14:16:54 -0700 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-12-18 14:20:14 -0700 |
commit | 322643e7407261dede00b5514ac2721e922436f7 (patch) | |
tree | 01cf9f3ae7190d1b933d7bcc6ac5e60b7f64c27a /app | |
parent | f7a9ced235be7ef13f90b561d23ffe602e11e9a3 (diff) | |
download | gitlab-ce-322643e7407261dede00b5514ac2721e922436f7.tar.gz |
Hide toolbar in markdown preview mode
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/markdown/header.vue | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/markdown_area.scss | 26 | ||||
-rw-r--r-- | app/controllers/concerns/with_performance_bar.rb | 2 |
3 files changed, 20 insertions, 11 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/header.vue b/app/assets/javascripts/vue_shared/components/markdown/header.vue index 6c575d8eb49..55aaab77b7a 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/header.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/header.vue @@ -72,7 +72,8 @@ Preview </a> </li> - <li class="md-header-toolbar"> + <li class="md-header-toolbar" + :class="{ active: !previewMarkdown }"> <toolbar-button tag="**" button-title="Add bold text" diff --git a/app/assets/stylesheets/framework/markdown_area.scss b/app/assets/stylesheets/framework/markdown_area.scss index 5389eb0a5f2..2dfaa0892b3 100644 --- a/app/assets/stylesheets/framework/markdown_area.scss +++ b/app/assets/stylesheets/framework/markdown_area.scss @@ -82,19 +82,27 @@ } } -.md-header-toolbar { - margin-left: auto; +.nav-links { + li.md-header-toolbar { + margin-left: auto; + display: none; - @media(max-width: $screen-xs-max) { - flex: none; - display: flex; - justify-content: center; - width: 100%; - padding-top: $gl-padding-top; - padding-bottom: $gl-padding-top; + &.active { + display: block; + } + + @media(max-width: $screen-xs-max) { + flex: none; + display: flex; + justify-content: center; + width: 100%; + padding-top: $gl-padding-top; + padding-bottom: $gl-padding-top; + } } } + .referenced-users { color: $gl-text-color; padding-top: 10px; diff --git a/app/controllers/concerns/with_performance_bar.rb b/app/controllers/concerns/with_performance_bar.rb index 230bbe4b1aa..a1848286b2b 100644 --- a/app/controllers/concerns/with_performance_bar.rb +++ b/app/controllers/concerns/with_performance_bar.rb @@ -6,7 +6,7 @@ module WithPerformanceBar end def peek_enabled? - return true if Rails.env.development? + # return true if Rails.env.development? return false unless Gitlab::PerformanceBar.enabled?(current_user) if RequestStore.active? |